ranger
ranger

Reputation: 496

Track multiple faces

I am working on a video suvilleince project using opencv. I need to detect faces, recognize them and track only the recognized ones till they go out of the frame. I use Haar Cascades in Opencv to detect faces and they doesnt seem to detect faces when it is slightly tilt (I used all of them still no luck!). So I came out witha different idea to initially detect faces and then to track them(using blob detection) so that the boundary rectangle output of the detection/tracking phase can be used as input to recognition phase. But the problem now I m facing is that I need to call the detect_face procedure frequently to capture any new faces coming in to the frame and by the time the this happens the older ones may have tilt their faces and hence my tracking procedure lose the lock. I am really stuck in this. Does anybody have better ideas?...Also how can I make a particular region in a frame blurred or masked with some color?

Upvotes: 0

Views: 354

Answers (1)

Drew Dormann
Drew Dormann

Reputation: 63946

the older ones may have tilt their faces and hence my tracking procedure lose the lock.

Tilt the image.

Try a fast rotation algorithm - one that doesn't bother with sensitive aesthetic color blending.

For every frame of the video, generate 2 or 4 new images that are rotated slightly, and run the haarcascades on those images as well and merge the results.

Also how can I make a particular region in a frame blurred

Replace every pixel in the region with the color that is the average of "the nearby pixels", for some definition of that phrase.

Do it on a separate image first so one pixel's blur doesn't affect the next pixel's average.

Upvotes: 1

Related Questions