Skip to content

Performing the measurement🔗

A sheet-of-light measurement is applied to get height information for the object to measure. This height information is presented by a disparity image in which each row contains the disparities of one measured profile of the object, by the images X, Y, and Z that express the x, y, and z coordinates of the measured profiles as values of pixels within images, or by a 3D object model that contains the coordinates of the object’s 3D points and the corresponding 2D mapping. The images X, Y, and Z as well as the 3D object model can be obtained only for a calibrated measurement setup, whereas the disparity image can be obtained also for the uncalibrated case.

A sheet-of-light measurement consists of the following basic steps:

  1. Calibrate the measurement setup (if a calibrated measurement is needed) as described in the previous section.
  2. Create a sheet-of-light model with create_sheet_of_light_model and set additional parameters with successive calls to set_sheet_of_light_param.
  3. Acquire images for each profile to measure, e.g., using grab_image_async.
  4. Measure the profile of each image with measure_profile_sheet_of_light.
  5. Get the results of the measurement with successive calls to get_sheet_of_light_result or, if a 3D object model is required, with a single call to get_sheet_of_light_result_object_model_3d.
  6. If only the uncalibrated case was applied and a disparity image was obtained, but the x, y, and z coordinates or the 3D object model are still needed, you can subsequently apply a calibration. Then, you have to calibrate the measurement setup like described in the previous section and add the obtained camera parameters to the model with set_sheet_of_light_param. Afterwards you call the operator apply_sheet_of_light_calibration with the disparity image and the adapted sheet-of-light model. The resulting images that contain the coordinates X, Y, and Z or the 3D object model are queried from the model with get_sheet_of_light_result or get_sheet_of_light_result_object_model_3d, respectively. How to subsequently apply a sheet-of-light calibration to a disparity image is shown in the HDevelop example program CalibrateSheetOfLightDev.

Optionally, you can query all parameters that you have already set for a specific model or that were set by default using get_sheet_of_light_param. To query all parameters that can be set for a sheet-of-light model you call query_sheet_of_light_params.