Does anyone have any examples of using OpenCV with python for descriptor extraction?

后端 未结 4 1269
夕颜
夕颜 2021-02-04 05:22

I\'m trying to use OpenCV to extract SURF descriptors from an image. I\'m using OpenCV 2.4 and Python 2.7, but am struggling to find any documentation that provides any informat

4条回答
  •  梦如初夏
    2021-02-04 06:14

    todofixthis I follow your code and I get this

    import cv2
    img = cv2.imread("im3.jpg")
    sd = cv2.FeatureDetector_create("SURF")
    surf = cv2.DescriptorExtractor_create("SURF")
    keypoints = sd.detect(img) # segmentation faults
    l,d = surf.compute(img, keypoints) # returns empty result
    

    where

    l = keypoints

    d = descriptor

提交回复
热议问题