[Insight-users] RGB Input to ImageFileReader defined with 'unsigned char' type ?
Sharath Venkatesha
sharath20284 at yahoo.com
Wed Jul 8 15:58:55 EDT 2009
Hi Bradley,
Thanks for the information.
I got the doubt as my results change in the two cases (though by very small amount, initially ), i.e with and without using itkRGBToLuminanceImageFilter.
I feed the input images to registration filter, and the output parameters of registration change (in second decimal values) per iteration.
And over multiple iterations of the optimizer, I get a change of 2-3 pixels in translation parameters, and the angle also changes by 0.5 degrees, for a particular set of input images. All the other parameters involved remain constant in both the cases.
I want to know the correct method to follow.
Thanks,
Sharath Venkatesha
________________________________
From: Bradley Lowekamp <blowekamp at mail.nih.gov>
To: Sharath Venkatesha <sharath20284 at yahoo.com>
Cc: Insight users <insight-users at itk.org>
Sent: Wednesday, July 8, 2009 12:32:07 PM
Subject: Re: [Insight-users] RGB Input to ImageFileReader defined with 'unsigned char' type ?
Hello Sharath,
This conversion is done through with itk::ConvertPixelBuffer:
http://www.itk.org/Doxygen/html/classitk_1_1ConvertPixelBuffer.html
This class is responsible for doing all the conversions that occur when reading an image from a file into your itk::Image. When the types don't match it auto-magically converts the types. This enable one to read a file of chars into an itk::Image of floats with out any problems.
For you particular case it computes the luminance based on the RGB values to get "grey" pixels. The RGBToLuminance filter should give simular results as well.
Brad
On Jul 8, 2009, at 3:19 PM, Sharath Venkatesha wrote:
>Hi,
>
>I observed that it works, if I give RGB input image to a ImageFileReader defined with 'unsigned char' type.
>Is the behaviour defined?Are there many approximations involved?
>
>I generally use itkRGBToLuminanceImageFilter to convert RGB input images to grayscale, before performing registration.
>
>
>Thanks,
>Sharath
>
>
>
>
>_____________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
>Follow this link to subscribe/unsubscribe:
>http://www.itk.org/mailman/listinfo/insight-users
>
========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090708/b35f6479/attachment.htm>
More information about the Insight-users
mailing list