首页 > 解决方案 > Dead Kernel : sift.detect(gray,None) 内核似乎已经死了。它会自动重启

问题描述

import cv2
import numpy as np
img = cv2.imread('home.jpg')
gray= cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
sift = cv2.SIFT()
**kp = sift.detect(gray,None)**  #Kernel dies here
img=cv2.drawKeypoints(gray,kp)
cv2.imwrite('sift_keypoints.jpg',img)

只想学习 SIFT,但 Mr.Kernel 在执行 sift.detect 时死了。

标签: pythonsift

解决方案


我有一个类似的问题,并通过使用cv2.SIFT_create()而不是cv2.SIFT().


推荐阅读