OK!!! let's look at the design of our application, Image to ASCII converter. First I have to tell you that the application is very simple. Even I also thought it will be very difficult to implement such an application. I don't know how other people out there implemented this but when I think I came up with a very simple solution. In a pictorial view my solution is like this.
How to convert raster to a ASCII art |
The above image show how I plan the thing. First the user will have to point out the image. Then the image will get converted to a gray scale image. Then the second step is to do a multi level threshhold to the image.
In a multi level threshold we simply make set of color groups. As an example pixels which are having color value 200 to 255 will put in to a one group while color value 150 to 199 put in to another group. The multi level thresholding will be obvious when you look at the below image.
Multi level thresholding |
Map ASCII characters to color levels |
Now we talked about the algorithm for creating an ASCII image form a Raster image. Now it is a matter of implementing this algorithm using some language, which we are going to talk in my next post.. bye!
No comments:
Post a Comment