Free Book Learning OpenCV 3 Computer Vision with Python


Learning OpenCV 3 Computer Vision with Python



Free Book Learning OpenCV 3 Computer Vision with Python








Author(s): Joe Minichino, Joseph Howse
Publisher: Packt Publishing, Year: 2015
ISBN: 1785283847, 978-1785283840

Describe:


Unleash the power of computer vision with Python with OpenCV

About this book
• Create great apps using OpenCV and Python
• Learn about advanced machine learning concepts
• Take advantage of the power of computer vision with this easy-to-follow guide

for whom is this book


This book is intended for beginners in the world of OpenCV and computer vision, as well as OpenCV veterans who want to know what is new in OpenCV 3, this book is useful as a reference for experts and a training guide for beginners, or for anyone who wants to get to know the concepts of classification and detection of objects in simple and understandable terms. Basic knowledge about Python and programming concepts is required, although the book has an easy learning curve from a theory and coding point of view.

What will you learn?


• Install and learn about Python API OpenCV 3
Understand the basics of image processing and video analysis
• Identify and recognize objects in photos and videos
• Face detection and recognition using OpenCV
• Train and use your object's workbooks
• Learn the concepts of machine learning in the context of computer vision
• Working with artificial neural networks using OpenCV
• Developing your computer's real-world vision application

In detail


OpenCV 3 is a sophisticated computer vision library that allows a wide variety of image and video processing operations. Some of the more exciting and futuristic features such as face recognition or object tracking can be easily achieved with OpenCV 3. Learning the basic concepts behind computer vision algorithms and models and an OpenCV API will allow the development of all types of applications in the real world, including security and surveillance.
Starting with basic image processing, the book will take you to advanced computer vision concepts. Computer vision is a science that is rapidly evolving and exploding its applications in the real world, so this book will attract beginners in computer vision as well as subject matter experts wishing to learn the all-new OpenCV 3.0.0. You will build a theoretical foundation for image processing and video analysis, advances in classification concepts through machine learning, gain technical knowledge that will allow you to create and use object and work detectors, and even track objects in movies or feed the camcorder. Finally, the journey will end in the world of artificial neural networks, along with the development of handwriting number recognition application.

Method and approach


This book is a comprehensive guide to the all-new OpenCV 3 with Python for developing real computer vision applications.

Table of Contents

Chapter 1: Setting Up OpenCV 1


Choose and use the correct setup tools 2

Installing on Windows 2

Use dual stabilizers (do not support depth cameras) 3

Use of CMake and compilers 4

Install on OS X 7

Use MacPorts with prepackaged packages 8

Use MacPorts with your custom packs 10

Homebrew use with prepackaged packages (does not support depth cameras) 12

Use Homebrew with your custom packages 13

Installation on Ubuntu and its variants 13

Ubuntu warehouse use (does not support depth cameras) 14

Build OpenCV from Source 14

Installing on other Unix 15-like systems

Installing the contributing units 16

Sample operation 16

Find documents, assistance, and updates 18

Abstract 19

Chapter Two: Processing files, cameras, and the graphical user interface 21

Basic I / O texts 21

Read / write 22 image file

Conversion between image and raw bytes 24

Access image data using numpy.array 26

Read / write video file 28

Capture camera frames 29

Display pictures in window 31

Show camera frames in window 32

Project Cameo (Facial Tracking and Image Processing) 34

Engraving - Object Oriented Design 35

Summarize video streams with CaptureManager 35 managers

Window and keyboard summary with managers. Windows 41

Apply everything in veil embossing 42

Summary 44

Chapter 3: Image Processing with OpenCV 3 45

Conversion between different color spaces 45

A quick note on BGR 46

Fourier transform 46

High pass filter 47

Low pass filter 49

Create 49 units

Edge Detection 49

Custom beads - Twisted 51

Modify the application 53

Edge detection with Canny 55

Contour 56 revealed

Lines - bounding box, minimal rectangle,

The minimum closed circuit is 57

Fonts - convex features and the Douglas-Poker 60 algorithm

Line and Circle Detection 62

Line 62 revealed

Circle Detection 63

Figures 64 revealed

Summary 65

Chapter Four: Estimating Depth and Segmentation 67

Create 67 units

Capture frames from a 68-depth camera

Create a mask from the unevenness map 71

Hide copy operation 72

Depth estimation with regular camera 74

Hash the object using Watershed and GrabCut 80 algorithms

Example of detection provided with GrabCut 82

Image segmentation using Watershed 84 algorithm

Abstract 87

Chapter Five: Face Detection and Recognition 89

90 concepts of Har Falls

Get data for Haar Cascade 91

Use OpenCV to perform facial detection 91

Static face detection 92

Perform a face detection on Video 94

Face Recognition Procedure 97

Generate data for face recognition 98

Face recognition 100

Prepare training data 101

Data download and face recognition 102

Understanding Eigenfaces 103

Facial recognition procedure with Fisherfaces 105

Conduct facial recognition using LBPH 106

Ignore the results with a confidence score of 106

Abstract 107

Chapter Six: Photo Retrieval and Research

Using photo descriptors 109

Feature detection algorithms 109

Fixing features 110

Feature detection - 110 angles

Extract and describe features using DoG and SIFT 113

Anatomy of a major point 116

Extract and discover features with Fast Hessian and SURF 117

ORB feature detection and feature matching 120

Fast 120

Summary 121

Prot force matching 121

Feature matching with ORB 122

Using K-nearest neighbors matching 125

FLANN 126-based matching

Matching FLANN with homography 130

Sample application - forensic tattoo 133

Save image descriptors to file 133

Find 134 matches

Abstract 137

Chapter Seven: Detecting and Identifying Things 139

139 techniques for detecting and identifying objects

HOG 140 descriptor

Scale the number 142

Site issue 142

Non-Max Suppression (or Non-Maximum) 145

Support vector machines 146

People revealed 147

Creation and training of the object detector 149

Bag of words 149

Sagittarius in computer vision 150

Auto detection 153

What did we just do? 155

SVM and sliding windows 160

Example - revealed a car in scene 161

Oh man where is my car? 171

Abstract 175

Chapter Eight: Tracking Things 177

Moving objects detection 177

Basic motion detection 178

Background Developers - KNN, MOG2, and GMG 181

Mincheft and Cam Shift 185

188 colorful charts

CalcHist 189

CalcBackProject 190

In summary 190

Refer to symbol 191

Cam Shift 193

Kalman candidate 194

Expect and update 195

Example 196

Realistic example - tracing infantry 199

Application workflow 200

Brief deviation - functional programming vs. object-oriented programming 200

Infantry class 202

The main program 205

Where do we go from here? 207

Summary 208

Chapter 9: Neural Networks with OpenCV - Introduction 209

Artificial neural networks 209

Neurons and theory 210

Structure of ANN 211 

Grid layers by exa