Weekend Programming Challenge Issue-13: ASCII art


Image

Problem: Convert picture to ASCII art

Make code which converts picture to ASCII art.

Hints: This is very easy challenge although seems hard at first sight. Just convert the picture from color to gray scale, then select font which you will use to print ASCII art and analyze it which letters you could use for gray scale print – every letter have some coefficient of filling from 0 for the space to 255 for solid bar, use letters which are spread well in the font size space. Then slice your image at rectangles with the font size, calculate the median grey scale for each rectangle and print the corresponding ASCII character with same grey scale value.

As test image you can use everything – from Olimex logo to Lena above.

Share your results!

The rules:

You can code the solution in any programming language during the weekend and have to submit it to info@olimex.com latest on Sunday June 2nd.

On Monday we will upload the solutions on GitHub and review https://github.com/OLIMEX/WPC .

You can play with your real name or with nick if you want to be anonymous, we will not disclosure your personal info if you do not want to.

Good Luck and Have fun!

2 Comments (+add yours?)

  1. notzed
    Jun 15, 2013 @ 08:06:06

    Solid bar? I bet you don’t mean PETSCII / CBM ASCII! ASCII itself is only 7-bit.

    Reply

Leave a comment