Ask Your Question

Azy's profile - activity

2016-12-25 05:42:04 -0600 commented answer Doing an adaptive thresholding to a grayscale image

Ok thanks! Is there any way to solve my problem? pls

2016-12-25 05:28:28 -0600 commented answer Doing an adaptive thresholding to a grayscale image

I am getting a blue illuminated image when I use this. The problem is the source image is already in grayscale (black & white). So Is there any hack to solve this.

2016-12-25 04:37:28 -0600 asked a question Doing an adaptive thresholding to a grayscale image

I have a png image which is in grayscale 'test.png'. I need to do an adaptive thresholding to this image. I am using opencv2.

image = cv2.imread('test_big.png')
im = cv2.adaptiveThreshold(image, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY_INV, 11, 2)

I am not able to do thresholding since the image is not in grayscale. So I tried to read the image as grayscale

image = cv2.imread('test_big.png',1)

Now I can do the thresholding but the output will be a blue and red image instead of black and white. Can anyone help Plsss