OpenCV – Mosaic

When you build a mosaic from tons of pictures, you have to downscale the images before you can use them. This naturally means loss of information in the picture, when going from say 3200×2600 to 80×60 pixels. If you have a family photo, you wouldn’t be able to recognize the people in the photo any longer.

So what do you do then? My approach was to use the OpenCV library (Open Source Computer Vision). If you use .net, you should use Emgu instead. It is build upon OpenCV, so you should be just fine.

OpenCV is capable of finding faces in images, just like modern cameras do it. You can then save the faces as image files, and use them in your mosaic. This will also help you build mosaics with lots of skintones. Beware, the processing of the images takes quite a bit of time. My dual core pentium 2.66 Ghz took around 20-30 seconds for each image.

Leave a Reply

You must be logged in to post a comment.