更新时间:2021-07-02 12:08:14
coverpage
Title Page
Copyright and Credits
Mastering OpenCV 4 with Python
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Introduction to OpenCV 4 and Python
Setting Up OpenCV
Technical requirements
Code testing specifications
Hardware specifications
Understanding Python
Introducing OpenCV
Contextualizing the reader
A theoretical introduction to the OpenCV library
OpenCV modules
OpenCV users
OpenCV applications
Why citing OpenCV in your research work
Installing OpenCV Python and other packages
Installing Python OpenCV and other packages globally
Installing Python
Installing Python on Linux
Installing Python on Windows
Installing OpenCV
Installing OpenCV on Linux
Installing OpenCV on Windows
Testing the installation
Installing Python OpenCV and other packages with virtualenv
Python IDEs to create virtual environments with virtualenv
Anaconda/Miniconda distributions and conda package–and environment-management system
Packages for scientific computing data science machine learning deep learning and computer vision
Jupyter Notebook
Trying Jupiter Notebook online
Installing the Jupyter Notebook
Installing Jupyter using Anaconda
Installing Jupyter with pip
The OpenCV and Python project structure
Our first Python and OpenCV project
Summary
Questions
Further reading
Image Basics in OpenCV
A theoretical introduction to image basics
Main problems in image processing
Image-processing steps
Images formulation
Concepts of pixels colors channels images and color spaces
File extensions
The coordinate system in OpenCV
Accessing and manipulating pixels in OpenCV
Accessing and manipulating pixels in OpenCV with BGR images
Accessing and manipulating pixels in OpenCV with grayscale images
BGR order in OpenCV
Handling Files and Images
An introduction to handling files and images
sys.argv
Argparse – command-line option and argument parsing
Reading and writing images
Reading images in OpenCV
Reading and writing images in OpenCV
Reading camera frames and video files
Reading camera frames
Accessing some properties of the capture object
Saving camera frames
Reading a video file
Reading from an IP camera
Writing a video file
Calculating frames per second
Considerations for writing a video file
Playing with video capture properties
Getting all the properties from the video capture object
Using the properties – playing a video backwards
Constructing Basic Shapes in OpenCV
A theoretical introduction to drawing in OpenCV
Drawing shapes
Basic shapes – lines rectangles and circles