Beispiel #1
0
 def test_properties(calibration_raw):
     calibration = Calibration.from_raw(
         calibration_raw,
         depth_mode=DepthMode.NFOV_2X2BINNED,
         color_resolution=ColorResolution.RES_1536P)
     assert calibration.depth_mode == DepthMode.NFOV_2X2BINNED
     assert calibration.color_resolution == ColorResolution.RES_1536P
Beispiel #2
0
 def device_get_calibration(
         self, depth_mode: int,
         color_resolution: int) -> Tuple[int, Optional[object]]:
     assert self._opened is True
     calibration = Calibration.from_raw(calibration_raw,
                                        DepthMode.NFOV_UNBINNED,
                                        ColorResolution.RES_720P)
     return Result.Success.value, calibration._calibration_handle
Beispiel #3
0
def calibration(calibration_raw) -> Calibration:
    return Calibration.from_raw(calibration_raw,
                                depth_mode=DepthMode.NFOV_UNBINNED,
                                color_resolution=ColorResolution.RES_720P)
Beispiel #4
0
 def test_from_raw(calibration_raw):
     calibration = Calibration.from_raw(
         calibration_raw, depth_mode=DepthMode.NFOV_UNBINNED, color_resolution=ColorResolution.OFF
     )
     assert calibration
Beispiel #5
0
 def test_from_raw_incorrect_data(calibration_raw):
     with pytest.raises(K4AException):
         Calibration.from_raw(
             "none-calibration-json-string", depth_mode=DepthMode.NFOV_UNBINNED, color_resolution=ColorResolution.OFF
         )