Book Image

Learning OpenCV 3 Computer Vision with Python (Update)

Book Image

Learning OpenCV 3 Computer Vision with Python (Update)

Overview of this book

Table of Contents (16 chapters)
Learning OpenCV 3 Computer Vision with Python Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
6
Retrieving Images and Searching Using Image Descriptors
Index

Creating modules


The code to capture and manipulate depth-camera data will be reusable outside Cameo.py. So, we should separate it into a new module. Let's create a file called depth.py in the same directory as Cameo.py. We need the following import statement in depth.py:

import numpy

We will also need to modify our preexisting rects.py file so that our copy operations can be limited to a nonrectangular subregion of a rectangle. To support the changes we are going to make, let's add the following import statements to rects.py:

import numpy
import utils

Finally, the new version of our application will use depth-related functionalities. So, let's add the following import statement to Cameo.py:

import depth

Now, let's go deeper into the subject of depth.