Converts input image to ASCII art using braille glyph characters via command line. Features include:
- User-set threshold value
- User-set character width for ASCII art
- Saving to .txt file
- ASCII art for inverted input image
If a threshold value is not manually set, an automatic thresholding algorithm is used instead (Otsu's method). Small width sizes sacrifices detail with automatic thresholding, so testing different threshold values may be preferred in that case.
Here are the following command line arguments to use:
--img # Input image filepath
--width # Width of ASCII art in pixels
--save # Filepath to save ASCII art to
--inv # Create ASCII art of the inverted input image
--thresh # Set manual threshold value instead of automatic thresholding
python braille.py --img 'filepath/example.jpg' --width 30 --save 'ascii.txt' --inv --thresh 150