This post has been scheduled for ages since i posted an?announcement in a previous post to write a review of openCV of detection and recognition, particularly in perspectives of hand detections and recognitions. The announcement post is here as a reference.
A library of programming functions for real time computer vision,released under a BSD?license, and free for academic and commercial use (a). Current version is openCV 2.1, this version has been installed and compiled under my VS 2008 environment but with some errors, may not be very easy to configure this version. While the stabilities of openCV 1.0 have been firmly proved already and that is easier to install and configure. Install guides can be found as ?openCV install guide in openCV wiki,?installing openCV in windows, vc2008 install openCV 2.0/2.1(in Chinese)?and get started with openCV.
A easy start of ‘hello world‘ application using openCV can be very helpful. Under most occasions, openCV is used within windows console applications with a black command window and openCV’s own interfaces (highgui) to display images and draw patterns, as the ‘hello world’ example shows. As well there are some other interface components included in openCV library such as sliders, mouse movement events and key input events. Using these provided features of openCV, object detection could be done via capturing webcam images, analysing them and finally output the consequences.
One recommendation of learning openCV online is Yahoo openCV group. It is a group with huge number of active members posting hundreds of messages each day, may be a little massive, but a good place to raise questions and meet other people, highly recommended.
About detections & recognitions
Detections are core functions of openCV. Color knobs, objects, motions, gestures and faces are subjects of openCV detections and recognitions.
Color knob detections
detecting colors using openCV is basic, there could be several ways to achieve the color detections. For instance, as the color detection used in my hand recognition project, the target color is divided into three perspectives of H, B, and V. By combining these parameters, theoretically it is available to detect any color. But the fault of HSV method is that the background colours are usually too sensitive to be specified. So does another method which uses simple brightness threshold to get target colours, but it is limited as well. A better way of detecting a range of colours is to use ‘camshift’ which requires a source image which represents colour information for target colours. There is an example of using ‘camshift’ here.
Object detection is kind of similar as colour extraction since to recognise the objects they should be detected first. Here is an example of using Actionscript 3.0 to tracking objects via webcam. In openCV it is simple as well. Tracking the objects, then using circle or line detection methods to extract rough object shapes. It could be very accurate of detecting object angles which are demonstrated here, and another object detection example illustration here. Detecting an array of object is nearly the same as detecting solo object, except some extra work is needed to loop all objects at one time and draw them out, this could be seem here as detecting combined objects.
There is an example of motion detections in openCV’s example folders, which is called motemlp.exe and a source file motempl.c. The picture on the left shows the motion directions and sub components’ directions are being marked clearly.
Gesture and face detections
Face detections are maturely applied in digital cameras presently. It is dependant on haar trainings and classifiers therefore the detection results seem robust. As well, a face detection example with source code can be found in openCV’s example folder. In this review face detection would not be emphasised too much as there are millions of tutorials telling how to detect the face in either static or dynamic circumstances.
Recognitions of hand gestures is the challenging part. On current stage, hand gestures especially finger tips are still tough due to the natural shapes of hands are ambiguous for computer to identify which is which. Therefore some simple and intuitive gestures are commonly adopted to relatively improve the accuracy of recognitions. Recognition gestures requires two factors: a. correct contours and b. predefined gesture patterns. The first factor is reachable but the second requires more work to cheer up. Concerning the second factor, there have been some theoretical papers raising solutions of detecting hand gestures. Toughly, putting these theoretical methods into practical use and generate kind of applications providing open source codes still has long way to go. A progressive project can be referred here as hand detection and image descriptions.
26 Comments On “ A review of openCV of detection and recognition”