Draw matching result for 2 images
imout = imdrawmatches(im1,im2,fobj1,fobj2,m);
First input image
Second input image
First feature object
Second feature object
Matching matrix
Output matching image
This function used to draw matching result for 2 images with the features object and matching matrix provided.
// 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); | ![]() | ![]() |