2
這是來自OpenCV的-Python文檔的基本代碼:的OpenCV的Python基本ORB功能檢測爲我提供了功能CV錯誤-215 :: drawKeypoints
import numpy as np
import cv2
from matplotlib import pyplot as plt
img = cv2.imread('simple.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()
,這讓我這個錯誤:
Traceback (most recent call last):
File "C:\Python27\test.py", line 18, in <module>
img2 = cv2.drawKeypoints(img,kp,color=(0,255,0), flags=0)
error: ..\..\..\..\opencv\modules\features2d\src\draw.cpp:115: error: (-215) !outImage.empty() in function cv::drawKeypoints
我不得不提到這個錯誤發生在opencv-PYTHON中,你能幫我一下嗎?奮力真正使它工作
我有同樣的問題。您的解決方案沒有解決我的問題。有沒有其他的解決方案? –