ClassesClassesClassesClasses | | | | Operators

object_model_3d_to_xyzT_object_model_3d_to_xyzObjectModel3dToXyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyz (Operator)

Name

object_model_3d_to_xyzT_object_model_3d_to_xyzObjectModel3dToXyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyz — Transform 3D points from a 3D object model to images.

Signature

object_model_3d_to_xyz( : X, Y, Z : ObjectModel3D, Type, CamParam, Pose : )

Herror T_object_model_3d_to_xyz(Hobject* X, Hobject* Y, Hobject* Z, const Htuple ObjectModel3D, const Htuple Type, const Htuple CamParam, const Htuple Pose)

Herror object_model_3d_to_xyz(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 HTuple& Type, const HTuple& CamParam, const HTuple& Pose) const

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 HTuple& CamParam, const HPose& Pose) const

HImage HObjectModel3D::ObjectModel3dToXyz(HImage* Y, HImage* Z, const char* Type, const HTuple& CamParam, const HPose& Pose) const

void HOperatorSetX.ObjectModel3dToXyz(
[out] IHUntypedObjectX*X, [out] IHUntypedObjectX*Y, [out] IHUntypedObjectX*Z, [in] VARIANT ObjectModel3D, [in] VARIANT Type, [in] VARIANT CamParam, [in] VARIANT Pose)

IHImageX* HObjectModel3DX.ObjectModel3dToXyz(
[out] IHImageX*Y, [out] IHImageX*Z, [in] BSTR Type, [in] VARIANT CamParam, [in] VARIANT Pose)

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, HTuple camParam, HPose pose)

Description

The operator object_model_3d_to_xyzobject_model_3d_to_xyzObjectModel3dToXyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyz transforms the 3D points of the 3D object model ObjectModel3DObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D into the three images XXXXXx, YYYYYy, and ZZZZZz.

Two transformation modes are possible. The parameter TypeTypeTypeTypeTypetype is used to select one of them:

'cartesian'"cartesian""cartesian""cartesian""cartesian""cartesian":

First, each point is transformed into the camera coordinate system using the given PosePosePosePosePosepose. Then, these coordinates are projected into the image coordinate system based on the internal camera parameters CamParamCamParamCamParamCamParamCamParamcamParam.

The internal camera parameters CamParamCamParamCamParamCamParamCamParamcamParam describe the projection characteristics of the camera (see write_cam_parwrite_cam_parWriteCamParwrite_cam_parWriteCamParWriteCamPar). The PosePosePosePosePosepose 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.

'from_xyz_map'"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_3dxyz_to_object_model_3dXyzToObjectModel3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3d. 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 CamParamCamParamCamParamCamParamCamParamcamParam and PosePosePosePosePosepose 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_3dxyz_to_object_model_3dXyzToObjectModel3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3d to create the 3D object model.

This transformation mode is faster than 'cartesian'"cartesian""cartesian""cartesian""cartesian""cartesian". It is suitable, e.g., to visualize the results of a segmentation done with segment_object_model_3dsegment_object_model_3dSegmentObjectModel3dsegment_object_model_3dSegmentObjectModel3dSegmentObjectModel3d.

Parallelization

Parameters

XXXXXx (output_object)  singlechannelimage objectHImageHImageHImageHImageXHobject * (real)

Image with the X-Coordinates of the 3D points.

YYYYYy (output_object)  singlechannelimage objectHImageHImageHImageHImageXHobject * (real)

Image with the Y-Coordinates of the 3D points.

ZZZZZz (output_object)  singlechannelimage objectHImageHImageHImageHImageXHobject * (real)

Image with the Z-Coordinates of the 3D points.

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D (input_control)  object_model_3d HObjectModel3D, HTupleHTupleHObjectModel3D, HTupleHObjectModel3DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the 3D object model.

TypeTypeTypeTypeTypetype (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Type of the conversion.

Default value: 'cartesian' "cartesian" "cartesian" "cartesian" "cartesian" "cartesian"

List of values: 'cartesian'"cartesian""cartesian""cartesian""cartesian""cartesian", 'from_xyz_map'"from_xyz_map""from_xyz_map""from_xyz_map""from_xyz_map""from_xyz_map"

CamParamCamParamCamParamCamParamCamParamcamParam (input_control)  number-array HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Camera parameters.

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

PosePosePosePosePosepose (input_control)  pose HPose, HTupleHTupleHTupleHPoseX, VARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (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_xyzobject_model_3d_to_xyzObjectModel3dToXyzobject_model_3d_to_xyzObjectModel3dToXyzObjectModel3dToXyz returns the value 2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception will be raised.

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dread_object_model_3dReadObjectModel3dReadObjectModel3d, xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3d

Alternatives

project_object_model_3dproject_object_model_3dProjectObjectModel3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3d

See also

xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3d, get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParams

Module

3D Metrology


ClassesClassesClassesClasses | | | | Operators