Hi Zach,<br>
<br>
Thanks for the response. I managed to fiddle with the parameters properly and get a much better result than before.<br>
<br>
Yeah, sorry i think i sounded a little confusing in my previous mail. I
am using the canny filter on the original image and the thresholding
was done for something else.<br>
<br>
If i may just ask one more question (to highlight my lack of experience
with feature detection), what other ITK features can be used to analyse
the results of the canny filter? (I'm keen to mainly find the corners
of the silhouettes) and get the lengths of line segments etc.<br>
<br>
Thanks for your help!<br>
<br>
Cheers,<br>
Sosati<br><br><div><span class="gmail_quote">On 10/14/05, <b class="gmail_sendername">Zachary Pincus</b> <<a href="mailto:zpincus@stanford.edu">zpincus@stanford.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The documentation for this filter (<a href="http://www.itk.org/Doxygen/html/">http://www.itk.org/Doxygen/html/</a><br>classitk_1_1CannyEdgeDetectionImageFilter.html , or simply embedded<br>in the header file) clearly specifies the parameters:
<br><br>> There are four parameters for this filter that control the sub-<br>> filters used by the algorithm.<br>><br>> Variance and Maximum error are used in the Gaussian smoothing of<br>> the input image. See itkDiscreteGaussianImageFilter for information
<br>> on these parameters.<br>><br>> Threshold is the lowest allowed value in the output image. Its data<br>> type is the same as the data type of the output image. Any values<br>> below the Threshold level will be replaced with the OutsideValue
<br>> parameter value, whose default is zero.<br>><br>Note also that the traditional Canny filter uses two thresholds for<br>the "hysteresis thresholding" process. If you desire to do the same<br>(which I highly recommend), the filter provides methods to set the
<br>upper and lower thresholds separately.<br><br>There is a great deal of literature about the Canny filter available<br>online, which covers in detail what the parameters do and how to set<br>them. Basically, you'll want to choose a variance that smoothes out
<br>the noise in your image but not the edges of interest. Then choose a<br>high threshold that will only be obtained on a real image edge, and a<br>low threshold which is more permissive. You'll probably need to play<br>
with the parameters to do this, but it shouldn't be too hard.<br><br>Zach<br><br>PS. Why use the Canny filter at all if you have a binary thresholded<br>image of box versus background? I presume that the Canny filter is<br>
used in a different step?<br><br><br>On Oct 13, 2005, at 6:47 AM, arctic sliver wrote:<br><br>> Hi,<br>><br>> I'm trying to apply ITK for a small project with robot vision.<br>> Essentially, I'm taking a snapshot of a box with a certain
<br>> silhouette with a digital camera and i'm trying to classify the<br>> type of silhouette in that insert. The silouettes are white and the<br>> box is black, so I've used a binary threshold and obtained a pretty
<br>> accurate white on black image.<br>><br>> I'm trying to use the canny filter, but can't seem to get the<br>> results i'm after. i think there's too much noise in the image, as<br>> i'm getting random lines all over the place as well as the outline
<br>> of the shape. I've actually tried this tool : http://<br>> <a href="http://homepages.inf.ed.ac.uk/rbf/HIPR2/cannydemo.htm">homepages.inf.ed.ac.uk/rbf/HIPR2/cannydemo.htm</a> with my image and<br>> it detects the exact edge i want.
<br>><br>> Can anyone please point out where i can get information about<br>> tuning the parameters? the website i saw mentioned several tuning<br>> parameters for the canny filter, but with ITK, i have only seen the
<br>> SetThreshold function as a parameter. In the end, i'd like to use<br>> hough transform to detect the image. the actual silouette looks<br>> like this:<br>><br>><br>><br>> _________
<br>> | |<br>> ______| |<br>> | |<br>> | |<br>> |______________|<br>><br>> Any help would be greatly appreciated.
<br>><br>> Cheers,<br>><br>> Sos<br>> _______________________________________________<br>> Insight-users mailing list<br>> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>> <a href="http://www.itk.org/mailman/listinfo/insight-users">
http://www.itk.org/mailman/listinfo/insight-users</a><br>><br><br></blockquote></div><br>