Log transform contrast stretch like CPA

Hi!
I was looking at images with CPA and realized that I can detect many more cells (visually) when I use the log option in contrast stretch. I’d like to know if it is possible to port this feature from CPA to CP or if is it hidden somewhere in CP?
This would be very useful to me.
Thanks for your time.

Hi,

For display purposes, simply right-click each image and you should see an Image Contrast menu. To actually transform the image, try ImageMath’s Log Transform feature.

David

Hi David!

Thanks for the suggestion I tried it “Log transform (base2)”, but the only effect is that everything in the image turns black :frowning:

It seems that the transformation on CPA is a different one. Any ideas?

If you use the log transform in ImageMath, keep in mind that the images are scaled from 0 to 1. This means that the log transform will go from -infinity (which is essentially undefined) to 0. If you don’t the check the box “Set values less than 0 equal to 0”, you’ll see that you get an image of mostly negative numbers.

The workaround for this is to add 1 to the image using ImageMath (unchecking the boxes that clamp the values greater than 1 or less than 0), and then take the log of the result. This insures that the values are greater than 1, and the log values will be positive. Additional scaling may be useful in further enhancing the image prior to taking the log.

Regards,
Mark

Hi!

This did the trick.

Thanks a lot!