2017-05-24 27 views
0

我試圖運行在openCV頁所示ORB示例代碼。首先,我必須弄清楚的cv2.ORB()問題(已變更爲cv2.ORB_create(),在這個錯誤之後,就出現這樣的:OpenCV中不能得出關鍵點

Traceback (most recent call last): 

    File "orb.py", line 17, in <module> 
    img2 =cv2.drawKeypoints(img,kp,color=(0,255,0), flags=0) 
TypeError: Required argument 'outImage' (pos 3) not found 

做了很多博客和說明書所示的事情後,我決定添加img這個功能img2 =cv2.drawKeypoints(img,kp,img,color=(0,255,0), flags=0)因爲pos (3)錯誤的。它最後的工作不錯,但我想知道爲什麼只運行這樣並沒有辦法的官方頁面的狀態。

BR。

+0

請仔細閱讀本[「時,有人回答我的問題,我應該怎麼辦呢?」(http://stackoverflow.com/help/someone-answers)。 – thewaywewere

回答

0

這是cv2.drawKeypoints()的語法功能,至少爲OpenCV 3.x

如果import cv2後執行help(cv2.drawKeypoints),你會得到下面這是不言自明。

Help on built-in function drawKeypoints: 

drawKeypoints(...) 
    drawKeypoints(image, keypoints, outImage[, color[, flags]]) -> outImage 

pos(3)是輸出圖像,outImage,要返回。

相關問題