Measuring gut color

Background

Hei, I am new to Forums,
I wanted to compare color of these fish intestine by using imageJ.

Analysis goals

By comparing the color would like to understand is there any difference between the guts, or if some of them are redder than the others

Challenges

I tried selecing the whole gut area and analyzed for RGB. but surprizingly found that these has visually redder guts has lower R value. I have tried also for only selecting a small part of that red area, but still got lower R value compare to those “yellow” part of guts.

which method would you recommend me to compare which gut is redder than the others?

thanks

It’s not because a pixel appears redder than another that its red value is higher: the values in the other channels (green and blue) modulate the RGB colour too. Your background, for example, has higher (brighter) values in red than your guts. Your “redder than the others” can also mean “less yellow”, which is a combination of red an green.

If you only want to measure red values, split the channels: Image>Color>Split Channels. This said, the green values appear different between the top 3 and bottom 3 guts -but comparison is difficult as they are only partially in the picture.

Split your image, threshold with the blue channel and use the ROIs to measure red and green channels.

M.

3 Likes

Yep, but in addition to the reasons already listed, be careful with the thickness of the tissue slices, since thicker tissue will occlude more light and be “darker” (lower R G and B values).
If you have an example of the raw red pigment you want to analyze, you might try the color deconvolution module.
For example, I did something like this in QuPath, where I could see two distinct clusters of pixels.

2 Likes

Hi,
thank you so much for your suggestions. I tried splitting channels and selected two small parts that have distinct color. the result for both red and green show lower value for visually “redder” part. how can I explain this result? im confused…

and what do you mean by threshold with blue channel? how to do that?
thank you!

Kaki!

Hi,
thank you ! this is a good point.
and really nice illustrative graph here.
I am not familiar with Qupath, but downloaded now.
how did you do this?

thank you.
kaki

1 Like

I wouldn’t do this for a project full of images, but the shortest version is.
Drag image into an open QuPath window. I chose HDAB for my starting image colors, but you could chose that or H&E (later steps may look different).
Select the square tool and draw a square that includes both background and the two colors you want to separate.


Select the Analyze menu and go to Preprocessing-Estimate stain vectors
image
Select Yes, as this sets the background to the kind of dirty slide background, otherwise a perfect white background of 255 255 255 is expected, and you do not have that.

Here you can see the two clusters of pixels and the lines, I won’t go into the details, but the idea is to get the two lines in each of the three tiles to match to one set of pixels. Kind of like a mini game.
The REAL way to do this would be to have two examples of the stains independently. Sometimes that is not possible though.
Clicking Auto gives me something like this

Which I manually adjusted to this.

Note that the darker stain line in the left most image lines up with the same darker pixels after adjustment. As you drag any one line around, the lines in the other images also change. It takes some getting used to. You can try just using Auto, that might work.
I click OK and save.
At this point I can press 1, 2 or 3 to changes between the original image and the two colors.
The View menu also has a Channel Viewer to show all of the channels at once.

Dear Kaki,

Lower values on a brighfield image like you have simply mean that the red or green component are darker. The values are scaled from 0 to 255 with 0 being completely black and 255 being completely white. The values in between are increasingly brighter shades (think of it like a staircase from complete darkness to a brightly lit room, each step is slightly lighter).

In your case, the values indicate that your red parts are darker in the red and green component of your image.

“Threshold in blue channel” means that you can use fiji to automatically select your guts as regions of interest:

  • select the blue image
  • go to Image>Adjust>Threshold and select the dark regions. Click Apply.
  • go to Analyze>Analyze particles and select size 1000-infinity, tick Add to Manager, Exclude on edges and Include holes
  • Your regions of interest are now selected in the ROI manager
  • Go to the red image and in the ROI manager, click “measure”
  • Go to the green image and in the ROI manage, click “measure”

To understand what you are doing, I suggest that you find an image analysis course. Robert Haase (@haesleinhuepf) has run a series of short youtube tutorials that are very well made. You can find them here

Matthieu

1 Like