Function rs2_run_tare_calibration

Function Documentation

const rs2_raw_data_buffer *rs2_run_tare_calibration(rs2_device *dev, float ground_truth_mm, const void *json_content, int content_size, float *health, rs2_update_progress_callback_ptr callback, void *client_data, int timeout_ms, rs2_error **error)

This will adjust camera absolute distance to flat target. User needs to enter the known ground truth.

Parameters:
  • ground_truth_mm[in] Ground truth in mm must be between 60 and 10000

  • json_content[in] Json string to configure tare calibration parameters: { “average_step_count”: 20, “step count”: 20, “accuracy”: 2, “scan parameter”: 0, “data sampling”: 0, “host assistance”: 0, “depth”: 0 } average step count - number of frames to average, must be between 1 - 30, default = 20 step count - max iteration steps, must be between 5 - 30, default = 10 accuracy - Subpixel accuracy level, value can be one of: Very high = 0 (0.025%), High = 1 (0.05%), Medium = 2 (0.1%), Low = 3 (0.2%), Default = Very high (0.025%), default is Medium scan_parameter - value can be one of: Py scan (default) = 0, Rx scan = 1 data_sampling - value can be one of:polling data sampling = 0, interrupt data sampling = 1 host_assistance: 0 for no assistance, 1 for starting with assistance, 2 for feeding host data to firmware depth: 0 for not relating to depth, > 0 for feeding depth from host to firmware, -1 for ending to feed depth from host to firmware if json is nullptr it will be ignored and calibration will use the default parameters

  • content_size[in] Json string size if its 0 the json will be ignored and calibration will use the default parameters

  • callback[in] Optional callback for update progress notifications, the progress value is normailzed to 1

  • client_data[in] Optional client data for the callback

  • timeout_ms[in] Timeout in ms (use 5000 msec unless instructed otherwise)

  • health[out] The health check numbers before and after calibration

Returns:

New calibration table