First, points are sampled uniformly from the scene passed with the parameter ObjectModel3D. The sampling distance is controlled with the parameter RelSamplingDistance.
Then, a set of key points (see figure 2.2) is selected from the sampled scene points. The number of selected key points is controlled with the parameter KeyPointFraction.
For each selected key point, the optimum pose of the surface model is computed under the assumption that the key point lies on the surface of the object. This is done by pairing the key point with all other sampled scene points (see figure 2.2) and finding the point pairs on the surface model that have a similar distance and relative orientation. The similarity is defined by the parameters 'feat_step_size_rel' and 'feat_angle_resolution' in create_surface_model. The pose for which the largest number of points from the sampled scene lie on the object is considered to be the best pose for this key point. The number of sampled scene points on the object is considered to be the score of the pose.
If the model was trained for edge-supported surface-based matching, edges are extracted from the 3D scene, similar to the operator edges_object_model_3d, and sampled. In addition to the sampled 3D surface, the reference points are then paired with all sampled edge points and similar point-edge-combinations are identified on the surface model.
From all key points the poses with the best scores are then selected and used as approximate poses.
If the pose refinement is disabled, the score described above is returned for each pose in Score. The value of the score depends on the amount of surface area of the instance that is visible in the scene and on the sampling rate of the scene. Only poses whose score exceeds MinScore are returned. To determine a good threshold for MinScore, it is recommended to test the matching on several scenes. The maximum number of returned poses is set with the generic parameter 'num_matches'.
Note that the resulting poses from this step are only approximate. The error in the pose is proportional to the sampling rates of the surface model given in create_surface_model, and is typically less than 5% of the object's diameter.