HALCON Reference Manual 10.0.2
Table of Contents / 3D Matching / Shape-Based ClassesClassesClasses | | | Operators

project_shape_model_3dT_project_shape_model_3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3d (Operator)

Name

project_shape_model_3dT_project_shape_model_3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3d — Project the edges of a 3D shape model into image coordinates.

Signature

project_shape_model_3d( : ModelContours : ShapeModel3DID, CamParam, Pose, HiddenSurfaceRemoval, MinFaceAngle : )

Herror T_project_shape_model_3d(Hobject* ModelContours, const Htuple ShapeModel3DID, const Htuple CamParam, const Htuple Pose, const Htuple HiddenSurfaceRemoval, const Htuple MinFaceAngle)

Herror project_shape_model_3d(Hobject* ModelContours, const HTuple& ShapeModel3DID, const HTuple& CamParam, const HTuple& Pose, const HTuple& HiddenSurfaceRemoval, const HTuple& MinFaceAngle)

HXLDContArray HShapeModel3D::ProjectShapeModel3d(const HTuple& CamParam, const HTuple& Pose, const HTuple& HiddenSurfaceRemoval, const HTuple& MinFaceAngle) const

void HOperatorSetX.ProjectShapeModel3d(
[out] IHUntypedObjectX*ModelContours, [in] VARIANT ShapeModel3DID, [in] VARIANT CamParam, [in] VARIANT Pose, [in] VARIANT HiddenSurfaceRemoval, [in] VARIANT MinFaceAngle)

IHXLDContX* HShapeModel3DX.ProjectShapeModel3d(
[in] VARIANT CamParam, [in] VARIANT Pose, [in] BSTR HiddenSurfaceRemoval, [in] VARIANT MinFaceAngle)

static void HOperatorSet.ProjectShapeModel3d(out HObject modelContours, HTuple shapeModel3DID, HTuple camParam, HTuple pose, HTuple hiddenSurfaceRemoval, HTuple minFaceAngle)

HXLDCont HShapeModel3D.ProjectShapeModel3d(HTuple camParam, HPose pose, string hiddenSurfaceRemoval, HTuple minFaceAngle)

HXLDCont HShapeModel3D.ProjectShapeModel3d(HTuple camParam, HPose pose, string hiddenSurfaceRemoval, double minFaceAngle)

Description

The operator project_shape_model_3dproject_shape_model_3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3d projects the edges of the 3D object model that was used to create the 3D shape model ShapeModel3DIDShapeModel3DIDShapeModel3DIDShapeModel3DIDshapeModel3DID into the image coordinate system and returns the projected edges in ModelContoursModelContoursModelContoursModelContoursmodelContours. The coordinates of the 3D object model are given in the 3D world coordinate system. First, they are transformed into the camera coordinate system using the given PosePosePosePosepose. Then, these coordinates are projected into the image coordinate system based on the internal camera parameters CamParamCamParamCamParamCamParamcamParam.

The internal camera parameters CamParamCamParamCamParamCamParamcamParam describe the projection characteristics of the camera (see write_cam_parwrite_cam_parwrite_cam_parWriteCamParWriteCamPar). The PosePosePosePosepose describes the position and orientation of the world coordinate system with respect to the camera coordinate system.

The parameter HiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalhiddenSurfaceRemoval can be used to switch on or to switch off the removal of hidden surfaces. If HiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalhiddenSurfaceRemoval is set to 'true'"true""true""true""true", only those projected edges are returned that are not hidden by faces of the 3D object model. If HiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalhiddenSurfaceRemoval is set to 'false'"false""false""false""false", all projected edges are returned. This is faster than a projection with HiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalhiddenSurfaceRemoval set to 'true'"true""true""true""true".

3D edges are only projected if the angle between the two 3D faces that are incident with the 3D edge is at least MinFaceAngleMinFaceAngleMinFaceAngleMinFaceAngleminFaceAngle. If MinFaceAngleMinFaceAngleMinFaceAngleMinFaceAngleminFaceAngle is set to 0.0, all edges are projected. If MinFaceAngleMinFaceAngleMinFaceAngleMinFaceAngleminFaceAngle is set to PI (equivalent to 180 degrees), only the silhouette of the 3D object model is returned. This parameter can be used to suppress edges within curved surfaces, e.g., the surface of a cylinder.

project_shape_model_3dproject_shape_model_3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3d and project_object_model_3dproject_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3d return the same result if the 3D object model that was used to create the 3D shape model is passed to project_object_model_3dproject_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3d.

project_shape_model_3dproject_shape_model_3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3d is especially useful in order to visualize the matches that are returned by find_shape_model_3dfind_shape_model_3dfind_shape_model_3dFindShapeModel3dFindShapeModel3d in the case that the underlying 3D object model is no longer available.

Parallelization

Parameters

ModelContoursModelContoursModelContoursModelContoursmodelContours (output_object)  xld_cont-array objectHXLDContHXLDContArrayHXLDContXHobject *

Contour representation of the model view.

ShapeModel3DIDShapeModel3DIDShapeModel3DIDShapeModel3DIDshapeModel3DID (input_control)  shape_model_3d HShapeModel3D, HTupleHShapeModel3D, HTupleHShapeModel3DX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Handle of the 3D shape model.

CamParamCamParamCamParamCamParamcamParam (input_control)  number-array HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Internal camera parameters.

Number of elements: (CamParam == 8) || (CamParam == 12)

PosePosePosePosepose (input_control)  pose-array HPose, HTupleHTupleHPoseX, VARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

3D pose of the 3D shape model in the world coordinate system.

HiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalHiddenSurfaceRemovalhiddenSurfaceRemoval (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Remove hidden surfaces?

Default value: 'true' "true" "true" "true" "true"

List of values: 'true'"true""true""true""true", 'false'"false""false""false""false"

MinFaceAngleMinFaceAngleMinFaceAngleMinFaceAngleminFaceAngle (input_control)  angle.rad HTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong)

Smallest face angle for which the edge is displayed

Default value: 0.523599

Suggested values: 0.17, 0.26, 0.35, 0.52

Result

If the parameters are valid, the operator project_shape_model_3dproject_shape_model_3dproject_shape_model_3dProjectShapeModel3dProjectShapeModel3d returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

create_shape_model_3dcreate_shape_model_3dcreate_shape_model_3dCreateShapeModel3dCreateShapeModel3d, read_shape_model_3dread_shape_model_3dread_shape_model_3dReadShapeModel3dReadShapeModel3d, get_shape_model_3d_paramsget_shape_model_3d_paramsget_shape_model_3d_paramsGetShapeModel3dParamsGetShapeModel3dParams, find_shape_model_3dfind_shape_model_3dfind_shape_model_3dFindShapeModel3dFindShapeModel3d

Alternatives

project_object_model_3dproject_object_model_3dproject_object_model_3dProjectObjectModel3dProjectObjectModel3d

See also

convert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherconvert_point_3d_cart_to_spherConvertPoint3dCartToSpherConvertPoint3dCartToSpher, convert_point_3d_spher_to_cartconvert_point_3d_spher_to_cartconvert_point_3d_spher_to_cartConvertPoint3dSpherToCartConvertPoint3dSpherToCart, create_cam_pose_look_at_pointcreate_cam_pose_look_at_pointcreate_cam_pose_look_at_pointCreateCamPoseLookAtPointCreateCamPoseLookAtPoint, trans_pose_shape_model_3dtrans_pose_shape_model_3dtrans_pose_shape_model_3dTransPoseShapeModel3dTransPoseShapeModel3d

Module

3D Metrology


Table of Contents / 3D Matching / Shape-Based ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH