tdicola / creepyportrait

Creepy face tracking portrait based on OpenFrameworks and OpenCV. Designed to run on the Raspberry Pi with Raspberry Pi camera.
22 stars 12 forks source link

Tracking should move the skull to the position of the face #4

Open Z0t opened 11 years ago

Z0t commented 11 years ago

When it detect a face off to the left or right, it should move the skull there. At the moment, it seems to treat that as "center" but for many cheap web cams there is little field to move to. This means you can only move one way (to the other side of the camera field of view).

If instead it move the skull to the face, it would be even creepier :)

tdicola commented 11 years ago

Yeah when the face detection can't get a lock on a face it will default to moving the skull back to the center after a few seconds. I suspect that's what is happening here. I noticed similar behavior with the face detection--it's good at finding faces looking straight on, but once they get too far from the center it loses them. Try turning on the video with the v key to confirm if you see a green square drawn on a face when it's near the edges--if not then the face detection can't find the face. This is likely a limitation of the face detection algorithm and training set so it's not trivial to fix, but a good issue for people to be aware of with the application.