<< imdetect_SURF Feature Detection, Description and Matching imextract_DescriptorBRIEF >>

IPCV - Image Processing and Computer Vision Toolbox for Scilab >> Feature Detection, Description and Matching > imdrawmatches

imdrawmatches

Draw matching result for 2 images

Syntax

imout = imdrawmatches(im1,im2,fobj1,fobj2,m);

Parameters

im1 :

First input image

im2 :

Second input image

fobj1 :

First feature object

fobj2 :

Second feature object

m :

Matching matrix

imout :

Output matching image

Description

This function used to draw matching result for 2 images with the features object and matching matrix provided.

Examples

// 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);

See also

Authors


Report an issue
<< imdetect_SURF Feature Detection, Description and Matching imextract_DescriptorBRIEF >>