I have used openCV python and encountered an error.
img_blur = cv2.medianBlur(self.cropped_img,5)
img_thresh_Gaussian = cv2.adaptiveThreshold(img_blur, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)
plt.subplot(1,1,1),plt.imshow(img_thresh_Gaussian, cmap = 'gray')
plt.title("Image"), plt.xticks([]), plt.yticks([])
plt.show()
but I received:
cv2.error: /home/phuong/opencv_src/opencv/modules/imgproc/src/thresh.cpp:1280: error: (-215) src.type() == CV_8UC1 in function adaptiveThreshold
Do I have to install something else?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…