set_surface_model_paramT_set_surface_model_paramSetSurfaceModelParamSetSurfaceModelParamset_surface_model_param — Set parameters and properties of a surface model.
Sets the camera pose for camera number X, where X is a zero-based
index for the cameras. If not given, X defaults zero (first camera).
The pose defaults to the zero-pose [0,0,0,0,0,0,0] when adding
a new camera with 'camera_parameter'"camera_parameter""camera_parameter""camera_parameter""camera_parameter""camera_parameter".
This usually means that camera and 3D sensor have the same point of
origin.
Removes all previously set cameras from the surface model.
Defining Object Symmetries.
The following parameters can be used to define symmetries of the 3D
object which was used for the creation of the surface model.
If the 3D object is symmetric, that information can be used to speed up
the surface-based matching.
Note that for surface models created with the 'train_3d_edges'"train_3d_edges""train_3d_edges""train_3d_edges""train_3d_edges""train_3d_edges"
parameter enabled, no symmetries can be set.
By default, no symmetry is active.
Note that for performance reasons, when changing the symmetry with any
of the parameters below, certain internal data structures of the surface
model are re-created, which can take a few seconds.
Set one or more symmetry poses of the model (see create_posecreate_poseCreatePoseCreatePoseCreatePosecreate_pose).
The model must be identical when transformed with any of those
poses.
The model is modified to use this symmetry information for speeding
up the matching process.
When setting one or more symmetry poses, set_surface_model_paramset_surface_model_paramSetSurfaceModelParamSetSurfaceModelParamSetSurfaceModelParamset_surface_model_param
will internally create all poses that can be created by chaining and
inverting the passed poses. To obtain all internally created poses,
use get_surface_model_paramget_surface_model_paramGetSurfaceModelParamGetSurfaceModelParamGetSurfaceModelParamget_surface_model_param with the argument
'symmetry_poses_all'"symmetry_poses_all""symmetry_poses_all""symmetry_poses_all""symmetry_poses_all""symmetry_poses_all".
If more than 100 poses are created internally, an error is returned,
which indicates that the passed symmetry poses are invalid.
Note that for performance reasons, when changing the pose range with any
of the parameters below, certain internal data structures of the surface
model are re-created, which can take a few seconds.
Set a reference pose of the model.
The reference pose can be used along with
'pose_restriction_max_angle_diff'"pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff",
to restrict the allowed range of rotations of the model.
Otherwise, GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value must be a pose (see
create_posecreate_poseCreatePoseCreatePoseCreatePosecreate_pose).
Note that the translation part of the pose is ignored.
Also note that both 'pose_restriction_reference_pose'"pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose" and
'pose_restriction_max_angle_diff'"pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff" must be set in order for
the pose restriction to be active.
Otherwise, GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value must be an angle, which
indicates by how much the rotations of a detected pose 'P'"P""P""P""P""P"
and the reference pose 'R'"R""R""R""R""R" set with
'pose_restriction_reference_pose'"pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose" may differ.
The comparison is performed for every model point using the formula
,
where is the 3D point vector.
Set an axis for which rotations are ignored when evaluating the pose
range (see 'pose_restriction_reference_pose'"pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose""pose_restriction_reference_pose" and
'pose_restriction_max_angle_diff'"pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff""pose_restriction_max_angle_diff").
If GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value is an empty tuple, any previously set
axis is cleared.
If such an axis is set, then a pose is considered to be within the
allowed range if the angle between the axis in the reference pose
and the compared pose is smaller than the allowed angle, using
.
Modifying self-similarities.
The following parameters can be used to adapt the optimization regarding
self-similar poses, i.e., poses under which the model is almost
symmetric.
The parameters can only be set if the parameter
'train_self_similar_poses'"train_self_similar_poses""train_self_similar_poses""train_self_similar_poses""train_self_similar_poses""train_self_similar_poses" was activated during the call
of create_surface_modelcreate_surface_modelCreateSurfaceModelCreateSurfaceModelCreateSurfaceModelcreate_surface_model.
Note that for performance reasons, when changing the self-similarity search
with any of the parameters below, certain internal data structures of the surface
model are re-created, which can take a few seconds.
Note that in some cases, if this operator encounters an error condition
while modifying the surface model, such as an out-of-memory error, the
model might be left in an inconsistent, partly changed state.
In such cases, it is recommended to clear the surface model and to no
longer use it.
This does not apply to error codes due to invalid parameters, which are
checked before performing any model modification.
set_surface_model_paramset_surface_model_paramSetSurfaceModelParamSetSurfaceModelParamSetSurfaceModelParamset_surface_model_param returns TRUE if all parameters are
correct. If necessary, an exception is raised.