Building Computer Vision Projects with OpenCV 4 and C++
David Millán Escrivá Prateek Joshi Vinícius G. Mendon?a Roy Shilkrot更新时间:2021-07-02 12:29:33
最新章节:Leave a review - let other readers know what you thinkcoverpage
Title Page
Copyright and Credits
Building Computer Vision Projects with OpenCV 4 and C++
About Packt
Why subscribe?
Packt.com
Contributors
About the authors
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
Conventions used
Get in touch
Reviews
Getting Started with OpenCV
Understanding the human visual system
How do humans understand image content?
Why is it difficult for machines to understand image content?
What can you do with OpenCV?
Inbuilt data structures and input/output
Image processing operations
GUI
Video analysis
3D reconstruction
Feature extraction
Object detection
Machine learning
Computational photography
Shape analysis
Optical flow algorithms
Face and object recognition
Surface matching
Text detection and recognition
Deep learning
Installing OpenCV
Windows
Mac OS X
Linux
Summary
An Introduction to the Basics of OpenCV
Technical requirements
Basic CMake configuration file
Creating a library
Managing dependencies
Making the script more complex
Images and matrices
Reading/writing images
Reading videos and cameras
Other basic object types
Vec object type
Scalar object type
Point object type
Size object type
Rect object type
RotatedRect object type
Basic matrix operations
Basic data persistence and storage
Writing to FileStorage
Summary
Learning Graphical User Interfaces
Technical requirements
Introducing the OpenCV user interface
Basic graphical user interface with OpenCV
Adding slider and mouse events to our interfaces
Graphic user interface with Qt
Adding buttons to the user interface
OpenGL support
Summary
Delving into Histogram and Filters
Technical requirements
Generating a CMake script file
Creating the graphical user interface
Drawing a histogram
Image color equalization
Lomography effect
Cartoonize effect
Summary
Automated Optical Inspection Object Segmentation and Detection
Technical requirements
Isolating objects in a scene
Creating an application for AOI
Preprocessing the input image
Noise removal
Removing the background using the light pattern for segmentation
Thresholding
Segmenting our input image
The connected components algorithm
The findContours algorithm
Summary
Learning Object Classification
Technical requirements
Introducing machine learning concepts
OpenCV machine learning algorithms
Computer vision and the machine learning workflow
Automatic object inspection classification example
Feature extraction
Training an SVM model
Input image prediction
Summary
Detecting Face Parts and Overlaying Masks
Technical requirements
Understanding Haar cascades
What are integral images?
Overlaying a face mask in a live video
What happened in the code?
Get your sunglasses on
Looking inside the code
Tracking the nose mouth and ears
Summary
Video Surveillance Background Modeling and Morphological Operations
Technical requirements
Understanding background subtraction
Naive background subtraction
Does it work well?
Frame differencing
How well does it work?
The Mixture of Gaussians approach
What happened in the code?
Morphological image processing
What's the underlying principle?
Slimming the shapes
Thickening the shapes
Other morphological operators
Morphological opening
Morphological closing
Drawing the boundary
Top Hat transform
Black Hat transform
Summary
Learning Object Tracking
Technical requirements
Tracking objects of a specific color
Building an interactive object tracker
Detecting points using the Harris corner detector
Good features to track
Feature-based tracking
Lucas-Kanade method
Farneback algorithm
Summary
Developing Segmentation Algorithms for Text Recognition
Technical requirements
Introducing optical character recognition
Preprocessing stage
Thresholding the image
Text segmentation
Creating connected areas
Identifying paragraph blocks
Text extraction and skewing adjustment
Installing Tesseract OCR on your operating system
Installing Tesseract on Windows
Building the latest library
Setting up Tesseract in Visual Studio
Static linking
Installing Tesseract on Mac
Using the Tesseract OCR library
Creating an OCR function
Sending the output to a file
Summary
Text Recognition with Tesseract
Technical requirements
How the text API works
The scene detection problem
Extremal regions
Extremal region filtering
Using the text API
Text detection
Text extraction
Text recognition
Summary
Deep Learning with OpenCV
Technical requirements
Introduction to deep learning
What is a neural network and how can we learn from data?
Convolutional neural networks
Deep learning in OpenCV
YOLO – real-time object detection
YOLO v3 deep learning model architecture
The YOLO dataset vocabulary and model
Importing YOLO into OpenCV
Face detection with SSD
SSD model architecture
Importing SSD face detection into OpenCV
Summary
Cartoonifier and Skin Color Analysis on the RaspberryPi
Accessing the webcam
Main camera processing loop for a desktop app
Generating a black and white sketch
Generating a color painting and a cartoon
Generating an evil mode using edge filters
Generating an alien mode using skin detection
Skin detection algorithm
Showing the user where to put their face
Implementation of the skin color changer
Reducing the random pepper noise from the sketch image
Porting from desktop to an embedded device
Equipment setup to develop code for an embedded device
Configuring a new Raspberry Pi
Installing OpenCV on an embedded device
Using the Raspberry Pi Camera Module
Installing the Raspberry Pi Camera Module driver
Making Cartoonifier run in fullscreen
Hiding the mouse cursor
Running Cartoonifier automatically after bootup
Speed comparison of Cartoonifier on desktop versus embedded
Changing the camera and camera resolution
Power draw of Cartoonifier running on desktop versus embedded system
Streaming video from Raspberry Pi to a powerful computer
Customizing your embedded system!
Summary
Explore Structure from Motion with the SfM Module
Technical requirements
Core concepts of SfM
Calibrated cameras and epipolar geometry
Stereo reconstruction and SfM
Implementing SfM in OpenCV
Image feature matching
Finding feature tracks
3D reconstruction and visualization
MVS for dense reconstruction
Summary
Face Landmark and Pose with the Face Module
Technical requirements
Theory and context
Active appearance models and constrained local models
Regression methods
Facial landmark detection in OpenCV
Measuring error
Estimating face direction from landmarks
Estimated pose calculation
Projecting the pose on the image
Summary
Number Plate Recognition with Deep Convolutional Networks
Introduction to ANPR
ANPR algorithm
Plate detection
Segmentation
Classification
Plate recognition
OCR segmentation
Character classification using a convolutional neural network
Creating and training a convolutional neural network with TensorFlow
Preparing the data
Creating a TensorFlow model
Preparing a model for OpenCV
Import and use model in OpenCV C++ code
Summary
Face Detection and Recognition with the DNN Module
Introduction to face detection and face recognition
Face detection
Implementing face detection using OpenCV cascade classifiers
Loading a Haar or LBP detector for object or face detection
Accessing the webcam
Detecting an object using the Haar or LBP classifier
Detecting the face
Implementing face detection using the OpenCV deep learning module
Face preprocessing
Eye detection
Eye search regions
Geometrical transformation
Separate histogram equalization for left and right sides
Smoothing
Elliptical mask
Collecting faces and learning from them
Collecting preprocessed faces for training
Training the face recognition system from collected faces
Viewing the learned knowledge
Average face
Eigenvalues Eigenfaces and Fisherfaces
Face recognition
Face identification – recognizing people from their faces
Face verification—validating that it is the claimed person
Finishing touches—saving and loading files
Finishing touches—making a nice and interactive GUI
Drawing the GUI elements
Startup mode
Detection mode
Collection mode
Training mode
Recognition mode
Checking and handling mouse clicks
Summary
References
Android Camera Calibration and AR Using the ArUco Module
Technical requirements
Augmented reality and pose estimation
Camera calibration
Augmented reality markers for planar reconstruction
Camera access in Android OS
Finding and opening the camera
Camera calibration with ArUco
Augmented reality with jMonkeyEngine
Summary
iOS Panoramas with the Stitching Module
Technical requirements
Panoramic image stitching methods
Feature extraction and robust matching for panoramas
Affine constraint
Random sample consensus (RANSAC)
Homography constraint
Bundle Adjustment
Warping images for panorama creation
Project overview
Setting up an iOS OpenCV project with CocoaPods
iOS UI for panorama capture
OpenCV stitching in an Objective-C++ wrapper
Summary
Further reading
Finding the Best OpenCV Algorithm for the Job
Technical requirements
Is it covered in OpenCV?
Algorithm options in OpenCV
Which algorithm is best?
Example comparative performance test of algorithms
Summary
Avoiding Common Pitfalls in OpenCV
History of OpenCV from v1 to v4
OpenCV and the data revolution in computer vision
Historic algorithms in OpenCV
How to check when an algorithm was added to OpenCV
Common pitfalls and suggested solutions
Summary
Further reading
Other Books You May Enjoy
Leave a review - let other readers know what you think
更新时间:2021-07-02 12:29:33