[Insight-users] HoughTransform2DCirclesImageFilter (itk)
Luis Ibanez
luis.ibanez at kitware.com
Thu Jun 3 03:25:54 EDT 2004
Hi Ab,
You got it right,
If you take a group of (let's say) 4x4 pixels that
include the pixels with a local maximum in the
cumulator image, then you will be able to compute
a center with subpixel precision.
Note that there are already classes for BSpline
interpolation in the toolkit. You may want to
take advante of them.
Regards,
Luis
-------------------
Ab Sayeed wrote:
> Many Thanks
>
> Method 2 sound a bit more useful.
>
> I'm going through the code and it seems very difficult
> to follow. Are there any papers describing the Hough
> Transform implantation other than the Manual (pdf on
> the website)?
>
>
> My understanding so far.
>
> itkHoughTransform2DCirclesImageFilter.txx
> Line 242: center[0] = it_input.GetIndex()[0];
> Line 243: center[1] = it_input.GetIndex()[1];
>
> Retrieves the index of the highest pixel count in the
> Hough Transformed image. The Hough transform image is
> located in a the image variable
>
> postProcessImage
>
>
> In theory if I get the pixel counts from the maximum
> and it's neighbors, using
>
> postProcessImage->GetPixel(index);
>
> i can interpolate with a BSpline to find where the
> true max would be.
>
>
> Am I talking gibberish.
>
>
> Kind Regards
>
> Ab
>
>
> --- Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
>>
>>Hi Ab,
>>
>>
>>There are two things you could do in this filter
>>for making it compute the center of the circle
>>with sub-pixel precision.
>>
>>Unfortunately both of them involve modifying the
>>code of the filter.
>>
>>
>>They are:
>>
>>
>>1) Modify the size and spacing of the output
>> image in this filter. The output image
>> is used as the accumulator for the exploration
>> of the circle parametric space. Using
>> an image with higher resolution than your
>> input image will in principle give you
>> access to sub-pixel resolution. Note however
>> that the centers will still be limited by
>> the new resolution of the output.
>>
>>
>>OR
>>
>>
>>2) Introduce a BSpline interpolator in the
>> GenerateData() method of this filter.
>> With the BSpline you could compute a
>> maximum with subpixel precision in the
>> accumulator image, instead of just
>> selecting the index of the highest
>> pixel as it is done right now.
>> (see lines 242 in Insight/Code/BasicFilters/
>> itkHoughTransform2DCirclesImageFilter.txx)
>>
>>
>>
>>Option (2) is probably the best approach.
>>
>>If you feel motivated to introduce this
>>modifications, we will be happy to assist
>>you in the process, and of course will
>>welcome the modified class back into the
>>toolkit.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Luis
>>
>>
>>-----------------------
>>Ab Sayeed wrote:
>>
>>
>>>I want to get the
>>
>>HoughTransform2DCirclesImageFilter
>>
>>>to give me the centre of a circle in sub pixel
>>>precision. Any idea's on how I could do this or
>>>is there another function I can use to do this.
>>>
>>>Thanks
>>>
>>>Ab
>>>
>>>
>>
>>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends. Fun. Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
More information about the Insight-users
mailing list