MaskImages binarizes some images

Hello,

I’m seeing some unexpected behavior with MaskImages - when used on some greyscale images, it binarizes them instead of retaining the greyscale image with only the objects blacked out. I’ve attached the pipeline, which should replicate the problem, and the input .tif file. Please let me know if I’m doing something wrong. Thank you!

Pang Wei


maskImageBinary.cp (6.03 KB)

Hi Pang,

Your pipeline is actually working fine; it’s just that the output looks odd :smiley:

Your Corr image spans the range 0.75-0.86, on the high end of the normal [0-1] range in CP. When masking an image, the module display window shows the masked region as 0 (i.e, black), so when shown together, your unmasked region appears white since the intensities are already so bright.

If you mouse over the unmasked region and look at the intensity values in the lower right corner, you can see that they are actually correct and not binary. Also, if you right-click on the image, and select Image contrast > log normalized, you’ll also see the relative range more clearly.

Regards,
-Mark

Hi Mark,

That makes a lot of sense. Thank you! :smile:

Pang Wei