At this point, our video is stable, however, when objects in the scene are moving quickly, the rolling shutter effects become more pronounced.
To fix this, we'll need to do a few things. First, incorporate the rolling shutter speed into our calibration code. Second, when warping images, we need to unwarp the rolling shutter as well.
To start calibrating the rolling shutter duration, we need to tweak the error function to incorporate another term. Let's start by looking at the
calcErrorAcrossVideo method. The part we're interested in is:
def calcErrorAcrossVideo(videoObj, theta, timestamp, focal_length, gyro_delay=None, gyro_drift=None, rolling_shutter=None): total_error = 0 ... transform ...