[vtkusers] Sobel Filter

David Doria daviddoria+vtk at gmail.com
Tue Feb 9 09:00:31 EST 2010


On Tue, Feb 9, 2010 at 8:53 AM, circass <circass at gmail.com> wrote:

>
> Hi my friends,
> i m trying to use sobel filter, it works at the first time but when i try
> to
> make a second filtering on filtered image it gives me an error about scalar
> component number. it says it can work with only one scalar component.
>
> Thanx, Circass.
>
>
The problem is that vtkImageSobel2D produces a vector image:

vtkImageSobel2D <classvtkImageSobel2D.html> computes a vector field from a
scalar field by using Sobel functions. The number of vector components is 2
because the input is an image. Output is always doubles.

This "image" has a vector (more than one component) at each "pixel". This is
why you can't filter it again. I actually don't understand though, I thought
the Sobel filter just multiplied a mask such as

1 0 1
2 0 2
1 0 1

at each pixel to come up with a scalar at each pixel?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100209/6827c5a5/attachment.htm>


More information about the vtkusers mailing list