Azure Kinect Sensor SDK  refs/heads/master
Documentation for https://github.com/Microsoft/Azure-Kinect-Sensor-SDK

◆ k4a_transformation_depth_image_to_point_cloud()

k4a_result_t k4a_transformation_depth_image_to_point_cloud ( k4a_transformation_t  transformation_handle,
const k4a_image_t  depth_image,
const k4a_calibration_type_t  camera,
k4a_image_t  xyz_image 
)
related

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

Parameters
transformation_handleTransformation handle.
depth_imageHandle to input depth image.
cameraGeometry in which depth map was computed.
xyz_imageHandle to output xyz image.
Remarks
depth_image must be of format K4A_IMAGE_FORMAT_DEPTH16.
The camera parameter tells the function what the perspective of the depth_image is. If the depth_image was captured directly from the depth camera, the value should be K4A_CALIBRATION_TYPE_DEPTH. If the 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.
The format of xyz_image must be K4A_IMAGE_FORMAT_CUSTOM. The width and height of xyz_image must match the width and height of depth_image. xyz_image must have a stride in bytes of at least 6 times its width in pixels.
Each pixel of the 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.
xyz_image should be created by the caller using k4a_image_create() or k4a_image_create_from_buffer().
Returns
K4A_RESULT_SUCCEEDED if xyz_image was successfully written and K4A_RESULT_FAILED otherwise.