KeyPoint descriptor OpenCV

前端 未结 1 446
北海茫月
北海茫月 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 detector = FeatureDetector::create(detector_name);
    Ptr descriptor = DescriptorExtractor::create(descriptor_name);
    
    detector->detect(imgK, kp);
    descriptor->compute(imgK, kp, desc);
    

    0 讨论(0)
提交回复
热议问题