Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
OpenCV 3 Blueprints

You're reading from  OpenCV 3 Blueprints

Product type Book
Published in Nov 2015
Publisher
ISBN-13 9781784399757
Pages 382 pages
Edition 1st Edition
Languages

Table of Contents (14) Chapters

OpenCV 3 Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Getting the Most out of Your Camera System 2. Photographing Nature and Wildlife with an Automated Camera 3. Recognizing Facial Expressions with Machine Learning 4. Panoramic Image Stitching Application Using Android Studio and NDK 5. Generic Object Detection for Industrial Applications 6. Efficient Person Identification Using Biometric Properties 7. Gyroscopic Video Stabilization Index

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 = getAccumulatedRotation(...)
        transformed_corners = cv2.perspectiveTransform(old_corners, transform)
    ...

Also, we'll need to add logic to transform a corner based on its location—a corner in the upper part of the image is...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}