opencvparticle-filter

Particle filter for OpenCV-2.4.3?


I am using opencv-2.4.3 in c, I am stuck with face tracking part, I want to use particle filters for tracking, I got it in opencv-2.1 version but new opencv version seems not having this filter or might be name will be different, Have anybody worked with opencv-2.4.3 and can tell me how to use particle(condensation) filter in opencv-2.4.3


Solution

  • Particle filter is a very specific implementation of Bayesian inference methods. Condensation is a particular particle filter, which has grown popular because it has been used for tracking visual objects. However, particle filters should be seen as a framework, or as an architecture that can be instantiated for each problem.

    As far as I known OpenCV included the condensation algorithm, but you have to provide the likelihood functions. Honestly I would not use condensation for tracking faces, because it would likely not work properly: the appearance of the faces change a lot, and it is difficult to define a dynamic model that follows the potential variations of the face in sequences.

    There are much more advanced, and reliable methods for tracking faces (to mention only one, Online Appearance Models, http://www.cs.toronto.edu/~fleet/research/Papers/cvpr-01A.pdf). But if you want something simple, I would start using a face detector such as those given by cascades ( http://docs.opencv.org/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html#cascade-classifier ) and link detections with cv::KalmanFilter::KalmanFilter. Also, you would get approximately the same results as condensation using cv::CamShift.