简体   繁体   English

调用opencv的SURF检测关键点时,python 2.7解释器退出

[英]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. 我正在尝试计算图像的关键点并使用usinf SURF功能。 I wrote the following script for Python 2.7: 我为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. 到达脚本的最后一行python会退出,而不会发出警告或错误消息。 ¿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 /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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