Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dt paramter in kalman filter #15

Open
chokkarapu opened this issue Jun 29, 2020 · 3 comments
Open

dt paramter in kalman filter #15

chokkarapu opened this issue Jun 29, 2020 · 3 comments

Comments

@chokkarapu
Copy link

Hi Author,

Currently Im tracking the object with constant velocity model.
The parameter "dt" is time interval as we know in kalman filer.

My query is how to compute or choose optimal value of dt??
Im detecting object using computer vision algorithm at frame rate of 20FPS...
So I have computed dt = 20/30 (MyAlgo_FPS/CameraCapture_FPS).
Is my computation is right ?

I eagerly wait for prompt response.

Thanks,
Anil.

@UnePierre
Copy link

UnePierre commented Jun 29, 2020

Hi Anil,

If your algorithm runs at 20fps, that means dt=1/20=0.05 [seconds].

But if your main sensor (camera) runs at 30fps, I strongly advice you to go for dt=1/30!
Interpolation before a Kalman filter is hard to get right, so try to have your object tracking use the full 30fps, too.

Now you say, that your input comes from something a camera can see. In that case, please consider a model of constant acceleration:
If your object does not leave the video frame, it has to change speed/velocity (unless your camera was in space, but I guess you wouldn't ask such questions then.)
Constant acc is good for things that a human moves, fall down et cetera -- all the regular cases in school physics.

Greetings and good luck with your model!

@chokkarapu
Copy link
Author

Hi Anil,

If your algorithm runs at 20fps, that means dt=1/20=0.05 [seconds].

But if your main sensor (camera) runs at 30fps, I strongly advice you to go for dt=1/30!
Interpolation before a Kalman filter is hard to get right, so try to have your object tracking use the full 30fps, too.

Now you say, that your input comes from something a camera can see. In that case, please consider a model of constant acceleration:
If your object does not leave the video frame, it has to change speed/velocity (unless your camera was in space, but I guess you wouldn't ask such questions then.)
Constant acc is good for things that a human moves, fall down et cetera -- all the regular cases in school physics.

Greetings and good luck with your model!

Thanks you for your valuable inputs.
Yes, i'm planning to move to constant acceleration model.

Im having input of image sensor only, for constant acceleration model, Do i need to have any inputs(such as velocity or acceleration) from other sensors as well ?? Or just image sensor input is fine..

@UnePierre
Copy link

The nice thing about Kalman filters is, that they interpolate, have a clue about the actual precision/reliability of the signal (deviation), and that they can cope with sensor fusion.
If you have only one sensor, there is nothing to fuse, but that doesn't reduce the other advantages.

If however you can come up with more sensors with reasonable effort, a Kalman filter helps you to "make the best of it" (in terms of minimized quadratic errors): e.g. the precision can be improved in most cases.

Maybe take a look at some literature about filtering?
The Wikipedia articles about Kalman filters, and extended Kalman filters are very high-level, but I think they reference some basic read-up as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants