c++

Would somebody share their knowledge of OpenCV feature detection and extraction of fiducial markers?

I'm attempting to find a fiducial marker (see image below) (self-created ARTag-style using MS Paint) in a scene.

Using Harris corner detection, I can adequately locate the corners of the marker image. Similarly, using Harris corner detection, I can find most of the corners of the marker in the scene. I then use SIFT to extract descriptors for the marker image and the scene image. Then I've tried both BF and FLANN for feature matching. However, both matching algorithms tend to match the wrong corners together.

Is there something that I can do to improve the accuracy? Or are there other detection methods that would be better appropriate for this application?

Portion of code:

GoodFeaturesToTrackDetector harris_detector(6, 0.15, 10, 3, true);
vector<KeyPoint> keypoints1, keypoints2; 

harris_detector.detect(im1, keypoints1);
harris_detector.detect(im2, keypoints2);

SiftDescriptorExtractor extractor;

Mat descriptors1, descriptors2;

extractor.compute( im1, keypoints1, descriptors1 );
extractor.compute( im2, keypoints2, descriptors2 );

BFMatcher matcher;
//FlannBasedMatcher matcher;
std::vector< DMatch > matches;
matcher.match( descriptors1, descriptors2, matches );

you can try to use ORB detector, which is a fusion of FAST keypoint detector and BRIEF descriptor. it is fast and better than BRIEF descriptor because the later does not compute the orientation.

  • you can found a example of orb's usage in samples/cpp/tutorial_code/features2D/AKAZE_tracking or enter link description here
  • or there is a python project which does the similar task as yours fiducial
  • 链接地址: http://www.djcxy.com/p/61070.html

    上一篇: 检测图像中的漫画对话泡泡区域

    下一篇: C ++