Rolling shutter compensation

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.

Calibrating the rolling shutter

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 ...

Get OpenCV 3 Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.