How to measure color

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to measure color

L Holman
Good day to all!

I would be very grateful for any help with the following problem. I am using a
fluorescent stain to make live cells stain green and dead cells stain red, and
attempting to quantify the proportion of dead cells. I was wondering if ImageJ
can be used for this purpose, e.g. returning a figure for the number/brightness
of red and green pixels.

A simpler method might be to replace all the red (or green) in the image with
black (using Photoshop), and convert the image to greyscale. I could then
measure the average luminosity of the picture (I know this possible with other
image analysis software such as Optimas). Is there a facility to measure the
luminosity (i.e. average brightness of all pixels in a designated area) in
ImageJ? I could not find one in the help, but such measurements are fairly
commonly used in the life sciences.

Thanks in advance for any help and ideas, they are much appreciated.

Luke Holman, University of Sheffield.
Reply | Threaded
Open this post in threaded view
|

Re: How to measure color

Raphael Reis
Maybe you could threshold the image by HUE, using HSV or HSL colorspace.
There are a few good recent topics dealing with similar problems. You can
search the archives for "HUE" in "SEPTEMBER 2007". The archives are located
at https://list.nih.gov/cgi-bin/wa?S1=imagej

I hope it helps.

Regards,
Raphael Reis.
Federal University of São Carlos, Brazil.

---------- Forwarded message ----------
From: Toby Cornish <[hidden email]>
Date: 23/09/2007 21:54
Subject: Re: brown staining
To: [hidden email]

Zhengyu,

I have considerable experience using ImageJ to quantitate brown (DAB) IHC
staining on TMAs.

If you aren't familiar with the HSV colorspace, please refer to wikipedia.
There is an excellent article on colorspaces.  Brown, unfortunately has a
broad absorbance spectrum and therefore the hue value stretches across the
hue range.  I can recommend colorspace inspector and color segmentation
plugins to help understand how brown pixels can be segmented using HSV
colorspace segmentation (G. Landini's threshold color). links here:

  http://rsb.info.nih.gov/ij/plugins/color-inspector.html

   http://www.dentistry.bham.ac.uk/landinig/software/software.html

At JHU we have produced an application (using ImageJ libraries) for
HSV-based quantitation of IHC staining, FrIDA.  You can test it here:

  http://bui2.win.ad.jhu.edu/frida/

and source is available from sourceforge (the project name is fridajhu).

I have used both color deconvolution and HSV colorspace segmentation for IHC
quantitation, and I have ImageJ macros for performing color deconvolution as
well.  There are caveats with both methods, the discussion of which would be
off topic in this forum.

Please contact me if you need additional assistance.

toby


Toby C. Cornish, M.D., Ph.D.
Pathology Resident
Johns Hopkins Medical Institutions
[hidden email]

2007/10/1, L Holman <[hidden email]>:

>
> Good day to all!
>
> I would be very grateful for any help with the following problem. I am
> using a
> fluorescent stain to make live cells stain green and dead cells stain red,
> and
> attempting to quantify the proportion of dead cells. I was wondering if
> ImageJ
> can be used for this purpose, e.g. returning a figure for the
> number/brightness
> of red and green pixels.
>
> A simpler method might be to replace all the red (or green) in the image
> with
> black (using Photoshop), and convert the image to greyscale. I could then
> measure the average luminosity of the picture (I know this possible with
> other
> image analysis software such as Optimas). Is there a facility to measure
> the
> luminosity (i.e. average brightness of all pixels in a designated area) in
>
> ImageJ? I could not find one in the help, but such measurements are fairly
> commonly used in the life sciences.
>
> Thanks in advance for any help and ideas, they are much appreciated.
>
> Luke Holman, University of Sheffield.
>
Reply | Threaded
Open this post in threaded view
|

Re: How to measure color

Toby Cornish
In reply to this post by L Holman
>From:    L Holman <[hidden email]>
>
> I would be very grateful for any help with the following problem. I am using a
> fluorescent stain to make live cells stain green and dead cells stain red, and
> attempting to quantify the proportion of dead cells. I was wondering if ImageJ
> can be used for this purpose, e.g. returning a figure for the number/brightness
> of red and green pixels.

In the case of fluorescence digital photomicrography, you really don't want to measure color, per se.  The traditional approach on a widefield fluorescence microscope would be to acquire a single grayscale image for each channel of fluorescence.  The "color" images produced from most multicolor fluorescent samples  are really pseudocolored images.  That stated, there are ways to produce true color images by using multipass filter sets or multiple exposures and color film cameras.  It seems unlikely that you are doing this as it is the exception in fluorescence imaging, and negates many of the inherent advantages of using fluorescent reporters.  If your camera seems to natively produce a color image, it may just be a product of your acquisition software.  These images can subsequently be split into red, green and blue channels to retrieve the original grayscale images (Image|Color|Split).  If your situation seems to differ from this, please let me know.

Once you have a single grayscale image for each fluorescence channel, you should be able to set a threshold value (Image|Adjust|Threshold) that separates the foreground signal (with the red overlay mask) from the background.  Sometimes this process can be complicated by background illumination (excitation, in this case) problems such as uneveness (center >> edges), in which case processing with a rolling ball filter may be useful (Process|Subtract background...).  This depends mostly on your particular imaging setup.

Anyway, back to thresholding.  The simplest way to threshold is to manually set it for each image.  Hopefully, though, you can empirically determine a reasonable threshold value for all your images from one channel, i.e. a threshold value for red and one for green.  There are also automatic thresholding methods available as plugins such as Otsu and maximum entropy thresholding, but they are beyond this discussion.

You might try using the "blobs" sample image (File|Open Samples|Blobs) to get a feel for thresholding and measuring images.  Once you have a threshold set (do not click the 'apply' button), you can set the measurements you want (Analyze|Set Measurements...).  You probably want to measure Area at the very least.  Next, you actually measure the particles that are thresholded (Analyze|Analyze Particles...).  Be sure to select "Display Results."  You may also want to select "Clear Results" to delete any previous measurements and "Summarize" to get the summary information that I think you are after.  When you hit OK you will get a Results table and a Summary table.

If you perform this on the each pair (red and green) of images, at the very least you should be able to get an area for live cells and an area for dead cells.  If you want a true count of live/dead cells, depending on your images, you may be faced will additional processing of images and the use of filters such as the watershed.  Of course, manually performing all these steps is tedious, so once you have a method established, writing a macro that iterates the process over each image will save you considerable time.  The use of the macro recorder (Plugins|Macros|Record...) and the excellent macro language reference on the ImageJ site can get you started.

Sorry for the length, but I hope this helps a little.

Enjoy,

t



Toby C. Cornish, M.D., Ph.D.
Pathology Resident
Johns Hopkins Medical Institutions
[hidden email]