Find the best matched features from 2 features objects and the matching matrix
[fout1,fout2,mout] = imbestmatches(fobj1,fobj2,m,n);
First feature object
Second feature object
Matching matrix
Number of best matches to returned
First best feature object
Second best feature object
New matching matrix corresponding to the best matches
This function find the best matches of 2 features objects with their mathching matrix.
// Read the image and rotate it by 45 degrees S = imread(fullpath(getIPCVpath() + "/images/balloons_gray.png")); S2 = imrotate(S,45); // Use the ORB to detect features f1 = imdetect_ORB(S) f2 = imdetect_ORB(S2) // Extract the descriptor d1 = imextract_DescriptorORB(S,f1); d2 = imextract_DescriptorORB(S2,f2); // Feature matching m = immatch_BruteForce(d1,d2,4) // Find the 10 best matches [fout1,fout2,mout] = imbestmatches(f1,f2,m,10); // Draw the matches SS = imdrawmatches(S,S2,fout1,fout2,mout); // Show the comparison imshow(SS); | ![]() | ![]() |