Opencv learning notes: Notes for using feature point matching functions

Source: Internet
Author: User

When we used the surf feature of opencv2.3.1 for feature point matching yesterday, we found that the drawmatches function is always faulty, and the exception prompt is vector overflow? I can't explain why others are using it well. When it comes to me, It overflows. Why ??!!!

Today, I carefully studied the opencv manual and finally found the problem. When I used flannbasedmatcher to perform the match function matching, I did not pay attention to the sequence: the first parameter of matcher is the query feature description sub, the second is the train feature description child. In this way, the generated match corresponds to dmatch. When the drawmatches function is used later, keypoints1 corresponds to the feature points of the query sub-statement, keypoints2 corresponds to the train description sub, so that the matches1to2 parameter 5 can correctly match and find the corresponding matching point.

At the beginning, I did not take a closer look at the parameter explanation. I passed the description to the function and reversed it. The result must be a vector overflow when I used dmatch to search for matching points.

-------------- I learned something again!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.