Inverting binary colour in images


#1

Hi,

I have a quick simple question : i need to invert the black and white colours in images, yet I cannot find a module that would do this.

The reason i need to do this is because the microscope intensity settings were changed half-way through my experiment, so the intensity of images taken at time point t24 are quite different (nearly reversed in fact) to images taken at t48.

I have tried to attach a couple of examples so you can take a look at the issue, but every time i try it appears the image format is invalid for the forum (they are .tif images).

But many thanks for what is an excellent software !

Liam


#2

Hi Liam,

Assuming you are using the latest version of CellProfiler (v. 7522), you can use ImageMath for this purpose. Use your image as the first input, and then select “Invert” as the operation.

If you like, try converting your images to .jpg and see if you are successful in uploading them.

Regards,
-Mark


#3

Hi Mark,

Thanks so much, ImageMath worked brilliantly.

Unfortunately, I now have another problem. Using the ApplyThreshold on the images to make them binary, some of them come out entirely grey.
The images are a picture taken of a specific point at three different time points (T0, T24, T48), and it is always the T48 images that come out grey. I have checked, all the parameters are the same for T0, T24 and T48.

I’ve attached three examples with the pipeline I assembled. I am using the version 1.0.7522.
Can you help?

Thanks so much,

Liam
ExampleWoundHealingPIPE4.mat (1.66 KB)







#4

Hi Liam,

In your pipeline, for the 3rd RescaleIntensity module, the output image name has been left at RescaledBlue rather than (I presume) OrigT48. Therefore the AppyThreshold module is not working with the image you intended. Once you correct the image name in the RescaleIntensity module, I think it should work fine.

Regards,
-Mark