contour_to_world_plane_xldT_contour_to_world_plane_xldContourToWorldPlaneXldContourToWorldPlaneXld — Transform an XLD contour into the plane z=0 of a world coordinate system.
With the parameter ScaleScaleScaleScalescale you can scale the resulting 3D
coordinates.
The parameter ScaleScaleScaleScalescale 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'"m""m""m""m", 'cm'"cm""cm""cm""cm", 'mm'"mm""mm""mm""mm" or
'um'"um""um""um""um" for the parameter ScaleScaleScaleScalescale.
Internally, the operator first computes the line of sight between the
projection center and the image point in the camera coordinate system,
taking into account the radial distortions.
The line of sight is then transformed
into the world coordinate system specified in WorldPoseWorldPoseWorldPoseWorldPoseworldPose. By
intersecting the plane z=0 with the line of sight the 3D coordinates of the
transformed contour ContoursTransContoursTransContoursTransContoursTranscontoursTrans are obtained.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
* Perform camera calibration (with standard calibration plate).
calibrate_cameras (CalibDataID, Error)
get_calib_data (CalibDataID, 'camera', 0, 'params', CamParam)
* Get reference pose (pose 2 of calibration object 0).
get_calib_data (CalibDataID, 'calib_obj_pose', [0,2], 'pose', WorldPose)
* Compensate thickness of plate.
set_origin_pose(ObjInCameraPose, 0, 0, 0.0006, WorldPose)
* Transform contours into world coordinate system (unit mm).
contour_to_world_plane_xld(Contours, ContoursTrans, CamParam, \
WorldPose, 'mm')
Result
contour_to_world_plane_xldcontour_to_world_plane_xldContourToWorldPlaneXldContourToWorldPlaneXldContourToWorldPlaneXld returns 2 (H_MSG_TRUE) if all parameter values
are correct. If necessary, an exception is raised.