Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
OpenCV 3 Blueprints

You're reading from   OpenCV 3 Blueprints Expand your knowledge of computer vision by building amazing projects with OpenCV 3

Arrow left icon
Product type Paperback
Published in Nov 2015
Publisher
ISBN-13 9781784399757
Length 382 pages
Edition 1st Edition
Tools
Arrow right icon
Toc

Table of Contents (9) Chapters Close

Preface 1. Getting the Most out of Your Camera System FREE CHAPTER 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

The math


Before we jump into the code, let's take an overview of the algorithm. There are four key components.

  • The first is the pinhole camera model. We try and approximate real world positions to pixels using this matrix.

  • The second is the camera motion estimate. We need to use data from the gyroscope to figure out the orientation of the phone at any given moment.

  • The third is the rolling shutter computation. We need to specify the direction of the rolling shutter and estimate the duration of the rolling shutter.

  • The fourth is the image warping expression. Using all the information from the previous calculations, we need to generate a new image so that it becomes stable.

The camera model

We use the standard pinhole camera model. This model is used in several algorithms and is a good approximation of an actual camera.

There are three unknowns. The o variables indicate the origin of the camera axis in the image plane (these can be assumed to be 0). The two 1s in the matrix indicate the aspect ratio...

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 $19.99/month. Cancel anytime