-
-
Notifications
You must be signed in to change notification settings - Fork 90
Image stabilization guide (alpha)
Warning: This is outdated information. Find the Gyroflow software here: https://github.com/gyroflow/gyroflow and the docs here: https://docs.gyroflow.xyz/
Note that this guide is mainly intended for alpha/beta testers as opposed to "production" use. The stabilization code is still work in progress and the following process will most likely change drastically as the program improves. Native blackbox stabilization support is being worked on, but files modified using BlackboxToGPMF can be used when combined with the proper lens calibration preset. The plan for the next public alpha will be to streamline the process and add a video guide for alpha testers. If you can't get this to work at the moment, I recommend following the progress through Discord/Facebook and waiting a couple of weeks for the next update instead of contacting me for help.
- Python installation with required dependencies
- GoPro clip with embedded gyro data or clip generated by BlackboxToGPMF
- Gyroflow files (Note: don't use outdated executable)
- Camera calibration preset. Bundled presets of similar cameras like
Hero_7_2.7K_60_4by3_wide_V2.json
can be used in a pinch, but it's best to generate a new one as described here for now. Hopefully presets for a bunch of common cameras will be bundled later if enough people help with it.
- Navigate to the gyroflow folder and run the utility using
python gyroflow.py
. - Open the barebone stabilization tool by clicking on the button.
- Open the video and preset by clicking on the respective buttons.
- Set smoothness to something between 80% and 99% (will definitely be revamped later)
- Output crop should be less than or equal to the the file resolution. Usually going from 4:3 to 16:9 works fine when using wide angle fisheye lenses. Leave FOV scale at 1.5.
- Watch the video in a separate player and find two timestamps near beginning and end of video for syncing, where there is some motion, but nothing too crazy. Usually twitches, slight vibrations or turns are good spots. Write the timestamps in auto sync timestamp 1 and 2.
- Something between 60 and 120 frames to analyze seems to work. Less frames are required for syncing vibrations. More frames are required to match slower movements.
- Select the right gyro orientation. Use
hero5
if using BlackboxToGPMF. - Click
compute sync
. The window may seem frozen, but status messages are printed in the terminal. After analyzing the first batch of frames, a debug plot will appear showing the gyro/video error as a function of gyro delay. Ideally this should have a single clear downward spike where video frames and gyro data matches (might require zooming in). Close this plot. Another similar plot will appear after a few moments that is zoomed in. After closing the first set of plots, the second batch of frames are analyzed and displayed in the same way. - After both sets of frames are analyzed, the gyro data is displayed with the frame x,y,z rotations in three separate plots. Zoom in to make sure gyro and video actually matches. If the data don't match or is scaled incorrectly, then it could indicate a bad slice of frames to analyze, a bad camera tilt value, or a bad/incorrect lens preset.
- Close the plots and return to the stabilization utility.
Delay for sync 1/2
should be filled in automatically. These can be tweaked manually if needed. Clicking theSync correction
button will apply changes to sync delay and smoothness, followed by the same plots displayed in step 10. Tests have shown that the current sync algorithm may give a delay that is one frame off for some reason. This is being worked on, but try increasing/decreasing the sync delay(s) by1/fps
if slight jitter/vibration appears in output. - Input a valid start/stop range for export, and select/deselect the split screen option. Then click
export
to define a save location and begin export. The video is displayed while exporting. The settings can be tweaked after exporting the first file if needed, so it can be useful to export a short clip to check if the settings and sync are correct.
If you can get it to work please share the results in the Discord or Facebook group. Otherwise it's best to wait for the next update as previously written.