KeyPoint descriptor OpenCV

前端 未结 1 1416
借酒劲吻你
借酒劲吻你 2021-02-11 01:56

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:14

    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)
提交回复
热议问题