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,
Try to add cv2.IMREAD_GRAYSCALE in the second parameter of imread
img = cv2.imread(File_path, cv2.IMREAD_GRAYSCALE)