Book Image

OpenCV with Python Blueprints

By : Michael Beyeler, Michael Beyeler (USD)
Book Image

OpenCV with Python Blueprints

By: Michael Beyeler, Michael Beyeler (USD)

Overview of this book

Table of Contents (14 chapters)
OpenCV with Python Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Planning the app


The final app will extract and visualize structure from motion on a pair of images. We will assume that these two images have been taken with the same camera, whose internal camera parameters we know. If these parameters are not known, they need to be estimated first in a camera calibration process.

The final app will then consist of the following modules and scripts:

  • chapter4.main: This is the main function routine for starting the application.

  • scene3D.SceneReconstruction3D: This is a class that contains a range of functionalities for calculating and visualizing structure from motion. It includes the following public methods:

    • __init__: This constructor will accept the intrinsic camera matrix and the distortion coefficients

    • load_image_pair: A method used to load from the file, two images that have been taken with the camera described earlier

    • plot_optic_flow: A method used to visualize the optic flow between the two image frames

    • draw_epipolar_lines: A method used to draw the...