I want to solve a problem of object tracking along time. The problem is - I have a sequence of images, and I need to find and track the creation of the objects, than their movement, and than their disappearance. There can be up to 3 objects overall, and sometimes there are less, or none. Another limitation is that for consecutive images there is a maximum distance that an object can move.

The practice I use is - estimating the locations for the objects in each image separately (using a neural network), up to 3 locations per image, and than filtering out clear mistakes (random locations with no continuation along time).

After a little research, I found that with some effort I can translate this problem into a hidden Markov model, and this one can be solved with Viterbi algorithm. The problem is that for each image there are more than 100 possible object locations, and with 3 objects we get >= 100000 different states.

My question is whether there exists a designated algorithm for this case of object tracking along time? Or otherwise, if there's a good and efficient way I can fit Viterbi algorithm for this problem?

Thank for any help!

  • 2
    $\begingroup$ It would be helpful to see more of the setup of your problem, such as precisely how your hidden Markov model is formulated. Posting mathematical notation is usually a good way to convey such details, although it involves learning $\LaTeX$. $\endgroup$
    – hardmath
    Aug 11, 2022 at 14:06

1 Answer 1


If you are using MATLAB take a look at the following two functions (you may also find the examples and references helpful):

From openly available codes, I would look into:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.