First approach is to index all my photos (20.000+) to determine image resolution and average color value.
Before the average color value is calculated, the image is re sized to a width of about 50 pixels. Aspect ratio is maintained. This will improve scanning speed, as fewer pixels will be scanned, and also improve color correctness as only the visible pixels will be calculated. Once this process is done, the image is stored in a SQL Compact server database (filename, width, height, colorvalue).
The next part is also fairly easy. The source image (from which to create the mosaic) is divided into cells/a grid. Each cell grid is then scanned, and its average color value determined. Now the database is searched for the best match of the color. When found the image from the database is then drawn at that cells location.
-
A few things to consider before you start coding:
End of easy mode 🙂 Moving on to a bit more complicated mode™