| Table of Contents / 3D Tools / 3D Object Model | Operators |
object_model_3d_to_xyz — Transform 3D points from a 3D object model to images.
The operator object_model_3d_to_xyz transforms the 3D points of the 3D object model ObjectModel3DID into the three images X, Y, and Z.
Two transformation modes are possible. The parameter Type is used to select one of them:
First, each point is transformed into the camera coordinate system using the given Pose. Then, these coordinates are projected into the image coordinate system based on the internal camera parameters CamParam.
The internal camera parameters CamParam describe the projection characteristics of the camera (see write_cam_par). The Pose describes the position and orientation of the world coordinate system with respect to the camera coordinate system.
The X-, Y- and Z-coordinate of the transformed point are written into the corresponding image at the position of the projection. If multiple points are projected to the same image coordinates, the point with the smallest Z-value is written (hidden-point removal). The dimensions of the returned images are defined by the camera parameters.
The returned images show the object as it would look like when seeing it with the specified camera under the specified pose.
This transformation mode works only if the 3D object model was created with the operator xyz_to_object_model_3d. It writes each 3D point to the image coordinate where it originally came from, using the mapping attribute that is stored within the 3D object model.
The parameters CamParam and Pose are ignored. The dimensions of the returned images are equal to the dimensions of the original images that were used with xyz_to_object_model_3d to create the 3D object model.
This transformation mode is faster than 'cartesian'. It is useful, e.g., to visualize the results of a segmentation done with segment_object_model_3d.
Image with the X-Coordinates of the 3D points.
Image with the Y-Coordinates of the 3D points.
Image with the Z-Coordinates of the 3D points.
Handle of the 3D object model.
Type of the conversion.
Default value: 'cartesian'
List of values: 'cartesian', 'from_xyz_map'
Camera parameters.
Number of elements: (CamParam == 8) || (CamParam == 12)
Pose of the 3D object model.
Number of elements: Pose == 7
The operator object_model_3d_to_xyz returns the value 2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception will be raised.
read_object_model_3d, xyz_to_object_model_3d
3D Metrology
| Table of Contents / 3D Tools / 3D Object Model | Operators |
| HALCON Reference Manual 10.0.2 | Copyright © 1996-2011 MVTec Software GmbH |