Kuwahara is a edge preserving smoothing filter. This is accomplished through
examining the four quadrants surrounding a pixel, selecting the one with the
smallest variance, and using its average as the resultant pixel value. In
the case where two or more variances are equivalent, the average from the
first quadrant encountered with an equivalent variance will be used.
This parameter sets the width, or number of samples, to have the
filter process. This must be an odd number. The larger this is the
larger the details that will be smoothed. A wide and short filter will
do mostly horizantal smoothing, a tall and narrow filter mostly
This parameter sets the number of lines to be processed by the filter.
This must be an odd number. Larger sizes will smooth larger features.
A wide and short filter will do mostly horizantal smoothing, a tall
and narrow filter mostly vertical.
This example will filter the image using a 5x5 boxcar with subunit
size of 3x3. The size in this case is unnecessray since 5 is default,
but for other sizes a different, odd numbed, could be placed there.
Screenshot of the GUI with parameters set to perform the kuwahara
filter with a 5x5 boxcar on the image peaks.cub.
The image before the filter
Input image before kuwahara filter
This is the image as it was taken originally.
The image after the filter
Output image after being smoother by kuwahara filter.
As you can observe, the image has been smoothed, but still retains
the edges present in the original image.