Image recognition is one of the buzz-words of our times. Facebook has acquired Face.com with its flagship product — facial recognition app — and invested huge money to better suggest who’s who on the images uploaded to the service by over a billion of its users. Google+ Photos uses image recognition technology to make photos serachable, and Google Goggles is a new powerful gadget from the Mountain View giant that will let you find information on objects not by typing their names, but by simply "showing" Google what they look like.
Our mobile team at Goyello has recently faced a challenge of a similar type (in a smaller scale though) — how to recognize if a photographed image of a solved puzzle set matches one of the predefined templates. The task that seems to be so easy to the human brain is in fact a complex feat, and highly sophisticated algorithms out there still fall short of what any of us — humans — is capable of. But the power of today’s computers is tremendous and constantly growing, so we started looking for solutions to our conundrum. And first, we don’t want to send the image to the server for matching, so the algorithm must perform acceptably on a mobile device; second — we’d love the code to be open source so that we can freely play with it and adopt it to our specific demands.
After some research we’ve found OpenCV — an open-source library of real-time image processing and manipulation functions developed initially by Intel in C++ and ported to the most popular mobile platforms. Being both BSD-licensed and native on Android/iOS, it seemed to be a perfect hit, so we started feasibility analysis right away.
Figuring out that image recognition on our mobile devices is not so easy as we think. It comes down to well lit images, camera photo quality and poor focus which can cause blurring. Cleaning up the image, or turning it black and white and the luminance levels will need to be balanced.