Function rs2_calculate_target_z_cpp

Function Documentation

float rs2_calculate_target_z_cpp(rs2_device *device, rs2_frame_queue *queue1, rs2_frame_queue *queue2, rs2_frame_queue *queue3, float target_width, float target_height, rs2_update_progress_callback *callback, rs2_error **error)

Calculate Z for calibration target - distance to the target’s plane

Parameters:
  • queue1-3[in] A frame queue of raw images used to calculate and extract the distance to a predefined target pattern. For D400 the indexes 1-3 correspond to Left IR, Right IR and Depth with only the Left IR being used

  • target_width[in] Expected target’s horizontal dimension in mm

  • target_height[in] Expected target’s vertical dimension in mm

  • callback[in] Optional callback for reporting progress status

Returns:

Calculated distance (Z) to target in millimeter, or negative number if failed