[vtkusers] Image RGBToHSV Conversion Example Clarification

David Doria daviddoria at gmail.com
Mon Jun 15 08:21:43 EDT 2015


On Sun, Jun 14, 2015 at 1:43 PM, Ashray Malhotra <
ashray.malhotra.1994 at gmail.com> wrote:

> Hello,
>
> I found this example of converting an RGB input image to the HSV color
> domain.
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Images/RGBToHSV
>
> In the extractHue, saturation and value filters, input is the output of
> image reader whereas I believe it should be the output of the vtkImageRGBToHSV
> filter. I ran the above example on a test image and got this result
>
> https://github.com/ashray/VTKCodes/blob/master/Some%20other%20custom%20codes/RGBToHSV/RGBDisplay-WikiCode.png
>
> I modified the code by giving the input as output of vtkImageRGBToHSV
> filter.
> My code is
>
> https://github.com/ashray/VTKCodes/blob/master/Some%20other%20custom%20codes/RGBToHSV/RGBToHSV.cxx
>
> And the output image that I get is
>
> https://github.com/ashray/VTKCodes/blob/master/Some%20other%20custom%20codes/RGBToHSV/HSVDisplay-GitHubCode.png
>
> which is completely different from the previous one.
>
> Can someone please tell me if I am making an error or is there an error in
> the example.
>
> Thanks a lot.
>
> Regards
> Ashray Malhotra
>
>
You are correct - it was a typo. I've corrected it on the wiki.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150615/11af2f24/attachment.html>


More information about the vtkusers mailing list