Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 dimension of the state vector should refer to the object state: for example, if the state could be the center point of the tracked object, then the state vector should contain the two coordinates of the center of the object, so the dimension of the state vector should be 2 in this case; in a similar manner, if the state of an object is formed by S points belonging to its shape, then I will specify 2*S as dynam_params value (ie the number of coordinates is equal to 2*S). Is this correct?
  • The number of samples is the number of particles, therefore the parameter sample_count must be set with the number of particles to be used for the tracking of the object.
  • What about the dimension of the measurement vector? What is the purpose the measure_params parameter?

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?

like image 748
enzom83 Avatar asked Oct 06 '22 23:10

enzom83


1 Answers

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/

like image 175
nkint Avatar answered Oct 10 '22 02:10

nkint