Facial Tracking
We used a combination of methods to track faces in our video. The core of the tracking algorithm is OpenCV's detection capabilities, which is called every frame. We use a probability function based on position and other variables to associate faces that OpenCV detected in the current frame with faces detected in the previous frame. If a face is not detected by OpenCV in a given frame, we use information about the face's last known position and velocity to predict its position. We developed a method to track faces based on the RGB color values of pixels comprising the face, but did not fully test and implement that strategy. The video below demonstrates tracking and prediction.
Our Code
Click here to access our repository.