Ask Your Question

Revision history [back]

How to do multi level thresholding

Hi,

I have a greyscale image that has approximately 3 colors, white, grey and black.

white has value of >200. grey has a value of between 100 and 200. black has a value of <100. I want to classify the regions in the image whether they are black, grey or white.

I want to use open cv threshold function to output: white color when region is white, grey color when region is grey, black color when region is black.

however the threshold function can only set to two values.

is there a trick to make it set 3 values?