Calculating 3D camera positions from a video
Posted
by
Geotarget
on Game Development
See other posts from Game Development
or by Geotarget
Published on 2012-07-05T09:12:23Z
Indexed on
2012/07/05
9:23 UTC
Read the original article
Hit count: 328
I need to calculate the 3D camera position and rotation for each frame in a given video. This is typically used for motion-tracking, and to insert 3D objects into a video. I'm currently using VideoTrace to calculate this for me, and I'm getting the data exported as a 3DS Maxscript file. However when I try to use the 3D camera rotations, I'm getting strange errors in my 3D calculations, as if there is an error with the 3x3 rotation matrices. Can you spot any error with the data itself? Or is it my other calculations that are erroneous?
frame 1
rotation=(matrix3[-0.011938, 0.756018, -0.654442][-0.382040, -0.608284, -0.695727][-0.924068, 0.241718, 0.296091][0, 0, 0]).rotationpart
position=[-0.767177, 0.308723, -0.232722]
fov=57.352135
frame 2
rotation=(matrix3[-0.460922, -0.726580, -0.509541][-0.200163, 0.644491, -0.737947][ 0.864572, -0.238145, -0.442495][0, 0, 0]).rotationpart
position=[-0.856630, 0.198654, -0.243853]
fov=57.352135
© Game Development or respective owner