KuwaharaFilter

KuwaharaFilter[data,r]

computes for each element p in data the variance of the values in the four (r+1)×(r+1) squares that have p as a corner, and replaces p with the mean of the values of the square with least variance.

Details

  • KuwaharaFilter is a non-linear local filter typically used for edge-preserving smoothing.
  • The data can be any of the following:
  • listarbitrary-rank numerical array
    tseriestemporal data such as TimeSeries, TemporalData,
    imagearbitrary Image or Image3D object
    audioan Audio object
  • For multi-channel data, KuwaharaFilter computes the sum of the variances in each channel.
  • At the edges of data, KuwaharaFilter uses smaller neighborhoods.
  • KuwaharaFilter[data,{r1,r2,}] uses squares (ri+1)×(ri+1) in dimension i of data.
  • KuwaharaFilter assumes the index coordinate system for lists and images.

Examples

open allclose all

Basic Examples  (2)

Kuwahara filtering of an image:

Kuwahara filtering of a signal:

Scope  (7)

Data  (5)

Filter a numerical list:

Filter a TimeSeries:

Filter an Audio signal:

Smoothing the image, while preserving the edges:

Kuwahara filter applied to a 3D image:

Parameters  (2)

Kuwahara filtering just in the vertical direction:

Horizontal direction:

Kuwahara filtering of a 3D image in the vertical direction only:

Filtering of the horizontal planes only:

Applications  (3)

Use Kuwahara filtering as a preprocessing step for image segmentation:

Remove salt-and-pepper noise:

Use a Kuwahara filter to remove smaller stars from an astronomical image:

Properties & Relations  (2)

Compare Kuwahara to mean filter:

Compare Kuwahara to other edge-preserving filters:

Neat Examples  (1)

Repeatedly apply KuwaharaFilter to an image:

Introduced in 2010
 (8.0)
 |
Updated in 2012
 (9.0)
2014
 (10.0)
2016
 (11.0)