[][src]Function k4a_sys::k4a_transformation_depth_image_to_point_cloud

pub unsafe extern "C" fn k4a_transformation_depth_image_to_point_cloud(
    transformation_handle: k4a_transformation_t,
    depth_image: k4a_image_t,
    camera: k4a_calibration_type_t,
    xyz_image: k4a_image_t
) -> k4a_result_t

Transforms the depth image into 3 planar images representing X, Y and Z-coordinates of corresponding 3D points.

\param transformation_handle Transformation handle.

\param depth_image Handle to input depth image.

\param camera Geometry in which depth map was computed.

\param xyz_image Handle to output xyz image.

\remarks \p depth_image must be of format ::K4A_IMAGE_FORMAT_DEPTH16.

\remarks The \p camera parameter tells the function what the perspective of the \p depth_image is. If the \p depth_image was captured directly from the depth camera, the value should be ::K4A_CALIBRATION_TYPE_DEPTH. If the \p depth_image is the result of a transformation into the color camera's coordinate space using k4a_transformation_depth_image_to_color_camera(), the value should be ::K4A_CALIBRATION_TYPE_COLOR.

\remarks The format of \p xyz_image must be ::K4A_IMAGE_FORMAT_CUSTOM. The width and height of \p xyz_image must match the width and height of \p depth_image. \p xyz_image must have a stride in bytes of at least 6 times its width in pixels.

\remarks Each pixel of the \p xyz_image consists of three int16_t values, totaling 6 bytes. The three int16_t values are the X, Y, and Z values of the point.

\remarks \p xyz_image should be created by the caller using k4a_image_create() or k4a_image_create_from_buffer().

\returns ::K4A_RESULT_SUCCEEDED if \p xyz_image was successfully written and ::K4A_RESULT_FAILED otherwise.

\relates k4a_transformation_t

\xmlonly k4a.h (include k4a/k4a.h) k4a.lib k4a.dll \endxmlonly