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

有帮助吗?

解决方案

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.

其他提示

As marcos.nieto said, Particle Filter is an approximation tool that speeds up the object's modeling (description of the object) and the searching procedure (instead of a greedy search on every pixel of the search window like a classifier would do).

Also, the modeling update rate is not enough, like marcos also said, to cover the sudden appearance changes and if you increase it your tracker will drift away eventually.

I suggest to try the combination of VideoSurveillance and the Cascade Classifier in to build an object-based tracker with data-association of responses across frames.

Although you are primarily working with OpenCV take a look at the C# implementation of the particle filtering algorithm (and Kalman too) in Accord.NET Extensions library. Samples are included. Link: https://github.com/dajuric/accord-net-extensions

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top