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 nonlinear 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.
  • KuwaharaFilter[data,{r1,r2,}] uses blocks.
  • KuwaharaFilter assumes the index coordinate system for lists and images.
  • At the data boundaries, KuwaharaFilter uses smaller neighborhoods.

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  (4)

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:

Use a Kuwahara filter to create an artistic oil painting effect:

Properties & Relations  (2)

Compare Kuwahara to mean filter:

Compare Kuwahara to other edge-preserving filters:

Neat Examples  (1)

Repeatedly apply KuwaharaFilter to an image:

Wolfram Research (2010), KuwaharaFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/KuwaharaFilter.html (updated 2016).

Text

Wolfram Research (2010), KuwaharaFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/KuwaharaFilter.html (updated 2016).

CMS

Wolfram Language. 2010. "KuwaharaFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/KuwaharaFilter.html.

APA

Wolfram Language. (2010). KuwaharaFilter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KuwaharaFilter.html

BibTeX

@misc{reference.wolfram_2023_kuwaharafilter, author="Wolfram Research", title="{KuwaharaFilter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/KuwaharaFilter.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_kuwaharafilter, organization={Wolfram Research}, title={KuwaharaFilter}, year={2016}, url={https://reference.wolfram.com/language/ref/KuwaharaFilter.html}, note=[Accessed: 19-April-2024 ]}