This is a repo for image processing algorithms implemented in rust.
Currently the only algorithm is a "cartoonify" algorithm that flattens regions of similar color in the image creating a Miyazaki-esque cartoon or a watercolor-esque image.
It accepts 2 parameters which can be specified from the command line
- pct - This is the "sensitivity" of the algorithm. This property tells the algorithm what percentage of the lowest volatility regions to "flatten" after each pass. I've found somehwere from .5 to .85 to be good choices for this.
- passes - The algorithm always does one pass by subdividing the image into a grid. This parameter sets the number of times the algorithm will sweep the image with its convolution matrix. I've found 25 to 100 to be good choices for this.
cargo build
./target/debug/imagemanip in=/path/to/input/image.bmp out=/path/to/output/image.bmp passes=20 pct=.85
./target/release/imagemanip in=/path/to/input/image.bmp out=/path/to/output/image.bmp alg=v1 passes=60
- Support for gif, especially animated gifs
- Multithread boost to parallelize processing of gif frames
- Modify flattening algorithm to optionally use mode if one exists, falling back to mean
- Deterministic default file names for output path placed in same directory if not specified by user.
- Support for jpeg
- "Outlining" algorithm for drawing black borders around large color regions in an already "cartoonified" image
- Support for non-matching input and output file extensions
- Support for png
- Support for some form of short video (mp4? AVI? mpeg?)
Select algorithms via CLI paramGet cartoonify_v1 working as intendedReadonly and thread-optimized cartoonify_v1