Evolving vectorization
Give credit where credit is due
In December I stumbled about a page on the net lately which used some javascript trying to approximate a small Mona Lisa picture by about 50 semi transparent polygons. It can be found here. It is definitely worth a look :).
The calculations done in javascript took forever, which inspired me to write a faster implementation of this idea in c using the Cairo library. Simulated annealing is used to enhance the creation process a little bit. Furthermore the output can also be saved as SVGs instead of only using rasterized images like pngs.
After some ongoing reading of the Image evolution page mentioned above, which is constantly updated, I found a link to the original creator of this idea. When I found some links inside the comments to his article which led me to the c# source code of the original evolver written by Roger Alsing I had already written my own little implementation of it.
Results, Results, Results
I have done multiple runs over different images on my computer to create a evolving vectorization of them. I really like the outcome and I am eager to share the results with you.
All of the following pictures are a combination of 50 polygons with 6 vertices each, all with different transparency values and colors.
The number displayed below each picture represents the number of mutations generated and analysed at this point of evolution.
Mona Lisa
Because all other implementations of this idea used the Mona Lisa for testing it was my first test subject, too.
Evolution
Source Image
0000010000
0000020000
0000050000
0000100000
0000250000
0000640000Me
I wanted to see what happens if a portrait picture with more colors is used as source. Therefore I chose the picture of me which i also use on my about me page.
Evolution
Source Image
0000010000
0000100000
0000250000
0000500000
0001151000Tux
Lets take a look at what happens to a simple tux logo which is approximated.
Evolution
Source Image
0000002000
0000010000
0000030000
0000100000
0000400000
0001151000Download
If you have been inspired by the results above you can try to run some of your own pictures through this algorithm. The c source can be obtained from its subversion repository at:
svn://pureenergy.cc/evolving_vectorizationI would be happy if you could show me your great looking creations with it. Just write a comment or mail me if you have done some work you would like to show to the world.
norro on Sun, 01 Feb 2009 21:01:19 +0100
So the penguin is the best fit for the Mona Lisa source? Or what?
Link to comment