[Insight-users] RGBToLuminance Image Filter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Mon Jan 26 03:30:06 EST 2009


Le 25 janv. 09 à 23:44, Thorsten W. a écrit :

> Hi,
>
> i'am working with the RGBToLuminance Image Filter. For  
> documentation, i
> have to know, how the filter works... the mathematical concept behind
> the filter...
>

Hi Thorsten,

ITK is fully open source, so you can just found what you want in the  
source code!

Line 55 of itkRGBToLuminanceImageFilter (http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/BasicFilters/itkRGBToLuminanceImageFilter.h?view=annotate&root=Insight 
) you can see that filter simply call the GetLuminance() method of the  
RGBPixel class, which as been defined at the line 177 of the file  
itkRGBPixel.txx (http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkRGBPixel.txx?root=Insight&r1=1.17&r2=1.18 
) by "ibanez" as

   const double luminance =
     0.30  * this->GetRed()   +
     0.59  * this->GetGreen() +
     0.11  * this->GetBlue();

This should correspond to a predefined color space (http://en.wikipedia.org/wiki/RGB_color_space 
) which doesn't seem to be documented. CVS tells you who has commited  
that code though, so you know you should ask to Luis for more  
information :-)

Regards,

Gaëtan

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.mandriva.org
http://www.itk.org  http://www.clavier-dvorak.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090126/cf5e1e7e/attachment.pgp>


More information about the Insight-users mailing list