Detecting Red Stain Intensity on Droplets


I’m wanting to detect the intensity of the staining on my droplets. I have been able to successfully threshold and analyze lipid droplets using some pre-editing and a plug-in. However, this requires converting the image to 8-bit and eliminates the staining on the image. Detecting the overall red intensity of the image should work, or else a method to detect the intensity of staining after conversion to 8bit would also be helpful. Thanks!

Here are the steps I used:

  1. I’m assuming the image was not white balanced. In the future, be sure to white balance the camera before taking images.

To white balance the image post-processing, I used Image->Color->Split Channels to get each color channel, drew a selection on the background, used Ctrl+Shift+E to transfer the same selection to the other two backgrounds, and used Ctrl+M to measure the mean intensity for each image. I then used Process->Math->Multiply such that all of the images had the same background intensity:

  1. The problem is then to get what is only red, however, after white balancing the droplets are now pink. Since white = red + green + blue, pink = red + blue, and yellow = red + green, then objects that are red->pink (i.e. contain both red and some blue) can be calculated as red channel - green channel. By subtracting the green channel from the red channel, we are removing any white, and yellow objects in the red channel, and keeping the red and pink objects.

To subtract the green channel from the red channel, use Process->Image Calculator. This will create an 8-bit image with only red and pink objects:

The image looks pretty bizarre, however this is purely because it is a JPEG image, and JPEG is a lossy compression, where a lot of the original image information gets erased. By subtracting the green from the image, we’ve unmasked the blocks of JPEG compression. Images for analysis should always be saved as uncompressed Tiffs or bitmaps (preferably tiffs) since these will preserve all of the original image.

With the above 8-bit image, you should be able analyze it using you plugin of choice.

1 Like

Thank you for all the tips as well as helping me work through the steps. Say I was wanting to compare two images to determine which has a greater intensity of red staining. How might this be done from there?

Thank you @Llamero for this good explanation. Very helpful, not only for the original poster.

Simply by playing around with the image I found that a similar result can be achieved with (starting with the original image): Image > Color > RGB to CIELAB

Not perfect, but the result might probably also improve with a non-JPG image?

Since I have no clue what CIELAB actually does, I wonder if some experts could comment if this would be considered a valid approach or if this worked just by chance for his particular image.

Is CIELAB an additional install to ImageJ?

I don´t remember if I installed this somewhen as an extra plugin. Might be.
But most likely it comes preinstalled with Fiji (