Tutorial :How to write Image Mosaic Generator


Task is following: how to create selected picture mosaic from large number of images. My first shot would be using evolutionary algorithm. Where genotype represents mapping of original images to positions in mosaic grid, and individual is evaluated according to similarity to original picture. Actually in basic approach each tile can be treated separately so iterating through the grid and matching best image would be sufficient. But I don't know yet how to define similarity functions. Naive pixel wise comparing (r,g,b) difference probably would be too strict. I think that some image processing algorithms should be apply like histogram balancing to optimize similarity between subimage and region where we try to locate it.

It would be similar to genetic algorithm that creates Mona Lisa resemble.

Sample mosaic can be found here.


Well I did that (but I stopped somewhere) Look at: GetAMosaic It was a testproject to do some C again:-) So dont look at every detail there.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »