TOC
With this tool you should be able to convert any image to a good ascii art with configurable characters and a configurable processing pipeline.
So far countless tools seemed to exist, but i did not find one, that uses edge detection to use fitting characters that follow an edges direction, an already solved problem in image recognition applications (besides Acerolas ASCII shader ofc, but thats a shader and not a program that outputs text).
I also needed to find at least one use for the image processing classes i had, as they seemed kind of pointless so far; after watching the infamous Acerola video i also noticed how simple the processing actually is.
- segmentation step for the foreground object
- edge detection and fitting characters
- brightness based characters (10 levels so far)
- truecolor escapes for colored pixels
- configurable kernel sizes
- color binning
- properly deal with terminal fonts (they are not 1:1)
- GUI/TUI with live reload
- Automatic Kernel size selection (in CLI/TUI)
- export as script for neovim dashboards(?)
If you feel like smth is missing open an issue.
python -m ascii_img flower.jpg brightness,edge,color -d 7 -s --bg -t 150
python -m ascii_img flower.jpg brightness,color,edge -d 9 -
This is still in an early version, so the usage is not finalized, for now you have to use -h
and look at the source for the modes (main function in __init__.py
).
ascii2img: mostly uses braille, does not do edge detection asciiart.eu: online tool, preprocessing steps and configurable character sets, but does not do colors