Face tracking using opencv + facedetect filter with my pan/tilt kit...

Facedetect filter is heavy, and webcam video flow delay from servos response...this leads to overshooting

GROG..i need a lighter facedetect filter.....video stream is  slow when i apply pirdown and face detect :(

Here is the video...

CHECK IT OUT !

GroG

11 years 6 months ago

Yes, Face Detect is resource intensive !   LKOptical track is not.  So that's the point of Cortex to Detect once with Face Detect, then switch to LKOptical Track.  And only use Face Detect when the LKOptical track has been lost.  

PyramidDown should speed things up - the more pixels face detect has to search through the more time it will take.  

I have noticed that Face Detect - is one of the most expensive methods in OpenCV.

Another strategy which will be incoporated in Cortex, is saving a large set of images of just your face when it has been detected or is being tracked.  This will allow matching with Template Matching (closer to face identification) in the future.  Also Template Matching is very quick, although more fragile than Face Detect.

Cortex isn't ready, and I'm still working on network issues - but you could, if you wanted to - face detect once and switch to a LKOpitcal track in the Python script.  So it become LKOptical track when tracking, and face detect - when there is no LKOptical point.