Hi,<br>you can use <a class="el" href="http://www.vtk.org/doc/release/5.4/html/a00771.html" title="Computes magnitude of the gradient.">vtkImageGradientMagnitude</a> too<br><br>regards.<br><br>Sergio<br><br><div class="gmail_quote">
On Tue, Feb 9, 2010 at 4:02 PM, Jérôme <span dir="ltr"><<a href="mailto:jerome.velut@gmail.com">jerome.velut@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>Sobel filter has several components in its output because it computes a gradient<br>separately for x and y. You can use vtkImageMagnitude after your sobel to get <br>only one component. This way, you can re-compute the sobel.<br>
<br>HTH<br>Jerome<br><br><div class="gmail_quote">2010/2/9 circass <span dir="ltr"><<a href="mailto:circass@gmail.com" target="_blank">circass@gmail.com</a>></span><div><div></div><div class="h5"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi David, thanx for your answer,<br>
<br>
Actually i m trying to make an edge detection operation and i want to make<br>
it repeatetly.<br>
<br>
I searched for it and find sobel Filter. is there any other filter you can<br>
advice me ?<br>
<br>
Thanx,<br>
Circass<br>
<div><br>
<br>
David Doria-2 wrote:<br>
><br>
> On Tue, Feb 9, 2010 at 8:53 AM, circass <<a href="mailto:circass@gmail.com" target="_blank">circass@gmail.com</a>> wrote:<br>
><br>
>><br>
>> Hi my friends,<br>
>> i m trying to use sobel filter, it works at the first time but when i try<br>
>> to<br>
>> make a second filtering on filtered image it gives me an error about<br>
>> scalar<br>
>> component number. it says it can work with only one scalar component.<br>
>><br>
>> Thanx, Circass.<br>
>><br>
>><br>
> The problem is that vtkImageSobel2D produces a vector image:<br>
><br>
</div>> vtkImageSobel2D <classvtkImageSobel2D.html> computes a vector field from a<br>
<div>> scalar field by using Sobel functions. The number of vector components is<br>
> 2<br>
> because the input is an image. Output is always doubles.<br>
><br>
> This "image" has a vector (more than one component) at each "pixel". This<br>
> is<br>
> why you can't filter it again. I actually don't understand though, I<br>
> thought<br>
> the Sobel filter just multiplied a mask such as<br>
><br>
> 1 0 1<br>
> 2 0 2<br>
> 1 0 1<br>
><br>
> at each pixel to come up with a scalar at each pixel?<br>
><br>
> Thanks,<br>
><br>
> David<br>
><br>
</div><div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
<br>
</div><font color="#888888">--<br>
View this message in context: <a href="http://old.nabble.com/Sobel-Filter-tp27515510p27515819.html" target="_blank">http://old.nabble.com/Sobel-Filter-tp27515510p27515819.html</a><br>
</font><div><div></div><div>Sent from the VTK - Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div></div></div><br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>