Evolving vectorization - Westhoffswelt - Welcome to the real world

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 ImageSource Image
00000100000000010000
00000200000000020000
00000500000000050000
00001000000000100000
00002500000000250000
00006400000000640000

Me

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 ImageSource Image
00000100000000010000
00001000000000100000
00002500000000250000
00005000000000500000
00011510000001151000

Tux

Lets take a look at what happens to a simple tux logo which is approximated.

Evolution
Source ImageSource Image
00000020000000002000
00000100000000010000
00000300000000030000
00001000000000100000
00004000000000400000
00011510000001151000

Download

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_vectorization

I 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.

Trackbacks

Comments

  • norro on Sun, 01 Feb 2009 21:01:19 +0100

    So the penguin is the best fit for the Mona Lisa source? Or what?

Add new comment

Fields with bold names are mandatory.