object_model_3d_to_xyz T_object_model_3d_to_xyz ObjectModel3dToXyz ObjectModel3dToXyz (Operator)
Name
object_model_3d_to_xyz T_object_model_3d_to_xyz ObjectModel3dToXyz ObjectModel3dToXyz
— Transform 3D points from a 3D object model to images.
Signature
void ObjectModel3dToXyz (HObject* X , HObject* Y , HObject* Z , const HTuple& ObjectModel3D , const HTuple& Type , const HTuple& CamParam , const HTuple& Pose )
HImage HObjectModel3D ::ObjectModel3dToXyz (HImage* Y , HImage* Z , const HString& Type , const HCamPar& CamParam , const HPose& Pose ) const
HImage HObjectModel3D ::ObjectModel3dToXyz (HImage* Y , HImage* Z , const char* Type , const HCamPar& CamParam , const HPose& Pose ) const
HImage HObjectModel3D ::ObjectModel3dToXyz (HImage* Y , HImage* Z , const wchar_t* Type , const HCamPar& CamParam , const HPose& Pose ) const
(Windows only)
HImage HCamPar ::ObjectModel3dToXyz (HImage* Y , HImage* Z , const HObjectModel3D& ObjectModel3D , const HString& Type , const HPose& Pose ) const
HImage HCamPar ::ObjectModel3dToXyz (HImage* Y , HImage* Z , const HObjectModel3D& ObjectModel3D , const char* Type , const HPose& Pose ) const
HImage HCamPar ::ObjectModel3dToXyz (HImage* Y , HImage* Z , const HObjectModel3D& ObjectModel3D , const wchar_t* Type , const HPose& Pose ) const
(Windows only)
static void HOperatorSet .ObjectModel3dToXyz (out HObject x , out HObject y , out HObject z , HTuple objectModel3D , HTuple type , HTuple camParam , HTuple pose )
HImage HObjectModel3D .ObjectModel3dToXyz (out HImage y , out HImage z , string type , HCamPar camParam , HPose pose )
HImage HCamPar .ObjectModel3dToXyz (out HImage y , out HImage z , HObjectModel3D objectModel3D , string type , HPose pose )
Description
The operator object_model_3d_to_xyz object_model_3d_to_xyz ObjectModel3dToXyz ObjectModel3dToXyz ObjectModel3dToXyz
transforms the 3D points of
the 3D object model ObjectModel3D ObjectModel3D ObjectModel3D ObjectModel3D objectModel3D
into the three images
X X X X x
, Y Y Y Y y
, and Z Z Z Z z
.
Two transformation modes are possible. The parameter Type Type Type Type type
is
used to select one of them:
'cartesian' "cartesian" "cartesian" "cartesian" "cartesian" :
First, each point is transformed into the camera coordinate system
using the given Pose Pose Pose Pose pose
. Then, these coordinates are projected
into the image coordinate system based on the internal camera parameters
CamParam CamParam CamParam CamParam camParam
.
The internal camera parameters CamParam CamParam CamParam CamParam camParam
describe the
projection characteristics of the camera (see
Calibration / Multi-View ).
The Pose Pose Pose Pose 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.
'from_xyz_map' "from_xyz_map" "from_xyz_map" "from_xyz_map" "from_xyz_map" :
This transformation mode works only if the 3D object model was created
with the operator xyz_to_object_model_3d xyz_to_object_model_3d XyzToObjectModel3d XyzToObjectModel3d XyzToObjectModel3d
.
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 CamParam CamParam CamParam camParam
and Pose Pose Pose Pose 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 xyz_to_object_model_3d XyzToObjectModel3d XyzToObjectModel3d XyzToObjectModel3d
to
create the 3D object model and can be queried from
get_object_model_3d_params get_object_model_3d_params GetObjectModel3dParams GetObjectModel3dParams GetObjectModel3dParams
with 'mapping_size' "mapping_size" "mapping_size" "mapping_size" "mapping_size" .
This transformation mode is faster than 'cartesian' "cartesian" "cartesian" "cartesian" "cartesian" .
It is suitable, e.g., to visualize the results of a segmentation done with
segment_object_model_3d segment_object_model_3d SegmentObjectModel3d SegmentObjectModel3d SegmentObjectModel3d
.
Attention
Cameras with hypercentric lenses are not supported.
Execution Information
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
Multithreading scope: global (may be called from any thread).
Processed without parallelization.
Parameters
X X X X x
(output_object) singlechannelimage →
object HImage HImage Hobject * (real)
Image with the X-Coordinates of the 3D points.
Y Y Y Y y
(output_object) singlechannelimage →
object HImage HImage Hobject * (real)
Image with the Y-Coordinates of the 3D points.
Z Z Z Z z
(output_object) singlechannelimage →
object HImage HImage Hobject * (real)
Image with the Z-Coordinates of the 3D points.
ObjectModel3D ObjectModel3D ObjectModel3D ObjectModel3D objectModel3D
(input_control) object_model_3d →
HObjectModel3D , HTuple HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
Handle of the 3D object model.
Type Type Type Type type
(input_control) string →
HTuple HTuple Htuple (string) (string ) (HString ) (char* )
Type of the conversion.
Default value:
'cartesian'
"cartesian"
"cartesian"
"cartesian"
"cartesian"
List of values: 'cartesian' "cartesian" "cartesian" "cartesian" "cartesian" , 'from_xyz_map' "from_xyz_map" "from_xyz_map" "from_xyz_map" "from_xyz_map"
CamParam CamParam CamParam CamParam camParam
(input_control) campar →
HCamPar , HTuple HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Camera parameters.
Pose Pose Pose Pose pose
(input_control) pose →
HPose , HTuple HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Pose of the 3D object model.
Number of elements: Pose == 0 || Pose == 7 || Pose == 12
Result
The operator object_model_3d_to_xyz object_model_3d_to_xyz ObjectModel3dToXyz ObjectModel3dToXyz ObjectModel3dToXyz
returns the value
2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception
will be raised.
Possible Predecessors
read_object_model_3d read_object_model_3d ReadObjectModel3d ReadObjectModel3d ReadObjectModel3d
,
xyz_to_object_model_3d xyz_to_object_model_3d XyzToObjectModel3d XyzToObjectModel3d XyzToObjectModel3d
Alternatives
project_object_model_3d project_object_model_3d ProjectObjectModel3d ProjectObjectModel3d ProjectObjectModel3d
See also
xyz_to_object_model_3d xyz_to_object_model_3d XyzToObjectModel3d XyzToObjectModel3d XyzToObjectModel3d
,
get_object_model_3d_params get_object_model_3d_params GetObjectModel3dParams GetObjectModel3dParams GetObjectModel3dParams
Module
3D Metrology