Login  Register

Re: How to measure color

Posted by Toby Cornish on Oct 02, 2007; 4:03pm
URL: http://imagej.273.s1.nabble.com/How-to-measure-color-tp3698285p3698286.html

>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]