gyroflow / gyroflow

Video stabilization using gyroscope data
https://gyroflow.xyz
GNU General Public License v3.0
6.84k stars 294 forks source link

Way to export camera orientation and movement per frame #718

Closed michaelochs closed 1 year ago

michaelochs commented 1 year ago

Is there an existing feature request for this?

Description

I would like to be able to export what seems to be an intermediate state of the processing that Gyrobox does. What I am interested in is actually not image stabilization but instead I want a data stream that gives me orientation and location of the camera for each frame in the video.

It seems that this data should be available in Gyrobox as my understanding is it uses this to reverse the camera movement to some degree to stabilize the image.

It would be amazing if there was an option to get the data for this, ideally per frame. This allows other tools to then create virtual cameras that should, in theory, follow the exact movement the real camera did, which allows for a lot of options in video editing and compositing.

AdrianEddy commented 1 year ago

See https://github.com/EmberLightVFX/Gyroflow-to-CSV and https://github.com/EmberLightVFX/Gyroflow-to-CSV/issues/6

michaelochs commented 1 year ago

Hey. That's interesting. For me the rotation doesn't match the camera movement 100%. It feels a bit as if the GoPro's hypersmooth settings aren't accounted for? Also in this one the x/z/y position offset is missing, which imho would be required to drive a virtual camera from it? I was under the assumption Gyroflow collects that already to stabilize positional movement.

AdrianEddy commented 1 year ago

Everything is included in the .gyroflow project file, it has original rotations, smoothed rotations, all timestamps and offsets If you had hypersmooth enabled then you have to use Quaternions, and that script uses the raw gyro data, unless you pass --quaternions option.

AdrianEddy commented 1 year ago

x/z/y position offset you mean the translational motion from the acceleromater? Gyroflow only uses rotations for stabilization. Translational motion is not tracked, and it's not really possible to do it with just the accelerometer data (it's not accurate enough)

michaelochs commented 1 year ago

Okay, thanks for the info! I guess I need to figure out another way to determine x/y/z position movement.