refine_surface_model_poseT_refine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPose (Operator)

Name

refine_surface_model_poseT_refine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPose — Refine the pose of a surface model in a 3D scene.

Signature

refine_surface_model_pose( : : SurfaceModelID, ObjectModel3D, InitialPose, MinScore, ReturnResultHandle, GenParamName, GenParamValue : Pose, Score, SurfaceMatchingResultID)

Herror T_refine_surface_model_pose(const Htuple SurfaceModelID, const Htuple ObjectModel3D, const Htuple InitialPose, const Htuple MinScore, const Htuple ReturnResultHandle, const Htuple GenParamName, const Htuple GenParamValue, Htuple* Pose, Htuple* Score, Htuple* SurfaceMatchingResultID)

void RefineSurfaceModelPose(const HTuple& SurfaceModelID, const HTuple& ObjectModel3D, const HTuple& InitialPose, const HTuple& MinScore, const HTuple& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Pose, HTuple* Score, HTuple* SurfaceMatchingResultID)

HPoseArray HObjectModel3D::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPoseArray& InitialPose, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID) const

HPose HObjectModel3D::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const

HPose HObjectModel3D::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const

HPose HObjectModel3D::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HPose& InitialPose, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const   (Windows only)

HPoseArray HSurfaceModel::RefineSurfaceModelPose(const HObjectModel3D& ObjectModel3D, const HPoseArray& InitialPose, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID) const

HPose HSurfaceModel::RefineSurfaceModelPose(const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const

HPose HSurfaceModel::RefineSurfaceModelPose(const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const

HPose HSurfaceModel::RefineSurfaceModelPose(const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResult* SurfaceMatchingResultID) const   (Windows only)

static HPoseArray HSurfaceMatchingResult::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPoseArray& InitialPose, const HTuple& MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score, HSurfaceMatchingResultArray* SurfaceMatchingResultID)

HPose HSurfaceMatchingResult::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const HString& ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score)

HPose HSurfaceMatchingResult::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const char* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score)

HPose HSurfaceMatchingResult::RefineSurfaceModelPose(const HSurfaceModel& SurfaceModelID, const HObjectModel3D& ObjectModel3D, const HPose& InitialPose, double MinScore, const wchar_t* ReturnResultHandle, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Score)   (Windows only)

static void HOperatorSet.RefineSurfaceModelPose(HTuple surfaceModelID, HTuple objectModel3D, HTuple initialPose, HTuple minScore, HTuple returnResultHandle, HTuple genParamName, HTuple genParamValue, out HTuple pose, out HTuple score, out HTuple surfaceMatchingResultID)

HPose[] HObjectModel3D.RefineSurfaceModelPose(HSurfaceModel surfaceModelID, HPose[] initialPose, HTuple minScore, string returnResultHandle, HTuple genParamName, HTuple genParamValue, out HTuple score, out HSurfaceMatchingResult[] surfaceMatchingResultID)

HPose HObjectModel3D.RefineSurfaceModelPose(HSurfaceModel surfaceModelID, HPose initialPose, double minScore, string returnResultHandle, HTuple genParamName, HTuple genParamValue, out HTuple score, out HSurfaceMatchingResult surfaceMatchingResultID)

HPose[] HSurfaceModel.RefineSurfaceModelPose(HObjectModel3D objectModel3D, HPose[] initialPose, HTuple minScore, string returnResultHandle, HTuple genParamName, HTuple genParamValue, out HTuple score, out HSurfaceMatchingResult[] surfaceMatchingResultID)

HPose HSurfaceModel.RefineSurfaceModelPose(HObjectModel3D objectModel3D, HPose initialPose, double minScore, string returnResultHandle, HTuple genParamName, HTuple genParamValue, out HTuple score, out HSurfaceMatchingResult surfaceMatchingResultID)

static HPose[] HSurfaceMatchingResult.RefineSurfaceModelPose(HSurfaceModel surfaceModelID, HObjectModel3D objectModel3D, HPose[] initialPose, HTuple minScore, string returnResultHandle, HTuple genParamName, HTuple genParamValue, out HTuple score, out HSurfaceMatchingResult[] surfaceMatchingResultID)

HPose HSurfaceMatchingResult.RefineSurfaceModelPose(HSurfaceModel surfaceModelID, HObjectModel3D objectModel3D, HPose initialPose, double minScore, string returnResultHandle, HTuple genParamName, HTuple genParamValue, out HTuple score)

Description

The operator refine_surface_model_poserefine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPoseRefineSurfaceModelPose refines the approximate pose InitialPoseInitialPoseInitialPoseInitialPoseinitialPose of the surface model SurfaceModelIDSurfaceModelIDSurfaceModelIDSurfaceModelIDsurfaceModelID in the 3D scene ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D. The surface model SurfaceModelIDSurfaceModelIDSurfaceModelIDSurfaceModelIDsurfaceModelID must have been created previously with create_surface_modelcreate_surface_modelCreateSurfaceModelCreateSurfaceModelCreateSurfaceModel or read_surface_modelread_surface_modelReadSurfaceModelReadSurfaceModelReadSurfaceModel. Additionally, set_surface_model_paramset_surface_model_paramSetSurfaceModelParamSetSurfaceModelParamSetSurfaceModelParam can be used to set certain parameters that influence the refinement, such as restricting the allowed range of rotations.

refine_surface_model_poserefine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPoseRefineSurfaceModelPose 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 PosePosePosePosepose, along with a score in ScoreScoreScoreScorescore. It is possible to pass multiple poses for refinement. Note that, contrary to find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel, 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_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel in the section about the dense pose refinement step. The following generic parameters can be set for refine_surface_model_poserefine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPoseRefineSurfaceModelPose, and are also documented in find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel: 'pose_ref_num_steps'"pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps", 'pose_ref_sub_sampling'"pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling", 'pose_ref_dist_threshold_rel'"pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel", 'pose_ref_dist_threshold_abs'"pose_ref_dist_threshold_abs""pose_ref_dist_threshold_abs""pose_ref_dist_threshold_abs""pose_ref_dist_threshold_abs", 'pose_ref_scoring_dist_rel'"pose_ref_scoring_dist_rel""pose_ref_scoring_dist_rel""pose_ref_scoring_dist_rel""pose_ref_scoring_dist_rel", 'pose_ref_scoring_dist_abs'"pose_ref_scoring_dist_abs""pose_ref_scoring_dist_abs""pose_ref_scoring_dist_abs""pose_ref_scoring_dist_abs", 'score_type'"score_type""score_type""score_type""score_type", 'pose_ref_use_scene_normals'"pose_ref_use_scene_normals""pose_ref_use_scene_normals""pose_ref_use_scene_normals""pose_ref_use_scene_normals", '3d_edge_min_amplitude_rel'"3d_edge_min_amplitude_rel""3d_edge_min_amplitude_rel""3d_edge_min_amplitude_rel""3d_edge_min_amplitude_rel", '3d_edge_min_amplitude_abs'"3d_edge_min_amplitude_abs""3d_edge_min_amplitude_abs""3d_edge_min_amplitude_abs""3d_edge_min_amplitude_abs", '3d_edges'"3d_edges""3d_edges""3d_edges""3d_edges", 'pose_ref_dist_threshold_edges_rel'"pose_ref_dist_threshold_edges_rel""pose_ref_dist_threshold_edges_rel""pose_ref_dist_threshold_edges_rel""pose_ref_dist_threshold_edges_rel", 'pose_ref_dist_threshold_edges_abs'"pose_ref_dist_threshold_edges_abs""pose_ref_dist_threshold_edges_abs""pose_ref_dist_threshold_edges_abs""pose_ref_dist_threshold_edges_abs", 'pose_ref_scoring_dist_edges_rel'"pose_ref_scoring_dist_edges_rel""pose_ref_scoring_dist_edges_rel""pose_ref_scoring_dist_edges_rel""pose_ref_scoring_dist_edges_rel", and 'pose_ref_scoring_dist_edges_abs'"pose_ref_scoring_dist_edges_abs""pose_ref_scoring_dist_edges_abs""pose_ref_scoring_dist_edges_abs""pose_ref_scoring_dist_edges_abs".

Execution Information

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.

This operator supports cancelling timeouts and interrupts.

Parameters

SurfaceModelIDSurfaceModelIDSurfaceModelIDSurfaceModelIDsurfaceModelID (input_control)  surface_model HSurfaceModel, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the surface model.

ObjectModel3DObjectModel3DObjectModel3DObjectModel3DobjectModel3D (input_control)  object_model_3d HObjectModel3D, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the 3D object model containing the scene.

InitialPoseInitialPoseInitialPoseInitialPoseinitialPose (input_control)  pose(-array) HPose, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Initial pose of the surface model in the scene.

MinScoreMinScoreMinScoreMinScoreminScore (input_control)  real HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Minimum score of the returned poses.

Default value: 0

Restriction: MinScore >= 0

ReturnResultHandleReturnResultHandleReturnResultHandleReturnResultHandlereturnResultHandle (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Enable returning a result handle in SurfaceMatchingResultIDSurfaceMatchingResultIDSurfaceMatchingResultIDSurfaceMatchingResultIDsurfaceMatchingResultID.

Default value: 'false' "false" "false" "false" "false"

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

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name-array HTupleHTupleHtuple (string) (string) (HString) (char*)

Names of the generic parameters.

Default value: []

List of values: '3d_edge_min_amplitude_abs'"3d_edge_min_amplitude_abs""3d_edge_min_amplitude_abs""3d_edge_min_amplitude_abs""3d_edge_min_amplitude_abs", '3d_edge_min_amplitude_rel'"3d_edge_min_amplitude_rel""3d_edge_min_amplitude_rel""3d_edge_min_amplitude_rel""3d_edge_min_amplitude_rel", '3d_edges'"3d_edges""3d_edges""3d_edges""3d_edges", 'pose_ref_dist_threshold_abs'"pose_ref_dist_threshold_abs""pose_ref_dist_threshold_abs""pose_ref_dist_threshold_abs""pose_ref_dist_threshold_abs", 'pose_ref_dist_threshold_rel'"pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel""pose_ref_dist_threshold_rel", 'pose_ref_num_steps'"pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps""pose_ref_num_steps", 'pose_ref_scoring_dist_abs'"pose_ref_scoring_dist_abs""pose_ref_scoring_dist_abs""pose_ref_scoring_dist_abs""pose_ref_scoring_dist_abs", 'pose_ref_scoring_dist_rel'"pose_ref_scoring_dist_rel""pose_ref_scoring_dist_rel""pose_ref_scoring_dist_rel""pose_ref_scoring_dist_rel", 'pose_ref_sub_sampling'"pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling""pose_ref_sub_sampling", 'pose_ref_use_scene_normals'"pose_ref_use_scene_normals""pose_ref_use_scene_normals""pose_ref_use_scene_normals""pose_ref_use_scene_normals", 'score_type'"score_type""score_type""score_type""score_type", 'viewpoint'"viewpoint""viewpoint""viewpoint""viewpoint"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.value-array HTupleHTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Values of the generic parameters.

Default value: []

Suggested values: 0, 1, 'true'"true""true""true""true", 'false'"false""false""false""false", 0.005, 0.01, 0.03, 0.05, 0.1

PosePosePosePosepose (output_control)  pose(-array) HPose, HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

3D pose of the surface model in the scene.

ScoreScoreScoreScorescore (output_control)  real-array HTupleHTupleHtuple (real) (double) (double) (double)

Score of the found instances of the model.

SurfaceMatchingResultIDSurfaceMatchingResultIDSurfaceMatchingResultIDSurfaceMatchingResultIDsurfaceMatchingResultID (output_control)  surface_matching_result(-array) HSurfaceMatchingResult, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the matching result, if enabled in ReturnResultHandleReturnResultHandleReturnResultHandleReturnResultHandlereturnResultHandle.

Result

refine_surface_model_poserefine_surface_model_poseRefineSurfaceModelPoseRefineSurfaceModelPoseRefineSurfaceModelPose returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.

Possible Predecessors

read_object_model_3dread_object_model_3dReadObjectModel3dReadObjectModel3dReadObjectModel3d, xyz_to_object_model_3dxyz_to_object_model_3dXyzToObjectModel3dXyzToObjectModel3dXyzToObjectModel3d, get_object_model_3d_paramsget_object_model_3d_paramsGetObjectModel3dParamsGetObjectModel3dParamsGetObjectModel3dParams, read_surface_modelread_surface_modelReadSurfaceModelReadSurfaceModelReadSurfaceModel, create_surface_modelcreate_surface_modelCreateSurfaceModelCreateSurfaceModelCreateSurfaceModel, get_surface_model_paramget_surface_model_paramGetSurfaceModelParamGetSurfaceModelParamGetSurfaceModelParam, find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel, edges_object_model_3dedges_object_model_3dEdgesObjectModel3dEdgesObjectModel3dEdgesObjectModel3d

Possible Successors

get_surface_matching_resultget_surface_matching_resultGetSurfaceMatchingResultGetSurfaceMatchingResultGetSurfaceMatchingResult, clear_surface_matching_resultclear_surface_matching_resultClearSurfaceMatchingResultClearSurfaceMatchingResultClearSurfaceMatchingResult, clear_object_model_3dclear_object_model_3dClearObjectModel3dClearObjectModel3dClearObjectModel3d

Alternatives

find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel, refine_surface_model_pose_imagerefine_surface_model_pose_imageRefineSurfaceModelPoseImageRefineSurfaceModelPoseImageRefineSurfaceModelPoseImage, find_surface_model_imagefind_surface_model_imageFindSurfaceModelImageFindSurfaceModelImageFindSurfaceModelImage

See also

create_surface_modelcreate_surface_modelCreateSurfaceModelCreateSurfaceModelCreateSurfaceModel, find_surface_modelfind_surface_modelFindSurfaceModelFindSurfaceModelFindSurfaceModel, refine_surface_model_pose_imagerefine_surface_model_pose_imageRefineSurfaceModelPoseImageRefineSurfaceModelPoseImageRefineSurfaceModelPoseImage

Module

3D Metrology