def _get_capture_depth( self, transform_depth_to_color: bool) -> Optional[np.ndarray]: depth = k4a_module.device_get_depth_image(self._device_id) if transform_depth_to_color: depth = k4a_module.transformation_depth_image_to_color_camera( self._device_id, depth, self._config.color_resolution) return depth
def depth_image_to_color_camera(depth: np.ndarray, calibration: Calibration, thread_safe: bool) -> Optional[np.ndarray]: """ Transform depth color_image to color color_image space Return empty result if transformation failed """ return k4a_module.transformation_depth_image_to_color_camera( calibration.transformation_handle, thread_safe, depth, calibration.color_resolution, )
def _get_capture_ir(self, transform_to_color: bool) -> Optional[np.ndarray]: ir = k4a_module.device_get_ir_image() if ir is not None and transform_to_color: ir = k4a_module.transformation_depth_image_to_color_camera(ir, self._config.color_resolution) return ir