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.


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:
-
list arbitrary-rank numerical array tseries temporal data such as TimeSeries, TemporalData, … image arbitrary Image or Image3D object audio an Audio object video a Video 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 all close allScope (8)
Data (6)
Applications (4)
Properties & Relations (2)
Neat Examples (1)
Repeatedly apply KuwaharaFilter to an image:
History
Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0) ▪ 2016 (11.0) ▪ 2025 (14.3)
Text
Wolfram Research (2010), KuwaharaFilter, Wolfram Language function, https://reference.wolfram.com/language/ref/KuwaharaFilter.html (updated 2025).
CMS
Wolfram Language. 2010. "KuwaharaFilter." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. 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_2025_kuwaharafilter, author="Wolfram Research", title="{KuwaharaFilter}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/KuwaharaFilter.html}", note=[Accessed: 18-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_kuwaharafilter, organization={Wolfram Research}, title={KuwaharaFilter}, year={2025}, url={https://reference.wolfram.com/language/ref/KuwaharaFilter.html}, note=[Accessed: 18-August-2025]}