<div class="gmail_quote">On Tue, Feb 9, 2010 at 8:53 AM, circass <span dir="ltr"><<a href="mailto:circass@gmail.com">circass@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi my friends,<br>
i m trying to use sobel filter, it works at the first time but when i try to<br>
make a second filtering on filtered image it gives me an error about scalar<br>
component number. it says it can work with only one scalar component.<br>
<br>
Thanx, Circass.<br><br></blockquote><div><br></div><div>The problem is that vtkImageSobel2D produces a vector image:</div><div><br></div><span class="Apple-style-span" style="font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; font-size: 12px; "><a class="el" href="classvtkImageSobel2D.html" title="Computes a vector field using sobel functions." style="color: rgb(27, 119, 197); font-weight: bold; text-decoration: none; ">vtkImageSobel2D</a> 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.</span><br clear="all">
<br></div><div class="gmail_quote">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 </div>
<div class="gmail_quote"><br></div><div class="gmail_quote">1 0 1</div><div class="gmail_quote">2 0 2</div><div class="gmail_quote">1 0 1</div><div class="gmail_quote"><br></div><div class="gmail_quote">at each pixel to come up with a scalar at each pixel?</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Thanks,<br><br><div>David</div></div>