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
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
def calibration(calibration_raw) -> Calibration: return Calibration.from_raw(calibration_raw, depth_mode=DepthMode.NFOV_UNBINNED, color_resolution=ColorResolution.RES_720P)
def test_from_raw(calibration_raw): calibration = Calibration.from_raw( calibration_raw, depth_mode=DepthMode.NFOV_UNBINNED, color_resolution=ColorResolution.OFF ) assert calibration
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 )