c++copencvparticle-filter

How to use the condensation algorithm available in OpenCV?


I need to implement a software for tracking of moving objects in image streams using the condensation algorithm and the OpenCV library. I have read that OpenCV includes an implementation of this algorithm, but I did not find examples or tutorials that explain how to use the corresponding functions available in OpenCV.

The cvCreateConDensation function allocates the CvConDensation structure and requires the dimension of the state vector (dynam_params), the dimension of the measurement vector (measure_params) and the number of samples (sample_count).

The cvConDensInitSampleSet function initializes the sample set for the condensation algorithm. Which rule is used to initialize the sample set? Which distribution is used to initialize the sample set? Given the starting position and the bounding box of the object to be tracked, how does this function initialize the sample set?

What is the function that performs a complete interaction (select, predict and measure) of the algorithm? How do the samples are updated?

Is there any tutorial that explains in detail how to use the functions available in OpenCV?


Solution

  • A working example of condensation algorithm can be found in the Q&A of opencv and ross (same author):

    http://answers.ros.org/question/55316/using-the-opencv-particle-filter-condensation/

    and

    http://answers.opencv.org/question/6985/syntax-for-particle-filter-in-opencv-243/