Some samples:
The script works in two stages. The first one scans all of the images to work out an average color, and saves that information to a txt file on the disk.
This is then used in the second stage of the process, where a template of the mosaic is made - this is an image, shrinked down in size to as many pixels as is the number of images on the horizontal and vertical axis. This way each image represents one pixel of the template. The second stage begins composing the mosaic from images, that have the closest average color to the current pixel in the template.
The process is optimized by caching average colors to disk (this optimization is mandatory) and an caching smaller images to disk (there's a BIG difference in speed if you try to open a 5MB file or 100K file).
Here's the code that does all the work: http://pastebin.com/f70e3ccf7
3 comments:
Very interesting!
Do u have a recently version of this? Any documentation?
Thanks!
Yeah I was wondering if you had the version with the improved color approximation as well.
Best version is available on pastebin, link is in the article. Will posts samples later.
Post a Comment