Edge-preserving smoothing for artistic abstraction
The Kuwahara filter is a non-linear smoothing filter that preserves edges while reducing noise. Named after Michiyoshi Kuwahara, it was developed for medical imaging but is now widely used for artistic effects.
For each pixel, the filter divides the neighborhood into 4 overlapping quadrants. It calculates the mean and variance of each quadrant, then outputs the mean of the quadrant with the lowest variance (most uniform region).
This produces a painterly effect: flat areas become smoother while edges remain sharp, similar to brush strokes in impressionist painting. The effect intensifies with larger kernel sizes and multiple iterations.