project_shape_model_3d — Project the edges of a 3D shape model into image coordinates.
project_shape_model_3d projects the edges of
the 3D object model that was used to create the 3D shape model
ShapeModel3DID into the image coordinate system and returns
the projected edges in
ModelContours. The coordinates of
the 3D object model are given in the 3D world coordinate
system (mcs). First, they are transformed into the camera
coordinate system (ccs) using the external camera parameters given
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
Pose is in the form ,
see Transformations / Poses and
“Solution Guide III-C - 3D Vision”.
Hence, it describes the position and orientation of the model coordinate
system defined by the 3D object model relative to the camera coordinate
HiddenSurfaceRemoval can be used to switch on
or to switch off the removal of hidden surfaces. If
HiddenSurfaceRemoval is set to 'true', only those
projected edges are returned that are not hidden by faces of the 3D
object model. If
HiddenSurfaceRemoval is set to
'false', all projected edges are returned. This is faster
than a projection with
HiddenSurfaceRemoval set to
If the system variable (see
'opengl_hidden_surface_removal_enable' is set to 'true'
(which is default if it is available) and
set to 'true', the projection of the model is accelerated using
the graphics card.
Depending on the graphics card this is significantly faster than the non
accelerated algorithm. Be aware that the results of the OpenGL projection
are slightly different compared to the analytic projection. Notable, only
the contours visible through
CamParam are projected in this mode.
3D edges are only projected if the angle between the two 3D faces
that are incident with the 3D edge is at least
MinFaceAngle is set to
0.0, all edges are projected. If
set to (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
If for the model creation with
create_shape_model_3d the parameter
'union_adjacent_contours' was activated, adjacent contours
return the same result if the 3D object model that was used to
create the 3D shape model is passed to
project_shape_model_3d is especially useful in order to
visualize the matches that are returned by
find_shape_model_3d in the case that the underlying 3D
object model is no longer available.
Contour representation of the model view.
Handle of the 3D shape model.
→(real / integer / string)
Internal camera parameters.
→(real / integer)
3D pose of the 3D shape model in the world coordinate system.
Remove hidden surfaces?
Default value: 'true'
List of values: 'false', 'true'
→(real / integer)
Smallest face angle for which the edge is displayed
Default value: 0.523599
Suggested values: 0.17, 0.26, 0.35, 0.52
If the parameters are valid, the operator
project_shape_model_3d returns the value TRUE. If
necessary an exception is raised.