Login  Register

Re: "Grayscale" values for RGB images

Posted by Jacqueline Ross on Feb 19, 2007; 5:12am
URL: http://imagej.273.s1.nabble.com/Grayscale-values-for-RGB-images-tp3700260p3700261.html

Dear Karsten, Tony and Wayne,

Thanks very much for your replies. Thanks also to Wayne for adding more
information to the documentation.

I'm a bit embarrassed to ask but where does the ratio for the RGB
conversion come from (V=0.30R+0.59G+0.11B)?

I know that with a Bayer mask, you get twice as many "green" pixels as
blue and red but I'm not sure how this weighting of V=0.30R+0.59G+0.11B
has been arrived at. I did have a bit of a look around but couldn't find
the answer.

My images are FITC fluorescence images (mainly green) which are captured
using an RGB camera. There is some data also in the red channel because
of the spectrum of FITC and the use of a longpass barrier filter. It is
a series of treated and untreated samples so they will be relative to
one another.

Therefore, is it appropriate to convert them to grayscale using the
V=(R+G+B)/ 3 giving each channel equal weight? This is what I would
normally do except that now I don't actually have to include this step
since the Measure command does it anyway.

Or should I be using RGB weighting? If so, how should this be determined
experimentally for the camera?

If someone can clarify when weighting should be applied, that would be
helpful.

Cheers,

Jacqui

Jacqueline Ross
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland, NEW ZEALAND

Tel: 64 9 373 7599 Ext 87438
Fax: 64 9 373 7484

http://www.health.auckland.ac.nz/biru/ 

-----Original Message-----
From: Rasband Wayne [mailto:[hidden email]]
Sent: 15 February 2007 06:09
To: Jacqui Ross
Subject: Re: "Grayscale" values for RGB images

> I think I must have missed an update somewhere. Usually, if I want to
> measure intensity of RGB images, I have to change them to grayscale
> first (8bit) but it seems that I don't need to include this extra step

> now. I seem to get the same results whether I change my green image to

> grey or not. Is this correct?

Jacque,

I added this paragraph to the Measure command documentation to make it
clearer how it handles RGB images.

"With RGB images, results are calculated using brightness values. RGB
pixels are converted to brightness values using the formula V=(R+G+B)/
3, or V=0.30R+0.59G+0.11B if "Weighted RGB Conversions" is checked in  
Edit>Option>Conversions. The three weighting factors can be changed
using the setRGBWeights() macro function."

-wayne