求助:opencv的fiter2D()方法来进行滤波检查,报错解包问题,求咋解决
src = cv.imread(‘1J3011194-0.jpg’)
#kernal 设置卷积核,与原始图像的每个通道进行卷积计算
kernals = [ np.array([[1,1,1],[1,2,1],[1,1,1]]), #低通滤波器
np.array([[0,1,0],[-1,5,-1],[0,-1.0]]), #高通滤波器
np.array([[-1,-1,-1],[-1,8,-1],[-1,-1,-1]])] #边缘检测]
index = 0
fig,axes = plt.subplots(1,3,figsize=(12,4.3))
for ax,(name,kernal) in zip(axes,kernals):
dst = cv.filter2D(src,-1,kernal)
ax.imshow(dst[:,:,:,:,-1])
ax.set_title(name)
ax.axis(‘off’)
fig.sbplots_adjust(0.02,0,0.98,1,0.02,0)
报错:too many values to unpack (expected 2)
新手小白 求助大神解决