[Insight-users] How to use HoughTransform2DCirclesImageFilter?
Julien Jomier
jjomier at cs.unc.edu
Sat, 7 Feb 2004 10:48:55 -0500
Hi Sandhya,
The goal of the HoughTransform2DCirclesImageFilter is to return an
accumulator (GetOutput()) and a radius image (GetRadiusImage()). The filter
takes all pixels above a threshold (Set/GetThreshold) and first computes the
local gradient at that position. The computation of the gradient is done
using a derivative of a gaussian and can be tuned using SetSigmaGradient().
Then the accumulator and the radius image are filled in the direction of the
gradient only, unless a sweep angle (SetSweepAngle()) has been defined. As a
result of the computation you get a Hough map (the accumulator) where the
intensity values represent the probability to have a circle at that position
and a radius map indicates the radius at that center pixel.
At this point the user has total control of these two "images".
To simplify the use of this filter, we have added the GetCircles() function
which returns a list of EllipseSpatialObjects. This function does the
interpretation of the accumulator and the radius image. First the
accumulator is blurred, SetVariance() sets the variance of the gaussian.
Then the position of the maximum intensity value is found and its
corresponding radius value is defined via the radius image. A black disk is
drawn on the accumulator to remove the maximum intensity value. The size of
this black disk is define by the SetDiskRadiusRatio() function. Then we
iterate until the number of circles (SetNumberOfCircles) is reached.
We decided to set the number of circles, but you can easily create your own
GetCircles() function and stop the iterative process when the maximum
intensity value is below a threshold.
I'll improve the documentation for this example.
Let us know if you have any other questions.
Julien
----- Original Message -----
From: CSPL
To: insight-users at itk.org
Sent: Saturday, February 07, 2004 8:24 AM
Subject: [Insight-users] How to use HoughTransform2DCirclesImageFilter?
Hello,
I am using HoughTransform2DCirclesImageFilter to identify the number of
circles in the image. I am not getting how to use this filter exactly. I
have the following doubts.
What is the exact use of SetNumberOfCircles function? When I am giving
input to this function its drawing that many number of circles, even though
input image does not contain that many circles.
What is Houghmap? After getting the HoughFilter output to an accumulator,
it is not used anywhere, what does it contains.
What is the use of SetDiskRadiusRatio, SetSweepAngle, SetSigmaGradient,
SetVariance functions? I am not able to follow about this functions
information given in itk documentation.
Can anyone give me some more information about this functions.
Regards,
sandhya