Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.7 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.7 KB

Kuwahara Filter

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.

Usage

  1. Clone the repository / or download the source code.
git clone https://github.com/prashantrahul141/kuwahara-filter
  1. Build using cargo, or download binaries from the releases page.
cargo build
  1. 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.

Images

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/