0
파이썬에서 이미지의 SIFT 기능을 감지하기 위해 프로그램을 실행하려고 시도했지만 정기적으로 "Segmentation fault (core dumped)"라는 오류 메시지가 나타납니다. 코드 내 조각 :Python - OpenCv를 사용하여 SIFT freatures를 계산하는 중 : 커널이 사망 함 : 분할 오류 (코어 덤프) 어떻게 방지 할 수 있습니까?
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import cv2
img1 = plt.imread("test1.png").astype('uint8')
img2 = plt.imread("test2.png").astype('uint8')
sift = cv2.SIFT()
###find the keypoints and descriptors with SIFT
kp1, des1 = sift.detectAndCompute(img1,None)
kp2, des2 = sift.detectAndCompute(img2,None)
###FLANN parameters
FLANN_INDEX_KDTREE = 0
index_params = dict(algorithm = FLANN_INDEX_KDTREE, trees = 5)
search_params = dict(checks=50)
###match of the points
flann = cv2.FlannBasedMatcher(index_params,search_params)
matches = flann.knnMatch(des1,des2,k=2)
내가 파이썬에서 그것을 시도하고 때로는 내가이 오류 메시지를 받았습니다 : 분할 고장이 (코어 덤프). 따라서 나는 그것을 방지하거나보다 안정적인 접근법을 사용하고자합니다. Skimage를보고 해당 항목을 찾습니다.
확인 감사를 시도 할 수 있도록 찾는 관심 포인트는, 메모리를 많이 걸릴;) 나는 그림을 축소하려고 할 것이다! 내가 오늘 그걸 할거야 그리고 난 너에게 알릴거야 – user3601754
문제가 덜 자주 발생;)하지만 사라지지 않아 – user3601754
당신의 노트북은 얼마나 많은 코어를 가지고 있습니까? RAM은 무엇입니까? GPU에서 실행하고 있습니까? –