Ipython notebook:在使用 Python-Opencv 计算 SIFT 特征时:内核似乎已经死亡/出现 Python:Segmentation 故障(核心已转储)

Ipython notebook: in computing SIFT freatures using Python-Opencv: The kernel appears to have died/ in Python:Segmentation fault (core dumped)

您好,尝试执行以下简单程序来检测 Ipython 笔记本中图像的 SIFT 特征,但每次收到错误消息时都会出现。我用谷歌搜索,但到目前为止找不到任何解决方案。

import cv2
import numpy as np
import itertools

加载图像:

img = cv2.imread("galaxy.png")

查找关键点:

detector = cv2.FeatureDetector_create("SIFT")
descriptor = cv2.DescriptorExtractor_create("SIFT")

skp = detector.detect(img) # in this line kernel dies!!

内核似乎已经死亡

skp, sd = descriptor.compute(img, skp)

tkp = detector.detect(template)
tkp, td = descriptor.compute(template, tkp)

我的系统是 Ubuntu 14.04 lts,ipython 3.2.0,python 2.7。 此外,我在 python 中尝试过并收到此错误消息:

Segmentation fault (core dumped)

我找到了解决方法,但不是一个好方法。我将该笔记本移动到另一个文件夹,它是该文件夹中唯一的文件,再次 运行 并且没有错误。不利的一面是我需要将此笔记本放在特定文件夹中!真是St运行ge问题。知道如何以更好的方式解决这个问题!