Azure Kinect Sensor SDK  refs/heads/master
Documentation for

◆ k4a_transformation_depth_image_to_color_camera_custom()

k4a_result_t k4a_transformation_depth_image_to_color_camera_custom ( k4a_transformation_t  transformation_handle,
const k4a_image_t  depth_image,
const k4a_image_t  custom_image,
k4a_image_t  transformed_depth_image,
k4a_image_t  transformed_custom_image,
k4a_transformation_interpolation_type_t  interpolation_type,
uint32_t  invalid_custom_value 

Transforms depth map and a custom image into the geometry of the color camera.

transformation_handleTransformation handle.
depth_imageHandle to input depth image.
custom_imageHandle to input custom image.
transformed_depth_imageHandle to output transformed depth image.
transformed_custom_imageHandle to output transformed custom image.
interpolation_typeParameter that controls how pixels in custom_image should be interpolated when transformed to color camera space. K4A_TRANSFORMATION_INTERPOLATION_TYPE_LINEAR if linear interpolation should be used. K4A_TRANSFORMATION_INTERPOLATION_TYPE_NEAREST if nearest neighbor interpolation should be used.
invalid_custom_valueDefines the custom image pixel value that should be written to transformed_custom_image in case the corresponding depth pixel can not be transformed into the color camera space.
This produces a depth image and a corresponding custom image for which each pixel matches the corresponding pixel coordinates of the color camera.
depth_image and transformed_depth_image must be of format K4A_IMAGE_FORMAT_DEPTH16.
custom_image and transformed_custom_image must be of format K4A_IMAGE_FORMAT_CUSTOM8 or K4A_IMAGE_FORMAT_CUSTOM16.
transformed_depth_image and transformed_custom_image must have a width and height matching the width and height of the color camera in the mode specified by the k4a_calibration_t used to create the transformation_handle with k4a_transformation_create().
custom_image must have a width and height matching the width and height of depth_image.
The contents transformed_depth_image will be filled with the depth values derived from depth_image in the color camera's coordinate space.
The contents transformed_custom_image will be filled with the values derived from custom_image in the color camera's coordinate space.
transformed_depth_image and transformed_custom_image should be created by the caller using k4a_image_create() or k4a_image_create_from_buffer().
Using linear interpolation could create new values to transformed_custom_image which do no exist in custom_image. Setting use_linear_interpolation to false will prevent this from happenning but will result in less smooth image.
K4A_RESULT_SUCCEEDED if transformed_depth_image and transformed_custom_image were successfully written and K4A_RESULT_FAILED otherwise.