Failure to use adaptiveThreshold: CV_8UC1 in function adaptiveThreshold

The problem is that you are trying to use adaptive thresholding to an image that is not in greyscale. And the function only works with a greyscale images.

So you have to convert your image to a greyscale format as it is described in documentation.

They read the image in a greyscale format with: img = cv2.imread('dave.jpg',0). You can also convert it to greyscale with: img_grey = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)