Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
449 views
in Technique[技术] by (71.8m points)

android - How Does OpenCV ORB Feature Detector Work?

I want to implement a feature-based alignment algorithm using the ORB feature detector and extractor.
So far, I extracted the features using ORB class from OpenCV ORB orb;
orb(gray_image,Mat(),features.keypoints,features.descriptors);
and matched them using the knnMatch function from openCV matcher.knnMatch(features1.descriptors, features2.descriptors, pair_matches,2); After that I am trying to find a homography using findHomography function, but this function needs at least 4 matches between the image features, and on most of the images i tested I got less than 4.

Has anybody used this feature? Is there any documentation about it, or about the ORB class from OpenCV(the meaning of the ORB constructor parameters)?

P.S. This is my first question. and I can't post more than 2 links. For opencv documentation use this.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

UPDATE: Now it is in the OpenCV documentation, here: http://opencv.itseez.com/modules/features2d/doc/feature_detection_and_description.html#orb

A detailed description of the algorithm is found here: http://www.willowgarage.com/sites/default/files/orb_final.pdf


It is not mentioned in OpenCV documentation but actually OpenCV has:

Two types of descriptors:

  • float descriptors:
    • SIFT
    • SURF
  • uchar descriptors:
    • ORB
    • BRIEF

And corresponding matchers:

  • for float descriptors:
    • FlannBased
    • BruteForce<L2<float> >
    • BruteForce<SL2<float> > //since 2.3.1
    • BruteForce<L1<float> >
  • for uchar descriptors:
    • BruteForce<Hamming>
    • BruteForce<HammingLUT>
    • FlannBased with LSH index //since 2.4.0

So you need to modify your code to use for example BruteForce<Hamming> matcher for ORB descriptors. It is possible to use L2 or L1 distance for matching uchar descriptors but results will be incorrect and findHomography returns unsatisfactory results.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...