apply_sheet_of_light_calibrationT_apply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibration (Operator)

Name

apply_sheet_of_light_calibrationT_apply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibration — Apply the calibration transformations to the input disparity image.

Signature

apply_sheet_of_light_calibration(Disparity : : SheetOfLightModelID : )

Herror T_apply_sheet_of_light_calibration(const Hobject Disparity, const Htuple SheetOfLightModelID)

void ApplySheetOfLightCalibration(const HObject& Disparity, const HTuple& SheetOfLightModelID)

void HImage::ApplySheetOfLightCalibration(const HSheetOfLightModel& SheetOfLightModelID) const

void HSheetOfLightModel::ApplySheetOfLightCalibration(const HImage& Disparity) const

static void HOperatorSet.ApplySheetOfLightCalibration(HObject disparity, HTuple sheetOfLightModelID)

void HImage.ApplySheetOfLightCalibration(HSheetOfLightModel sheetOfLightModelID)

void HSheetOfLightModel.ApplySheetOfLightCalibration(HImage disparity)

def apply_sheet_of_light_calibration(disparity: HObject, sheet_of_light_model_id: HHandle) -> None

Description

The operator apply_sheet_of_light_calibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibration reads the disparity image DisparityDisparityDisparityDisparitydisparitydisparity, stores it to the sheet-of-light model specified by SheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDsheetOfLightModelIDsheet_of_light_model_id and applies the calibration transformation to this image, in order to compute the calibrated coordinates of the reconstructed 3D surface points. The resulting calibrated coordinates can be retrieved from the model by using the operator get_sheet_of_light_resultget_sheet_of_light_resultGetSheetOfLightResultGetSheetOfLightResultGetSheetOfLightResultget_sheet_of_light_result. The corresponding 3D object model can be retrieved with get_sheet_of_light_result_object_model_3dget_sheet_of_light_result_object_model_3dGetSheetOfLightResultObjectModel3dGetSheetOfLightResultObjectModel3dGetSheetOfLightResultObjectModel3dget_sheet_of_light_result_object_model_3d. Note that prior to the next call of apply_sheet_of_light_calibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibration for a disparity image of smaller height, reset_sheet_of_light_modelreset_sheet_of_light_modelResetSheetOfLightModelResetSheetOfLightModelResetSheetOfLightModelreset_sheet_of_light_model should be called.

The disparity image DisparityDisparityDisparityDisparitydisparitydisparity may have been acquired previously by using the operator measure_profile_sheet_of_lightmeasure_profile_sheet_of_lightMeasureProfileSheetOfLightMeasureProfileSheetOfLightMeasureProfileSheetOfLightmeasure_profile_sheet_of_light or by an image acquisition device, which directly provides disparity values and works according to the sheet-of-light technique.

In order to compute the calibrated coordinates, the parameters listed below must have been set for the sheet-of-light model with the help of the operator set_sheet_of_light_paramset_sheet_of_light_paramSetSheetOfLightParamSetSheetOfLightParamSetSheetOfLightParamset_sheet_of_light_param:

'calibration'"calibration""calibration""calibration""calibration""calibration":

extent of the calibration transformation which shall be applied to the disparity image. 'calibration'"calibration""calibration""calibration""calibration""calibration" must be set to 'xz'"xz""xz""xz""xz""xz", 'xyz'"xyz""xyz""xyz""xyz""xyz" or 'offset_scale'"offset_scale""offset_scale""offset_scale""offset_scale""offset_scale". Refer to set_sheet_of_light_paramset_sheet_of_light_paramSetSheetOfLightParamSetSheetOfLightParamSetSheetOfLightParamset_sheet_of_light_param for details on this parameter.

'camera_parameter'"camera_parameter""camera_parameter""camera_parameter""camera_parameter""camera_parameter":

the internal parameters of the camera used for the measurement. This pose is required when the calibration extent has been set to 'xyz'"xyz""xyz""xyz""xyz""xyz" or 'xz'"xz""xz""xz""xz""xz".

'camera_pose'"camera_pose""camera_pose""camera_pose""camera_pose""camera_pose":

the pose of the world coordinate system relative to the camera coordinate system. This pose is required when the calibration extent has been set to 'xyz'"xyz""xyz""xyz""xyz""xyz" or 'xz'"xz""xz""xz""xz""xz".

'lightplane_pose'"lightplane_pose""lightplane_pose""lightplane_pose""lightplane_pose""lightplane_pose":

the pose of the light-plane coordinate system relative to the world coordinate system. The light-plane coordinate system must be chosen so that its plane z=0 coincides with the light plane described by the light line projector. This pose is required when the calibration extent has been set to 'xyz'"xyz""xyz""xyz""xyz""xyz" or 'xz'"xz""xz""xz""xz""xz".

'movement_pose'"movement_pose""movement_pose""movement_pose""movement_pose""movement_pose":

a pose representing the movement of the object between two successive profile images with respect to the measurement system built by the camera and the laser. This pose is required when the calibration extent has been set to 'xyz'"xyz""xyz""xyz""xyz""xyz". It is ignored when the calibration extent has been set to 'xz'"xz""xz""xz""xz""xz".

'scale'"scale""scale""scale""scale""scale":

with this parameter you can scale the 3D coordinates X, Y and Z that result when applying the calibration transformations to the disparity image. 'scale'"scale""scale""scale""scale""scale" must be specified as the ratio desired unit/original unit. The original unit is determined by the coordinates of the calibration object. If the original unit is meters (which is the case if you use the standard calibration plate), you can set the desired unit directly by selecting 'm', 'cm', 'mm' or 'um' for the parameter Scale. By default, 'scale'"scale""scale""scale""scale""scale" is set to 1.0.

Execution Information

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

DisparityDisparityDisparityDisparitydisparitydisparity (input_object)  singlechannelimage objectHImageHObjectHImageHobject (real)

Height or range image to be calibrated.

SheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDsheetOfLightModelIDsheet_of_light_model_id (input_control, state is modified)  sheet_of_light_model HSheetOfLightModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the sheet-of-light model.

Example (HDevelop)

* ...
* Read an already acquired disparity map from file
read_image (Disparity, 'sheet_of_light/connection_rod_disparity.tif')
*
* Create a model and set the required parameters
gen_rectangle1 (ProfileRegion, 120, 75, 195, 710)
create_sheet_of_light_model (ProfileRegion, ['min_gray','num_profiles', \
                             'ambiguity_solving'], [70,290,'first'], \
                              SheetOfLightModelID)
set_sheet_of_light_param (SheetOfLightModelID, 'calibration', 'xyz')
set_sheet_of_light_param (SheetOfLightModelID, 'scale', 'mm')
set_sheet_of_light_param (SheetOfLightModelID, 'camera_parameter', \
                          CameraParameter)
set_sheet_of_light_param (SheetOfLightModelID, 'camera_pose', CameraPose)
set_sheet_of_light_param (SheetOfLightModelID, 'lightplane_pose', \
                          LightPlanePose)
set_sheet_of_light_param (SheetOfLightModelID, 'movement_pose', \
                          MovementPose)
*
* Apply the calibration transforms and
* get the resulting calibrated coordinates
apply_sheet_of_light_calibration (Disparity, SheetOfLightModelID)
get_sheet_of_light_result (X, SheetOfLightModelID, 'x')
get_sheet_of_light_result (Y, SheetOfLightModelID, 'y')
get_sheet_of_light_result (Z, SheetOfLightModelID, 'z')
*

Result

The operator apply_sheet_of_light_calibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibration returns the value TRUE if the given parameters are correct. Otherwise, an exception will be raised.

Possible Successors

get_sheet_of_light_resultget_sheet_of_light_resultGetSheetOfLightResultGetSheetOfLightResultGetSheetOfLightResultget_sheet_of_light_result, get_sheet_of_light_result_object_model_3dget_sheet_of_light_result_object_model_3dGetSheetOfLightResultObjectModel3dGetSheetOfLightResultObjectModel3dGetSheetOfLightResultObjectModel3dget_sheet_of_light_result_object_model_3d

Module

3D Metrology