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
vertical.
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.
Example of usage of the kuwahara filter to smooth and perserve edges.
Description
Kuwahara filter is put to use here, smoothing while preserving edges. Here
is a image which shows the exact quadrants used in a 5x5. Each quadrant is
then a 3x3 with some overlap on the next.
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.
GUI Screenshot
kuwahara gui
Example GUI
Screenshot of the GUI with parameters set to perform the kuwahara
filter with a 5x5 boxcar on the image peaks.cub.
Input Image
The image before the filter
Input image before kuwahara filter
Parameter Name:
FROM
This is the image as it was taken originally.
Output Image
The image after the filter
Output image after being smoother by kuwahara filter.
Parameter Name:
TO
As you can observe, the image has been smoothed, but still retains
the edges present in the original image.