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 ObjectModel3D 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 calibrate_cameras). The Pose describes the position and orientation of the world coordinate system with respect to the camera coordinate system.
The X-, Y-, and Z-coordinates 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 and can be queried from get_object_model_3d_params with 'mapping_size'.
This transformation mode is faster than 'cartesian'. It is suitable, 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'
Pose of the 3D object model.
Number of elements: Pose == 0 || Pose == 7 || Pose == 12
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.