Question

I should use the condensation algorithm to track a object moving in a video. The initial position (for example the coordinates of the center of the bounding box) and the size (the width and height of the bounding box) of the object are known.

The object's position and size on the Cartesian plane are its state. Given the initial values ​​of the position and size of the object, how should I initialize the samples? Also, how should I initialize the weights?

Was it helpful?

Solution

ACCURATE STARTING POSITION

If you know the starting point/size for certain, then you can just set all samples to the known value. The weights can be set to anything you like (e.g. all equal), as the first step of the condensation algorithm will select N new samples from the old samples.

(Which samples are selected depends on the relative weights, but as all the samples are the same it will always give the same answer.)

APPROXIMATE STARTING POSITION

If you have an approximate starting place (e.g. perhaps the start is given to a few pixels accuracy) then you may get better results by choosing the samples to represent the starting distribution.

One way of doing this is to choose samples across the range of allowed values, and set the weights equal to the corresponding value of the PDF. You then need a second pass to normalize the weights in order that the sum of the weights equals 1.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top