analysing an image
July 5, 2009 2:16 AM   Subscribe

I want to write a piece of software which analyses an image, and then replicates the image using a minimum of bezier path objects of varying of colour and opacity. any tips?

I want to write a piece of software (for my own use, not as a commercial product) which analyses an image,
and then replicates the image using a minimum of bezier path objects of varying of colour and opacity.

Key to what I want to achieve is that the reproduction and the original should have a similar appearance as judged by a person, but does not need to be a faithful replica of a photograph.

so relative brightness, hue, saturation, size and position are much more important than being photographically identical.

As an example, if the original image shows a red balloon in the top left corner, and the reproduction has something that looks like a red balloon in the top left corner then I will have achieved my goal, even if the balloon in the reproduction is not quite in the same position and not quite the same size or colour.

I am however suffering a little from the "when you have a hammer everything looks like a nail" syndrome. I am imagining i could implement this using a genetic algorithm with something like this comparison of wavelet transforms to select fit solutions.
(I think I've seen a project like this before, anyone know what it was?)

But my main reason for choosing these techniques is that I know about them. I suspect that there are probably more elegant solutions using techniques I don't now anything about.

It would be especially interesting to take into account the ways the human vision system analyses what it sees,
so perhaps special attention needs to be paid to straight lines, and angles, high contrast borders and large blocks of similar colours.

however unlike human vision (and machine vision attempts) i am not attempting to analyse the meaning of an image, I don't need to know what an image is of, i am only interested in it's appearance.

Do you have any suggestions for things I should read?
Articles on vision, algorithms, similar projects or existing code and libraries that I could use?

thank you

mat
posted by compound eye to Computers & Internet (5 answers total) 2 users marked this as a favorite
 
Two things worth looking at that I know about would be the bitmap->vector conversion in the open source inkscape program, and a recent image micro-compression contest, the goal of which was to compress a full image into the size of a single tweet. What those folks did with the compressed images in tweets blew my mind.
posted by idiopath at 2:36 AM on July 5, 2009 [2 favorites]


It sounds like you're talking about tracing / vectorization. Inkscape I believe calls a tool called Potrace. The free version of Potrace works well but only does black and white. There's another free tool called Autotrace that does color and can produce good results but requires some finesse (you usually need to enlarge your image and color-quantize it ahead of time with something like ImageMagick) because it's pretty much only half-finished. And there are wide array of commercial tools that do this, the nicest one I've used being VectorMagic.

If it's just that you're gung-ho to take on a software project something I've thought of but haven't come across yet is a similar tool that does everything with translucent gradients, though I would think a substantial amount of work has been done with programs that do dithering. ImageMagick does simple dithering and GIMPressionist which is part of GIMP is pretty interesting though they both produce raster graphics... come to think of it, just a tool that does dithering but outputs a vector graphic would be interesting.
posted by XMLicious at 5:00 AM on July 5, 2009


Genetic Programming: Evolution of Mona Lisa is an interesting analysis of a project to try reproducing the Mona Lisa using only 50 transparent polygons. It talks about a lot of things that seem relevant to what you're attempting and may be a useful starting point.
posted by cCranium at 5:01 AM on July 5, 2009


I also ask this on StackOverflow.com.
posted by dws at 12:09 PM on July 5, 2009


I _would_ also ask ...

Because the hardcore programmer density there is particularly high.
posted by dws at 12:12 PM on July 5, 2009


« Older Half preserved   |   Looking for term to describe power of past... Newer »
This thread is closed to new comments.