UPDATE: blog post describing how these mosaics are made
I knew my mosaic script was doing a poor job of placing the images.
The approach it’d be taking was greedy: it’d place the closest matching image on its tile, and then the next closest matching and so on. The outcome in in the middle column above.
After talking a bit with Roy, I couldn’t really leave it doing such a poor job.
So in what way is the greedy approach sub-optimal? It may be that swapping two images or three or more images around will lead to a lower overall error score.
And what’s the simplest improvement to make? Rather than tackling the true dynamic programming or other classic approach to optimisation, I simply went for random swaps.
The script will now perform random swaps if they improve the image, until you interrupt it with ^C.
And the results, as seen in the left column above, are stunning :)