cv.drawMatches - MATLAB File Help
cv.drawMatches

Draws the found matches of keypoints from two images

out = cv.drawMatches(im1, keypoints1, im2, keypoints2, matches1to2)
out = cv.drawMatches(..., 'OptionName', optionValue, ...)

Input

Output

Options

This function draws matches of keypoints from two images in the output image. Match is a line connecting two keypoints (circles).

In pseudo-code, the function works as follows:

for m=1:numel(matches1to2)
    if ~MatchesMask(m), continue, end
    kp1 = keypoints1(matches1to2(m).queryIdx + 1);
    kp2 = keypoints2(matches1to2(m).trainIdx + 1);
    draw_match(kp1, kp2);
end
See also