Reduces distracting vibrations from videos by smoothing the transition between frames in a video
- Find the transformation from frame[i-1] to frame[i] using optical flow for all frames in the video. The transformation consists of three parameters:
- dx (x direction)
- dy (y direction)
- da (angle)
- Accumulate the transformations to get the trajectory for
x
,y
anda
for each frame - Smooth out the trajectory to ensure the image actually appears 'stabilized'.
- Create a new transformation such that:
new_transformation = old_transformation + (smoothed_trajectory - trajectory)
- Apply the
new_transformation
to the video
- python
3.6.1
- cv2
3.3.0
- numpy
1.2.1
- pandas
0.20.3
- imtils
0.4.3
- tqdm
4.11.2