ClassesClassesClassesClasses | | | | Operators

apply_sheet_of_light_calibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibration (Operator)

Name

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

Signature

apply_sheet_of_light_calibration(Disparity : : SheetOfLightModelID : )

Herror apply_sheet_of_light_calibration(const Hobject Disparity, const Hlong SheetOfLightModelID)

Herror T_apply_sheet_of_light_calibration(const Hobject Disparity, const Htuple SheetOfLightModelID)

Herror apply_sheet_of_light_calibration(Hobject Disparity, const HTuple& SheetOfLightModelID)

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

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

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

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

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

void HOperatorSetX.ApplySheetOfLightCalibration(
[in] IHUntypedObjectX* Disparity, [in] VARIANT SheetOfLightModelID)

void HImageX.ApplySheetOfLightCalibration([in] IHSheetOfLightModelX* SheetOfLightModelID)

void HSheetOfLightModelX.ApplySheetOfLightCalibration([in] IHImageX* Disparity)

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

void HImage.ApplySheetOfLightCalibration(HSheetOfLightModel sheetOfLightModelID)

void HSheetOfLightModel.ApplySheetOfLightCalibration(HImage disparity)

Description

The operator apply_sheet_of_light_calibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibration reads the disparity image DisparityDisparityDisparityDisparityDisparitydisparity, stores it to the sheet-of-light model specified by SheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDsheetOfLightModelID 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_resultGetSheetOfLightResultget_sheet_of_light_resultGetSheetOfLightResultGetSheetOfLightResult. The corresponding 3D object model can be retrieved with get_sheet_of_light_result_object_model_3dget_sheet_of_light_result_object_model_3dGetSheetOfLightResultObjectModel3dget_sheet_of_light_result_object_model_3dGetSheetOfLightResultObjectModel3dGetSheetOfLightResultObjectModel3d.

The disparity image DisparityDisparityDisparityDisparityDisparitydisparity may have been acquired previously by using the operator measure_profile_sheet_of_lightmeasure_profile_sheet_of_lightMeasureProfileSheetOfLightmeasure_profile_sheet_of_lightMeasureProfileSheetOfLightMeasureProfileSheetOfLight 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_paramSetSheetOfLightParamset_sheet_of_light_paramSetSheetOfLightParamSetSheetOfLightParam:

'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_paramSetSheetOfLightParamset_sheet_of_light_paramSetSheetOfLightParamSetSheetOfLightParam 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 thecoordinates 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.

Attention

This operator changes the data in the handle. Therefore one and the same sheet-of-light model cannot be used concurrently in different threads when using this operator. If you want to use the same handle in multiple threads you have to synchronize the threads to assure that they do not access the same handle simultaneously. Different sheet-of-light models can be used independently and safely in different threads.

Parallelization

Parameters

DisparityDisparityDisparityDisparityDisparitydisparity (input_object)  singlechannelimage objectHImageHImageHImageHImageXHobject (real)

Height or range image to be calibrated.

SheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDSheetOfLightModelIDsheetOfLightModelID (input_control)  sheet_of_light_model HSheetOfLightModel, HTupleHTupleHSheetOfLightModel, HTupleHSheetOfLightModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

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')
*
* Clear the sheet-of-light model
clear_sheet_of_light_model (SheetOfLightModelID)

Result

The operator apply_sheet_of_light_calibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationapply_sheet_of_light_calibrationApplySheetOfLightCalibrationApplySheetOfLightCalibration returns the value 2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception will be raised.

Possible Successors

get_sheet_of_light_resultget_sheet_of_light_resultGetSheetOfLightResultget_sheet_of_light_resultGetSheetOfLightResultGetSheetOfLightResult, get_sheet_of_light_result_object_model_3dget_sheet_of_light_result_object_model_3dGetSheetOfLightResultObjectModel3dget_sheet_of_light_result_object_model_3dGetSheetOfLightResultObjectModel3dGetSheetOfLightResultObjectModel3d

Module

3D Metrology


ClassesClassesClassesClasses | | | | Operators