In OpenCV/Samples there is facedetect program. This program can detect faces on images and video. It’s very fun, but its speed leaves much to be desired =(. Of course with OpenMP, it works faster; on Intel Core Duo 2.7GHZ, it works fast; but will it work fast on ARM? I have big doubts. I compiled facedetect without OpenMP and on average it takes 600 ms for 640×480 resolution to find one face. I wanted to find out, if it’s possible to improve this time by software means or not… After some investigations, code refactoring and improvements, facedetect started to work 2.5 time faster, even on ARM. Of course, without big quality loss =)
If you want to generate cascade with OpenCV training tools, you should be ready for waiting plenty of time. For example, on training set: 3000 positive / 5000 negative, it takes about 6 days! to get cascade for face detection. I wanted to generate many cascades with different training sets, also I added my own features to standart OpenCV’s ones and refactor algorithms a little bit. So waiting for 6 days to understand, that your cascade does nothing good =) was really anoying. To reduce time, I chose paralleling methods.
Posted on : 02-06-2009 | By : rhondasw | In : OpenCV
OpenCV’s standart cascades allow to detect faces and eyes. I wanted to create cascade in similar way to detect another objects: pringles or plate for example. I found some material in Net how to use OpenCV training tools, also I investigated training tool’s source code myself to found out, what training parameters can be tuned.
For training, I needed thousands of images, containing my object with different lightning conditions and perspectives. After trying to find required number of pictures with Google , I understood, that it’s really difficult task =). So I decided to take video with my object, then I wrote simple program to crop object from video, frame by frame. In such way, I generated about 3000 positive samples (cropped images with my object). Resolution varied from 50×50 to 100×100. The advantage of this method – you get many samples with different reflections, illuminations and backgrounds. It’s very important, that all these images “features” are various!
Posted on : 01-06-2009 | By : Aleksey Kodubets | In : Demo, Demo video, PTZ, YouTube
On this demo CV system tracks moving people using single PTZ (pan/tilt/zoom) camera (AXIS 214) and tries to positioning it to always keep first entered person in the camera sight. When PTZ stops in new position, the system filters out still objects from those that actually moving, assigns unique IDs (and color frames) to them and measures proximity of these objects to the original one using color-histogram-based algorithm. The object with highest proximity will be treated as a target. System will turn camera in the direction where targeting object moves, when it is approach to the border of camera sight (the red rectangle on the border indicates direction of next movement of PTZ cam).