Skip to content

Converts input image to ASCII art using braille glyph characters.

Notifications You must be signed in to change notification settings

srishatagopam/braille-ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

braille-ascii

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.

Usage

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

Example

python braille.py --img 'filepath/example.jpg' --width 30 --save 'ascii.txt' --inv --thresh 150

Input image

alt text

Output ASCII art

alt text

About

Converts input image to ASCII art using braille glyph characters.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages