Masking every non-white pixel with black

Hi Everyone,

It may be a very simple question but I couldn’t find out how can I apply a masking to my images to have results as below. Basically I want to mask every pixel which are not white, and mask them with black. I tried every Method in Global Thresholder but couldn’t get the result I wanted.

I’ve used MaskWithThreshold workflow also, thanks in advance.

Best,

1 jpgafter%20mask 2 jpgafter%20mask 3 jpgafter%20mask 4 jpgafter%20mask 5 jpgafter%20mask 6 jpgafter%20mask 7 jpgafter%20mask

Hi @caceter,
The easiest way to only get the truly white pixels is to just apply a Global Thresholder with the manual thresholding method selected and a threshold value one bellow the white value in your image (for typical RGB images this would be 254). You will find however that this is often not a good strategy, as most images are not actually this clear and you will get a very noisy result.
Instead I recommend you to use the thresholding method you have been using and process the resulting masks a bit. By applying Morphological Image Operations, Median Filter, etc.

best,
Gabriel

1 Like