refine_surface_model_pose — Refine the pose of a surface model in a 3D scene.
The operator refine_surface_model_pose refines the approximate pose InitialPose of the surface model SurfaceModelID in the 3D scene ObjectModel3D. The surface model SurfaceModelID must have been created previously with create_surface_model or read_surface_model.
refine_surface_model_pose is useful if the pose of an object in a scene is approximately known and only needs to be refined. The refined pose is returned in Pose, along with a score in Score. It is possible to pass multiple poses for refinement. Note that, contrary to find_surface_model, the returned poses are not sorted by their score but are returned in the same order as the input poses.
The maximum possible error in the approximate pose that can still be refined depends on the type of object, the amount of clutter in the scene and the visible parts of the objects. In general, differences in the orientation of up to 15° and differences in the position of up to 10% can be refined.
The accuracy of the pose refinement is limited to around 0.1% of the model's size due to numerical reasons. The accuracy further depends on the noise of the scene points, the number of scene points and the shape of the model.
Details about the pose refinement and the parameters are described in the documentation of find_surface_model in the section about the dense pose refinement step. The following generic parameters can be set for refine_surface_model_pose, and are also documented in find_surface_model: 'pose_ref_num_steps', 'pose_ref_sub_sampling', 'pose_ref_dist_threshold_rel', 'pose_ref_scoring_dist_rel', 'pose_ref_scoring_dist_abs', 'score_type', and 'pose_ref_use_scene_normals'.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
Handle of the surface model.
Handle of the 3D object model containing the scene.
Initial pose of the surface model in the scene.
Minimum score of the returned poses.
Default value: 0
Restriction: MinScore >= 0
Enable returning a result handle in SurfaceMatchingResultID.
Default value: 'false'
List of values: 'false', 'true'
Names of the generic parameters.
Default value: 
List of values: 'pose_ref_dist_threshold_rel', 'pose_ref_num_steps', 'pose_ref_scoring_dist_abs', 'pose_ref_scoring_dist_rel', 'pose_ref_sub_sampling', 'pose_ref_use_scene_normals', 'score_type'
Values of the generic parameters.
Default value: 
List of values: 0, 1, 0.005, 0.01, 0.03, 0.05, 0.1, 'false', 'true'
3D pose of the surface model in the scene.
Score of the found instances of the model.
Handle of the matching result, if enabled in ReturnResultHandle.
refine_surface_model_pose returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.
read_object_model_3d, xyz_to_object_model_3d, get_object_model_3d_params, read_surface_model, create_surface_model, get_surface_model_param, find_surface_model
get_surface_matching_result, clear_surface_matching_result, clear_object_model_3d