Saturday, April 21, 2012

Pixel art : some updates

I've been working lately on the pixel art vectorization algorithm described by the guys at MS research.

My first attempt was available on my Github, featured some awesome characteristics such as terrible performance, ugly memory management and was basically not working. I decided to delete it, start over and adopt a more thoughtful approach.

A detailed analysis of the properties of the algorithm reveals that many steps can be cut and that some processing just boils down to very simple operations on integers. The code is still ugly but the early steps are now lightning fast. I'm still having a hard time minimizing processing time, so the work is far from being finished, but I thought it would be nice to show some results obtained so far. The picture on the left is an upscale of the original image, and the one on the right is the simplified voronoi partition of the pixels after the transformation. Each cell is a pixel. (No colors, sorry.)

In the process of debugging the output, I found the method of outputting SVG via iostreams to be super handy. A simple refresh on the browser and there it goes, no need to mess with a UI tooklit with windows, events and stuff. The only downside is that I use Inkscape to look at details and it's too damn slow. I should write a little something about that later.

You may want to follow me on twitter.

No comments:

Post a Comment