previous question'umda, OpenCV Python'u SIFT gibi harici modüller ile kullanmak için opencv-contrib
'u yüklemem gerektiğini öğrendim. Ancak projemde ORB'yi veya benzer bir şeyi kullanmak istiyorum. cv2.ORB()
çalışmak, ne cv2.xfeatures2d.ORB_create()
veya komutların başka aglütinasyon yok etmez.OpenCV, ORB'yi bulamıyor
olarak SO OpenCV onun Python API için oldukça kötü belgelerine sahiptir bilir.
nasıl OpenCV Python özellikleri birlikte ORB kullanırım?
:#!/usr/bin/python2.7
import numpy as np
import cv2
from matplotlib import pyplot as plt
img = cv2.imread('smallburger.jpg',0)
# Initiate STAR detector
orb = cv2.ORB()
# find the keypoints with ORB
kp = orb.detect(img,None)
# compute the descriptors with ORB
kp, des = orb.compute(img, kp)
# draw only keypoints location,not size and orientation
img2 = cv2.drawKeypoints(img,kp,color=(0,255,0), flags=0)
plt.imshow(img2),plt.show()
CLI çıkışı:
Traceback (most recent call last):
File "./mwe.py", line 9, in <module>
orb = cv2.ORB()
AttributeError: 'module' object has no attribute 'ORB'