Converts an image to an ascii art text. This code was created for my image processing classes at PUCPR. That's why grayscale conversion and shrinking are manually implemented.
This code uses two different processes:
- Create a character palette based in char luminance (see makePallete method)
- Shrink the image with 2x4 slots
- Convert to 10 shades of gray with dither
- Map them to the character pallete
- Shrink the image to with 1x2 slots
- Binarize the imagem with dithering
- Analyze the shape of a 2x2 pixel slot
- Map to the closest letter format
See toText1.txt and toText2.txt for results after processing images/jobs.jpg