Other Stuff‎ > ‎

Mosaics with Matlab

I hope you liked the picture on my home page... how I did it?
Actually is not that hard... I used Matlab to analyse the original picture and grab bunches of pixels (which were to be replaced by a single small photo) and check things like average R(ed), G(reen), and B(lue) values, average Intensity, horizontal and vertical intensity change, etc. In total I used 13 different characteristics (the footprint if you wish) of that bunch of pixels, and then find the best match among the pool of little pictures I had. Here are some results... (you can click over them to see more details)

 @Beacon Hill in Boston
picture taken by Kenzo Asahi

Part of "Stoclet Frieze" (The Tree of Life), by the Austrian painter Gustav Klimt
Kanagawa Oki Nami Ura (The Great Wave at Kanagawa c.a. 1830-32) by the Japanese artist Katsushika Hokusai Dawn at Morningside Park, @New York
picture taken by me

Kids Collecting Rocks, @Papeete, Tahiti
picture taken by me
 Moai next to Ahu Tongariki and Rano Raraku Volcano, @ Rapa Nui (Easter Island), Chile
picture taken by me

Right now this is implemented through a "dumb" algorithm that matches the small pictures, taking them of the pool after being used "n" times, and as soon as I have some spare time I will try to use one of the Minimum Cost Flow algorithms to implement an "optimal" matching algorithm that hopefully will improve the job... although they look very nice right now... but please don't hold your breath for that...

As soon as I have something a little better, I'll upload the code here.