Cannot convert to binary image using otsu threshold
问题 I am trying to convert zebra crossing image into binary image through otsu method. At first I have counted threshold value of all the zebra crossing images in the folder and then append it to a list called th_li=[] import cv2 as cv from skimage.filters import threshold_otsu dir3=r"C:\Users\USER\Handcrafted dataset\bw" images3=[cv2.imread(file,cv2.IMREAD_GRAYSCALE) for file in sorted(glob.glob(r"C:\Users\USER\Handcrafted dataset\adaptive/*.jpg"))] th_li=[] for i,img in enumerate(images3):