object_model_3d_to_xyz — Transform 3D points from a 3D object model to images.
object_model_3d_to_xyz transforms the 3D points of
the 3D object model
ObjectModel3D into the three images
Two transformation modes are possible. The parameter
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
The internal camera parameters
CamParam describe the
projection characteristics of the camera (see
Calibration / Multi-View).
Pose is in the form ,
where ccs denotes camera coordinate system and
mcs the model coordinate system (which is a 3D world coordinate
system), see Transformations / Poses and
“Solution Guide III-C - 3D Vision”.
Hence, it describes the
position and orientation of the model coordinate system relative
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
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.
Pose are ignored.
The dimensions of the returned images are equal to the dimensions of the
original images that were used with
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
Cameras with hypercentric lenses are not supported.
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'
→(real / integer / string)
→(real / integer)
Pose of the 3D object model.
Number of elements: Pose == 0 || Pose == 7 || Pose == 12
object_model_3d_to_xyz returns the value
2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception
will be raised.