How to extrapolate object position and rotation into the future/past?

190 views Asked by At

Lets say we have the homogenous transformation matrix of the position and rotation of a camera for n different points in time. We also have m different images taken by this camera, which weren't neccecarily taken at the same instant the htm data was recieved. For example:

We have camera htms at t=1, 3, 5
And we have images at t=1.5, 4, 6

and so on. I want to be able to roughly guess where the camera was and what its rotation was at the time a certain image was taken. For example:

We want the htm of the camera at t=6
We have htms at t=4, 5, 5.5

Another example:

We want the htm of the camera at t=6
We have htms at t=4, 5, 8

I was thinking of using a simple angular and linear velocity calculation from the two closest htms but the angular velocity may need to be expressed in euler coordinates, which suffers from gimbal lock. Is there any better/easier way to achieve this effect? I am trying to map my environment using these values so precision is pretty important. Any help is appreciated!

1

There are 1 answers

0
Arthur Bourbousson On

I have the same problematic. You can use linear interpolation/extrapolation. Separe interpolation into position and orientation. Use LERP algorithm for position and SLERP algorithm for orientation. If you want better model you can use a Spline to interpolate the trajectory but it can quick become complicated.