The Kuwahara filter is a non-linear smoothing filter used in image processing for adaptive noise reduction. Most filters that are used for image smoothing are linear low-pass filters that effectively reduce noise but also blur out the edges. However the Kuwahara filter is able to apply smoothing on the image while preserving the edges. learn more.
- Clone the repository / or download the source code.
git clone https://github.com/prashantrahul141/kuwahara-filter
- Build using cargo, or download binaries from the releases page.
cargo build
- Using
put your "your_image.jpg"
in the build folder, same place the kuwahara-filter
executable is.
kuwahara-filter.exe --filename "your_image.jpg" --kernel 12
kernel can be any interger above 3 and not divisble by 2. With testing I have found a value somewhere around 7 - 15 works the best.
original image:with kernel = 9:
with kernel = 11:
with kernel = 15:
Photo by Flo Dahm: https://www.pexels.com/photo/couple-passing-on-street-541217/