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,
you have to imread your image in grayscale, so use the code below:
image = imread('address', 0)
0 exchange the channel of image to grayscale