Friday, November 18, 2005

Back on track

Yesterday night was the end of a very hectic, but also rewarding week.

Since last week, the art director asked me to generate no less than 30 different versions of a picture mosaic outlining one of our client's logo.

Why so many? Well, let me explain...

Picture mosaics are images made up of collections of other pictures. A computer program divides the target image in cells, then tries to match each cell with another image from the collection based several criteria, including:

- Overall color contents
- How many repetitions of a given image are allowed, in the overall image as well as within a region of cells.

However, it is of the utmost importance the image collection is as varied and abundant as possible. Otherwise, the result will be monotonous and uninteresting.

For this project, our client wanted us to create a mosaic consisting of red SUVs he's giving away on a sweepstake. Since their logo is also red, they thought it would be easy.

Well, it was... in theory.

How many cells should we divide in our target image? Since it is a logo, too few will result in a blurred, unrecognizable color splat. But too many not only will eat up available memory, each cell might become optically smaller and thus difficult to discern from the others. Not to talk about the resulting mosaic resolution should be at least 300 dpi.

We began with a small collection of 4 images, each one from a different SUV model. After adding a white cell to it (to include the target image's background color), first resulting mosaics ended up being dull and repetitive.

After that, we tried increasing the collection with dissolved versions of the original images in 5 percent steps. Results improved dramatically, but the background began to exhibit faint aliasing patterns where there shouldn't be any.

More tweaking on the source collection, this time using a non-linear step scale, lead us to better results. One of them underwent minor retouching with the almighty Photoshop and so was finally accepted by our client.

I won't bore you with more detail, but I'll just mention we had to tweak many parameters to come up with a varied, yet error-free mosaic. Waiting at least 40 minutes to end up with "Sorry, ran out of memory" errors is no fun.

The results were published this week on a local newspaper. Check them out:

Let me know what you think.


Bruno Unna said...

Está bien bonito, aunque de la pura lectura yo me había imaginado un mosaico sin tanto espacio blanco, de los que son más típicos.

Este se ve como más original, ¿cómo se hubiera visto si hubieras podido poner las camionetitas en cualquier posición?

Julio said...

Ah! Ese fue el reto. Como la imagen base tiene mucho espacio en blanco, los resultados siempre mostraban camionetas difuminadas donde no debería haber ninguna.

De haber relajado todas las restricciones, el proceso hubiera sido muy rápido... pero las camionetas habrían aparecido con las llantas hacia arriba. Mal mojo con el cliente.