【发布时间】:2018-05-31 19:07:00
【问题描述】:
我运行了下面的代码,我得到一个错误
OpenCV(3.4.1) C:\projects\opencv-python\opencv\modules\imgproc\src\thresh.cpp:1406: 错误:(-215) src.type() == (((0) & ((1
我不清楚这意味着什么以及如何解决它
import numpy as numpy
from matplotlib import pyplot as matplot
import pandas as pandas
import math
from sklearn import preprocessing
from sklearn import svm
import cv2
blur = cv2.GaussianBlur(img,(5,5),0)
ret3,th3 = cv2.threshold(blur,0,255,cv2.THRESH_BINARY+cv2.THRESH_OTSU)
image = numpy.invert(th3)
matplot.imshow(image,'gray')
matplot.show()
【问题讨论】:
-
搜索“OpenCV -215”。