简体   繁体   中英

python 2.7 interpreter exits when calling opencv's SURF detect keypoints

I'm trying to compute an image's keypoints and features usinf SURF. I wrote the following script for 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)

Reaching the last line of the script python exits without warning nor error message. ¿Any clues of what might be happening and how to fix this?

按照( http://danwin.com/2014/12/compile-opencv-2-4-10-ubuntu-14-04-14-)上的说明从头开始重新安装OpenCV之后,问题显然“已修复”。 10 /

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM