![](/img/trans.png)
[英]How to access SURF's KeyPoints' characteristic scales and dominant orientations in python?
[英]python 2.7 interpreter exits when calling opencv's SURF detect keypoints
我正在嘗試計算圖像的關鍵點並使用usinf SURF功能。 我為Python 2.7編寫了以下腳本:
import cv2
# load image and conver to grayscale
ima=cv2.imread('image.png')
ima2 = cv2.cvtColor(ima, cv2.COLOR_BGR2GRAY)
# create object to extract keypoints
surf_detector=cv2.FeatureDetector_create("SURF")
# extract those keypoints
keypoints = surf_detector.detect(ima2)
到達腳本的最后一行python會退出,而不會發出警告或錯誤消息。 ¿任何可能發生的事情以及如何解決此問題的線索?
按照( http://danwin.com/2014/12/compile-opencv-2-4-10-ubuntu-14-04-14-)上的說明從頭開始重新安裝OpenCV之后,問題顯然“已修復”。 10 /
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.