Weekend Programming Challenge Issue-13, Solutions

Image

We got only 3 solutions for this challenge! Java, C# and C++

First was Michael Zucchi his solution output the picture above.

Nigel Mollett was second with C# solution. Here is output from his code:Image

Miller Wang submitted C++ solution and although he do not sort the font in grey scale order also converts the pictures:

Image

ImageImage

Solutions are as usual uploaded to GitHub https://github.com/OLIMEX/WPC/tree/master/ISSUE-13

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!