draw matched features in same image

asked 2014-02-22 15:36:00 -0500

sy456 gravatar image

updated 2014-02-22 15:53:37 -0500

berak gravatar image


I have two frame sequences; C:\fakepath\image1.jpg and C:\fakepath\image2.jpg. When I use drawmatches function in opencv, it shows a window with two consecutive frames next to each other for matching.

However, I want to show feature points of frame 1(image1.jpg) plotted in red, the feature points of frame 2 (image1.jpg) plotted in blue (also plotted in the image1.jpg) and draw a line between matched points.

How can I do it in OpenCV?


edit retag flag offensive close merge delete



You can do it manually with line and circle functions. Check the source code of drawMatches for reference.

Daniil Osokin gravatar imageDaniil Osokin ( 2014-02-24 03:47:09 -0500 )edit