Operators

project_3d_point (Operator)

Name

project_3d_point — Project 3D points into (sub-)pixel image coordinates.

Signature

project_3d_point( : : X, Y, Z, CameraParam : Row, Column)

Description

project_3d_point projects one or more 3D points (with coordinates X, Y, and Z) into the image plane (in pixels) and returns the result in Row and Column. The coordinates X, Y, and Z are given in the camera coordinate system, i.e., they describe the position of the points relative to the camera.

The internal camera parameters CameraParam describe the projection characteristics of the camera (see calibrate_cameras for details).

Parallelization

• Multithreading type: reentrant (runs in parallel with non-exclusive operators).
• Processed without parallelization.

Parameters

X (input_control)  point3d.x-array (real)

X coordinates of the 3D points to be projected in the camera coordinate system.

Y (input_control)  point3d.y-array (real)

Y coordinates of the 3D points to be projected in the camera coordinate system.

Z (input_control)  point3d.z-array (real)

Z coordinates of the 3D points to be projected in the camera coordinate system.

CameraParam (input_control)  number-array (real / integer)

Internal camera parameters.

Number of elements: CameraParam == 8 || CameraParam == 10 || CameraParam == 11 || CameraParam == 12 || CameraParam == 14

Row (output_control)  point.y-array (real)

Row coordinates of the projected points (in pixels).

Column (output_control)  point.x-array (real)

Column coordinates of the projected points (in pixels).

Example (HDevelop)

```*  read pose of the world coordinate system in camera coordinates
*  convert pose into transformation matrix
pose_to_hom_mat3d(WorldPose, HomMat3D)
*  transform 3D points from world into the camera coordinate system
affine_trans_point_3d(HomMat3D, [3.0, 3.2], [4.5, 4.5], [5.8, 6.2], X, Y, Z)
* project 3D points into image
project_3d_point(X, Y, Z, CameraParam, Row, Column)
```

Result

project_3d_point returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.