KeyPoint descriptor OpenCV

前端 未结 1 435
北海茫月
北海茫月 2021-02-11 02:03

I am trying to understand how to get the descriptor for a given KeyPoint in OpenCV. So far my code looks like follows:

#include 
#in         


        
相关标签:
1条回答
  • 2021-02-11 02:19

    You're trying to computer ORB on the points (0,0) and (10,10), but they are too close to the image border, so ORB can't compute descriptors in those locations. ORB (as well as the other binary descriptors) filters them out.

    EDIT: since you asked about usage, I'm editing the answer. You should pass the whole image. I use it as:

    Ptr<FeatureDetector> detector = FeatureDetector::create(detector_name);
    Ptr<DescriptorExtractor> descriptor = DescriptorExtractor::create(descriptor_name);
    
    detector->detect(imgK, kp);
    descriptor->compute(imgK, kp, desc);
    
    0 讨论(0)
提交回复
热议问题