[vtkusers] Gaussian kernel

Andinet Enquobahrie andinet.enqu at kitware.com
Wed Apr 5 10:39:23 EDT 2006


Hi Michany,

>Dear VTK Users,
>
>I'd like to use vtkImageGaussianSmooth class to convolve my 8-bit gray-
>scale image with the Gaussian kernel.
>Of course, I managed to use the filter and convolution works just fine, I 
>only want to know how to set the size of the Gaussian kernel.
>I found a method which affects the behavior of the filter:
>
>SetStandardDeviation();
>
>Incrementing the parameter of this method (I tried 1.0 .. 6.0) looks like 
>using bigger Gaussian kernels.
>How do I know whether a specific value passed to this method results 
>in using which Gaussian kernel?
>I could not find a method like
>
>SetKernelSizeTo3x3()
>
>or
>
>SetKernelSizeTo5x5()
>
>Is there a way to know which kernel this filter uses and how to set the 
>size of kernel? (I have to convolve the image with Gaussian kernels of 
>the size of 3x3, 5x5, 7x7, etc...)
>  
>
The size of the kernel is computed internally using the standard 
deviation and the radius factor parameters. If you take a look at the 
vtkImageGaussianSmooth::ExecuteAxis(.......) method, the kernel size 
computation is clearly

radius = (int) (this->StandardDeviations[axis] * this->RadiusFactors[axis]);
size = 2*radius + 1;
kernel = new double[size];

Therefore, if you are interested in using specific kernel sizes, you 
have to set the appropriate standard deviation and radius factor 
parameters to achieve your kernel size of interest.

HTH,

-Andinet




>Thanks a lot,
>
>  Michnay
>
>________________________________________________________________________
>A legjobb akciós utazások oldala, ahol most rengeteg nyeremény vár Rád:
>www.budavartours.hu
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>  
>





More information about the vtkusers mailing list