KeyPoint descriptor OpenCV

前端 未结 1 1417
借酒劲吻你
借酒劲吻你 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 detector = FeatureDetector::create(detector_name);
    Ptr descriptor = DescriptorExtractor::create(descriptor_name);
    
    detector->detect(imgK, kp);
    descriptor->compute(imgK, kp, desc);
    

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