[Insight-users] tunning parameters for canny edge detection and hough transform

arctic sliver arcticsliver02 at gmail.com
Fri Oct 14 01:21:53 EDT 2005


Hi Zach,

Thanks for the response. I managed to fiddle with the parameters properly
and get a much better result than before.

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.

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.

Thanks for your help!

Cheers,
Sosati

On 10/14/05, Zachary Pincus <zpincus at stanford.edu> wrote:
>
> The documentation for this filter (http://www.itk.org/Doxygen/html/
> classitk_1_1CannyEdgeDetectionImageFilter.html , or simply embedded
> in the header file) clearly specifies the parameters:
>
> > There are four parameters for this filter that control the sub-
> > filters used by the algorithm.
> >
> > Variance and Maximum error are used in the Gaussian smoothing of
> > the input image. See itkDiscreteGaussianImageFilter for information
> > on these parameters.
> >
> > Threshold is the lowest allowed value in the output image. Its data
> > type is the same as the data type of the output image. Any values
> > below the Threshold level will be replaced with the OutsideValue
> > parameter value, whose default is zero.
> >
> Note also that the traditional Canny filter uses two thresholds for
> the "hysteresis thresholding" process. If you desire to do the same
> (which I highly recommend), the filter provides methods to set the
> upper and lower thresholds separately.
>
> There is a great deal of literature about the Canny filter available
> online, which covers in detail what the parameters do and how to set
> them. Basically, you'll want to choose a variance that smoothes out
> the noise in your image but not the edges of interest. Then choose a
> high threshold that will only be obtained on a real image edge, and a
> low threshold which is more permissive. You'll probably need to play
> with the parameters to do this, but it shouldn't be too hard.
>
> Zach
>
> PS. Why use the Canny filter at all if you have a binary thresholded
> image of box versus background? I presume that the Canny filter is
> used in a different step?
>
>
> On Oct 13, 2005, at 6:47 AM, arctic sliver wrote:
>
> > Hi,
> >
> > I'm trying to apply ITK for a small project with robot vision.
> > Essentially, I'm taking a snapshot of a box with a certain
> > silhouette with a digital camera and i'm trying to classify the
> > type of silhouette in that insert. The silouettes are white and the
> > box is black, so I've used a binary threshold and obtained a pretty
> > accurate white on black image.
> >
> > I'm trying to use the canny filter, but can't seem to get the
> > results i'm after. i think there's too much noise in the image, as
> > i'm getting random lines all over the place as well as the outline
> > of the shape. I've actually tried this tool : http://
> > homepages.inf.ed.ac.uk/rbf/HIPR2/cannydemo.htm<http://homepages.inf.ed.ac.uk/rbf/HIPR2/cannydemo.htm>with my image and
> > it detects the exact edge i want.
> >
> > Can anyone please point out where i can get information about
> > tuning the parameters? the website i saw mentioned several tuning
> > parameters for the canny filter, but with ITK, i have only seen the
> > SetThreshold function as a parameter. In the end, i'd like to use
> > hough transform to detect the image. the actual silouette looks
> > like this:
> >
> >
> >
> > _________
> > | |
> > ______| |
> > | |
> > | |
> > |______________|
> >
> > Any help would be greatly appreciated.
> >
> > Cheers,
> >
> > Sos
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20051014/86be5014/attachment.html


More information about the Insight-users mailing list