[−][src]Function opencv::xfeatures2d::match_gms
pub fn match_gms(
size1: Size,
size2: Size,
keypoints1: &VectorOfKeyPoint,
keypoints2: &VectorOfKeyPoint,
matches1to2: &VectorOfDMatch,
matches_gms: &mut VectorOfDMatch,
with_rotation: bool,
with_scale: bool,
threshold_factor: f64
) -> Result<()>
GMS (Grid-based Motion Statistics) feature matching strategy described in Bian2017gms .
Parameters
- size1: Input size of image1.
- size2: Input size of image2.
- keypoints1: Input keypoints of image1.
- keypoints2: Input keypoints of image2.
- matches1to2: Input 1-nearest neighbor matches.
- matchesGMS: Matches returned by the GMS matching strategy.
- withRotation: Take rotation transformation into account.
- withScale: Take scale transformation into account.
- thresholdFactor: The higher, the less matches.
Note: Since GMS works well when the number of features is large, we recommend to use the ORB feature and set FastThreshold to 0 to get as many as possible features quickly. If matching results are not satisfying, please add more features. (We use 10000 for images with 640 X 480). If your images have big rotation and scale changes, please set withRotation or withScale to true.
C++ default parameters
- with_rotation: false
- with_scale: false
- threshold_factor: 6.0