O'Reilly logo

OpenCV 3 Blueprints by Utkarsh Sinha, Quan Hua, Steven Puttemans, Joseph Howse

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required