[Insight-users] RGB to gray conversion with itk::ImageFileReader
Pavani, Sri Kaushik
spavani at unizar.es
Tue Aug 17 13:52:38 EDT 2004
Hi,
typedef itk::Image<unsigned char, 2 > ImageType;
typedef itk::ImageFileReader< ImageType > ReaderType;
When I use this reader to read a color image with (RGB components), how does the pixel information from the three channels of the original image (R, G and B) get mapped to the 2D image instance I created?
I suspected that the standard procedure of converting RGB to gray (Y [luminance] = 0.3R + 0.59G + 0.11B) was done internally, but the results of tests I made regarding this were slightly different. I obtained Y = 0.2197R + 0.691G + 0.089B. Was this transformation purposeful, or, am I doing something wrong?
Many Thanks,
Kaushik.
_________________________________________________________
Sri Kaushik Pavani
María de Luna, 1. Ed. Ada Byron, D2.03.
Dep. de Ingeniería Electrónica y Comunicaciones
Centro Polictécnico Superior
Universidad de Zaragoza
E-50018 Zaragoza.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20040817/c9ba344d/attachment.html
More information about the Insight-users
mailing list