Book Image

OpenCV 3 Blueprints

Book Image

OpenCV 3 Blueprints

Overview of this book

Table of Contents (14 chapters)
OpenCV 3 Blueprints
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Calibration


In the section that discusses the mathematical basis, we found several unknown camera parameters. These parameters need to be figured out so we can process each image and stabilize it. As with any calibration process, we need to use a predefined scene. Using this scene and a relative handshake, we will try to estimate the unknown parameters.

The unknown parameters are:

  • Focal length of the lens

  • Delay between gyroscope and frame timestamps

  • Bias in the gyroscope

  • Duration of the rolling shutter

It is often possible to detect the focal length of a phone camera (in terms of millimeters) using the platform API (getFocalLength() for Android). However, we're interested in the camera space focal length. This number is a product of the physical focal length and a conversion ratio that depends on the image resolution and the physical size of the camera sensor, which might differ across cameras. It is also possible to find the conversion ratio by trigonometry if the field of view (getVerticalViewAngle...