Home

Quick Links

Software Manual
GitHub
API Reference

Documentation Versions

Public Release
8.3.0
8.2.0
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0
USGS

ISIS Application Documentation


kuwahara

Standard View | TOC | Home

Filter a cube, smoothing but preserving edges

Description
Categories
Groups
Examples
History


Description

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.

Categories


Parameter Groups

Files

Name Description
FROM Input cube to be smoothed
TO Output cube

Boxcar size

Name Description
SAMPLES The number of samples, width, of the boxcar
LINES The size of the filter boxcar

Files: FROM

Description

Use this parameter to select the input cube. All bands within the file will be filtered.

Type cube
File Mode input
Filter *.cub

Files: TO

Description

This file will contain the results of the filter.

Type cube
File Mode output
Filter *.cub

Boxcar size: SAMPLES

Description

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.

Type integer
Default 5
Minimum 1 (inclusive)
Odd This value must be an odd number

Boxcar size: LINES

Description

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.

Type integer
Default 5
Minimum 1 (inclusive)
Odd This value must be an odd number

Examples


Example 1

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.
          
        

Command Line

kuwahara from=peaks.cub to=smooth.cub samples=5 lines=5
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.


History

Mackenzie Boyd2009-05-19 Original version
Mackenzie Boyd2009-05-20 Added examples, test
Mackenzie Boyd2009-06-04 Fixed images in documentation
Mackenzie Boyd2009-06-09 Made ostruthdata for samson only to handle problem with rounding errors