get_surface_matching_result — Get details of a result from surface based matching.
The operator get_surface_matching_result returns details about the results of surface based matching or the surface pose refinement. The results are stored in SurfaceMatchingResultID, which must have been created by find_surface_model or refine_surface_model_pose.
The parameter ResultName is used to select which result detail shall be returned. If details about one of the results shall be retrieved, ResultIndex selects the result index, where 0 selects the first result. ResultIndex is ignored for certain values of ResultName.
The following values are possible for ResultName if SurfaceMatchingResultID was created by find_surface_model or find_surface_model_image:
A 3D object model handle is returned that contains the sampled scene points that were used in the approximate matching step. This is helpful for tuning the sampling distance for the matching (see parameter RelSamplingDistance of operator find_surface_model). The parameter ResultIndex is ignored.
A 3D object model handle is returned that contains all points from the 3D scene that were used as key points in the matching process. This is helpful for tuning the sampling distance and key point rate for the matching (see parameter KeyPointFraction of operator find_surface_model). The parameter ResultIndex is ignored. At least 10 key points should be on the object of interest for stable results.
The score of the result before the dense pose refinement is returned. If the sparse pose refinement was disabled, this is the score of the approximate matching. Otherwise the score of the sparse pose refinement is returned. See find_surface_model for details about the score. In ResultIndex the index of the result must be specified. If SurfaceMatchingResultID was created by refine_surface_model_pose, 0 is returned.
If the surface model was trained with 'train_3d_edges' enabled, a 3D object model handle is returned that contains the sampled 3D edge points that were used in the approximate matching step and in the sparse refinement step. The parameter ResultIndex is ignored.
The following values are always possible for ResultName, regardless the operator SurfaceMatchingResultID was created with:
Returns the pose of the matching or refinement result. In ResultIndex the index of the result must be specified.
Returns the score of the result after the dense pose refinement. See find_surface_model for details about this score. In ResultIndex the index of the result must be specified. If SurfaceMatchingResultID was created by find_surface_model and dense pose refinement was disabled, 0 is returned.
Handle of the surface matching result.
Name of the result property.
Default value: 'pose'
List of values: 'key_points', 'pose', 'sampled_3d_edges', 'sampled_scene', 'score_refined', 'score_unrefined'
Index of the matching result, starting with 0.
Default value: 0
Suggested values: 0, 1, 2, 3
Restriction: ResultIndex >= 0
Value of the result property.
If the handle of the result is valid, the operator get_surface_matching_result returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.
find_surface_model, refine_surface_model_pose, read_surface_model, write_surface_model, clear_surface_model