Dear All,
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? 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/ <http://www.health.auckland.ac.nz/biru/> |
It sounds like you have a 'greenscale' image, just like a greyscale image
but only using the green channel and all the red/blue values are zero- is this true? or do you have a full colour image (using all of RGB) that just 'looks mainly green'. If it is true then you are looking at the nonzero pixel value, the green value, which is the same as it would be if this were a greyscale image (think of a greyscale image as red=green=blue at each pixel) Hope that helps >From: Jacqui Ross <[hidden email]> >Reply-To: ImageJ Interest Group <[hidden email]> >To: [hidden email] >Subject: "Grayscale" values for RGB images >Date: Wed, 14 Feb 2007 10:24:49 +1300 > >Dear All, > > > >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? > > > >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/ ><http://www.health.auckland.ac.nz/biru/> > > _________________________________________________________________ Get Hotmail, News, Sport and Entertainment from MSN on your mobile. http://www.msn.txt4content.com/ |
In reply to this post by Jacqueline Ross
Be careful, your 'green' image can be a green RGB image or an 8-bit
image with green look-up-table. Measure will apply for RGB images a default weighting which can be changed by setRGBWeights() macro function. See e.g. Edit->Options- >Conversions. Quite surprising that you get the same results. Typically RGB Conversion is weighted, e.g. by red*.3+green*.59+blue*.11! or any other values! Regards KR Am 13.02.2007 um 22:24 schrieb Jacqui Ross: > 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? Karsten Rodenacker -------------------------------------------------------------------- :-) GSF - Institute of Biomathematics and Biometry D-85758 Oberschleissheim Postfach 11 29 Karsten.Rodenacker_AT_gsf.de | http://ibb.gsf.de/ http://ibb.gsf.de/homepage/karsten.rodenacker/ Voice: +49 89 31873401 | Voicemail/FAX: ..193401 |
... OK it is not surprising to get the same results since 8-bit and
Measure applies the same weighting rule for RGB to grey. However it should be clear what is really measured. Possibly a weighting (0.,1.,0.), only green channel, would reflect slightly better what should be measured!? KR Am 14.02.2007 um 11:31 schrieb Karsten Rodenacker: > Be careful, your 'green' image can be a green RGB image or an 8-bit > image with green look-up-table. > Measure will apply for RGB images a default weighting which can be > changed by setRGBWeights() macro function. See e.g. Edit->Options- > >Conversions. > Quite surprising that you get the same results. Typically RGB > Conversion is weighted, e.g. by red*.3+green*.59+blue*.11! or any > other values! > > Regards > KR > > Am 13.02.2007 um 22:24 schrieb Jacqui Ross: > >> 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? > > Karsten Rodenacker > -------------------------------------------------------------------- : > -) > GSF - Institute of Biomathematics and Biometry > D-85758 Oberschleissheim Postfach 11 29 > Karsten.Rodenacker_AT_gsf.de | http://ibb.gsf.de/ > http://ibb.gsf.de/homepage/karsten.rodenacker/ > Voice: +49 89 31873401 | Voicemail/FAX: ..193401 Karsten Rodenacker -------------------------------------------------------------------- :-) GSF - Institute of Biomathematics and Biometry D-85758 Oberschleissheim Postfach 11 29 Karsten.Rodenacker_AT_gsf.de | http://ibb.gsf.de/ http://ibb.gsf.de/homepage/karsten.rodenacker/ Voice: +49 89 31873401 | Voicemail/FAX: ..193401 |
In reply to this post by Jacqueline Ross
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 |
Dear Jacqui,
in the book "Digital Imageprocessing" ("Digitale Bildverarbeitung") by Wilhelm Burger and Mark James Burge I read: "Because the subjective birghtness of red and green are much higher than that of blue the result would be too dark in the regions with a high green and red ratio if you would just use the formula (R+G+B)/3. This is why usually a weighted sum, the so called luminosity (freely translated from the German word "Luminanz") is used. In most cases (also in ImageJ) the weights used in coding the analog TV-color-signals are used." I also don't know how these weights were calculated, but I hope I could lead you into the right direction. Cheers, Daniel -------- Original-Nachricht -------- Datum: Mon, 19 Feb 2007 18:12:09 +1300 Von: Jacqui Ross <[hidden email]> An: [hidden email] CC: Betreff: Re: "Grayscale" values for RGB images > 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 -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out |
Hi group,
there are different weightings of the RGB components depending on the color space used. The one used by ImageJ and many other image processing programs is that of European (PAL) TV (I don't know about US TV) Y = 0.299 R + 0.587 G + 0.114 B. according to Wikipedia, sBRG has different values Y = 0.2126 R + 0.7152 G + 0.0722 B The difference lies in the definition of the primary colors R, G and B. Michael ________________________________________________________________ On 19 Feb 2007, at 09:23, Daniel Wibbing wrote: > Dear Jacqui, > > in the book "Digital Imageprocessing" ("Digitale Bildverarbeitung") > by Wilhelm Burger and Mark James Burge I read: > "Because the subjective birghtness of red and green are much higher > than that of blue the result would be too dark in the regions with > a high green and red ratio if you would just use the formula (R+G > +B)/3. > This is why usually a weighted sum, the so called luminosity > (freely translated from the German word "Luminanz") is used. > In most cases (also in ImageJ) the weights used in coding the > analog TV-color-signals are used." > > I also don't know how these weights were calculated, but I hope I > could lead you into the right direction. > > Cheers, > Daniel >> 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 > > -- > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... > Jetzt GMX TopMail testen: www.gmx.net/de/go/mailfooter/topmail-out |
Michael Schmid wrote:
> there are different weightings of the RGB components depending > on the color space used. > The one used by ImageJ and many other image processing programs > is that of European (PAL) TV (I don't know about US TV) > Y = 0.299 R + 0.587 G + 0.114 B. US TV uses the NTSC formula, which is the same as that for PAL. Cf. http://www.answers.com/topic/yuv NTSC = National Television System Committee. Cf. http://www.ntsc-tv.com/ -Jeremy |
In reply to this post by Jacqueline Ross
Hi Jacqui,
If you have single channel, like FITC my advise is to use only the intensity of of the green pixels; so you arrive at 1*G+0*R+0*B. If you have data on 2 channels: like one primary and some "bleeding" to a second one use 0.5*G+0.5*R+0*B. But here you have to bear ain mind the different sensitivity of the camera in the different parts of the the spectrum. So if you expected that your camera is less sensitive in the red you should increase the weight of the R >0.5. Cheers Dimiter _______________________________________________________________________ Dr Dimiter Prodanov, MD, Ph.D. Neural Engineering Rehabilitation Laboratory (Laboratoire de Génie de la Réhabilitation Neurale) Département de Physiologie et Pharmacologie Université catholique de Louvain Avenue Hippocrate, 54 POBox UCL-5446 / B-1200 Bruxelles -Belgique- Phone: 00-322-764 5596 Fax: 00-322-764 9422 http://www.md.ucl.ac.be/gren |
In reply to this post by Jacqueline Ross
Jacqui Ross wrote:
> [...] > Or should I be using RGB weighting? If so, how should > this be determined experimentally for the camera? Find an example of the highest contrast between stained and unstained, sample and average the R, G & B pixels from corresponding regions, and weight the differences. I.e., Ravg,stained = avg of R values from the sampled region of the stained image Ravg,unstained = avg of R values from the corresponding region of the unstained image Gavg,stained = " G " Gavg,unstained = " G " ... Rdif = Ravg,stained - Ravg,unstained Gdif = Gavg,stained - Gavg,unstained Bdif = Bavg,stained - Bavg,unstained Rwt = Rdif / (Rdif + Gdif + Bdif) Gwt = Gdif / (Rdif + Gdif + Bdif) Bwt = Bdif / (Rdif + Gdif + Bdif) V = Rwt*R + Gwt*G + Bwt*B HTH, -Jeremy |
In reply to this post by Jacqueline Ross
Possibly it might not help for further clarification but:
1. IMHO for real (aka exact) fluorescence measurement a b/w camera is best with adjustable parameters since for measurement the integral intensity is the object of interest, which are ruled by the filters of the microscope! Using a color camera the fluorescence 'spectrum' is divided by the rgb filters inbuilt in the camera (and additionally corrupted by the pixel arrangement system of the camera). 2. Having a color camera to have impressive colors contradicts exact measurement. Hence better microscopes are equipped by a color camera and a measure camera or only a measure camera with a quick rgb scan inbuilt for visualization. 3. Handling data unluckily gathered with a rgb ccd camera I recommend to use the channel (weight 1!) with the most prominent signal (e.g. FITS green). Not to loose information I am measuring the red and the blue channel additionally separately (so to say each with weight 1)! This can serve for quality control (microscope/filter adjustment, labelling) or possibly there is in the red part of FITS a Noble price hidden?!? best regards Karsten Am 19.02.2007 um 06:12 schrieb Jacqui Ross: > 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. |
Free forum by Nabble | Edit this page |