[Insight-users] Size of kernel in *GaussianImageFilter

Cagatay Bilgin bilgincc at gmail.com
Mon Jul 23 12:46:26 EDT 2012


Hi David,

I struggled with the Gaussian filtering in ITK before.
The discrete gaussian filter gives you the option for
 setting the maximum kernel size implicitly by using
the maximum error in the approximation. There is
also SetMaximumKernelWidth that can be used to
set the upperbound on the kernel size. My understanding
is that based on these options the kernel size is
automatically set for the discrete gaussian filter.

Perhaps the API should be updated so that the filters
match each other. It is disturbing to use setsigma or
setvariance depending on the smoothing filter you
are using.

Cheers,
Cagatay

On Mon, Jul 23, 2012 at 9:34 AM, David Doria <daviddoria at gmail.com> wrote:

> In both SmoothingRecursiveGaussianImageFilter and
> DiscreteGaussianImageFilter, there is a single parameter, 'sigma'
> (in SmoothingRecursiveGaussianImageFilter) and 'variance'
> (in DiscreteGaussianImageFilter). In both cases, this is the variance of
> the Gaussian kernel that is to be used. However, I don't see a way to set
> the discrete size of the kernel to be used? That is, if you apply a
> sigma=10 kernel with a 10x10 kernel, that will produce a very different
> result than applying a sigma=10 kernel with a 2x2 kernel. Is this kernel
> size automatically set based on sigma/variance?
>
> A related question - with variance=0, the output
> of DiscreteGaussianImageFilter is an unmodified version of the input image.
> However, with sigma=0, the output of SmoothingRecursiveGaussianImageFilter
> is simply an all black image. Is this a bug? Or does it mean that there is
> a different interpretation of sigma vs variance in these filters?
>
> Thanks,
>
> David
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120723/5fc6b8a7/attachment.htm>


More information about the Insight-users mailing list