image_points_to_world_planeT_image_points_to_world_planeImagePointsToWorldPlaneImagePointsToWorldPlaneimage_points_to_world_plane — Transform image points into the plane z=0 of a world coordinate system.
The operator image_points_to_world_planeimage_points_to_world_planeImagePointsToWorldPlaneImagePointsToWorldPlaneimage_points_to_world_plane transforms image points
which are given in RowsRowsRowsrowsrows and ColsColsColscolscols into the plane z=0 in a
world coordinate system and returns their 3D coordinates in XXXxx and
YYYyy. The world coordinate system is chosen by passing its pose
relative to the camera coordinate system in WorldPoseWorldPoseWorldPoseworldPoseworld_pose.
Hence, latter one is expected in the form
, where
ccs denotes the camera coordinate system and
wcs the world coordinate system (see
Transformations / Poses
and “Solution Guide III-C - 3D Vision”).
In CameraParamCameraParamCameraParamcameraParamcamera_param you must pass the internal camera parameters
(see Calibration for the sequence of the parameters
and the underlying camera model).
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 contour points 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
WorldPoseWorldPoseWorldPoseworldPoseworld_pose. By intersecting the plane z=0 with the line of sight the
3D coordinates XXXxx and YYYyy are obtained.
It is recommended to use only those image points RowsRowsRowsrowsrows and
ColsColsColscolscols, that lie within the calibrated image size. The mathematical
model does only work well for image points, that lie within the calibration
range.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Y coordinates of the points in the world coordinate
system.
Example (HDevelop)
* 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 image points into world coordinate system (unit mm).
image_points_to_world_plane(CamParam, WorldPose, PointRows, PointColumns, \
'mm', PointXCoord, PointYCoord)
Result
image_points_to_world_planeimage_points_to_world_planeImagePointsToWorldPlaneImagePointsToWorldPlaneimage_points_to_world_plane returns 2 (
H_MSG_TRUE)
if all parameter values
are correct. If necessary, an exception is raised.