Suggestion-Box
Suggestion-Box copied to clipboard
Kuwahara Filtering
This algorithm was invented with fixing images with missing pixels. It however doesn't work that well for that, but what it works well for is art.
Kuwahara Filtering works like a blur algorithm.
Here are the needed steps:
- Imagine a rectangle around each pixel
- Divide the rectangle into 4 equally sized sectors
- For each sector get the average color and the color deviation
- Lastly pick the sector with the smallest deviation and use its color
I've somehow implemented the algorithm, but it is far from acceptable. Here is the result:
Image before:
And after:
With a bigger texel size (I didn't implement the texel size computation):