Closed joshfox10 closed 2 years ago
Hi @joshfox10
Currently, there is no easy way of doing this but the underlying Kalman filter object is available
Assuming you are using the default FilterPyKalmanFilterFactory
and not OptimizedKalmanFilterFactory
:
ipdb> to = tracked_objects[0]
ipdb> to
Object_1(age: 3, hit_counter: 4, last_distance: 0.29, init_id: 1)
ipdb> to.estimate
array([[1. , 3.90878529]])
ipdb> to.filter.x
array([[1. ],
[3.90878529],
[0. ],
[0.93041352]])
ipdb> for _ in range(5):
to.filter.predict()
ipdb> to.filter.x
array([[1. ],
[8.5608529 ],
[0. ],
[0.93041352]])
ipdb> to.estimate
array([[1. , 8.5608529]]
Notice that there is no way of predicting steps into the future without affecting the internal state of the filter, this can be a problem if you intend to keep tracking after predicting into the future.
@javiber thanks for your help.
Hi there, I'm curious if there is a way to cleanly predict the future location of the tracked object with the integrated Kalman filter beyond what is used for the next frame?
Thank you.