Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Title Page
Copyright and Credits
OpenCV 4 with Python Blueprints Second Edition
About Packt
Why subscribe?
Contributors
About the authors
About the reviewer
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
Code in Action
Download the color images
Conventions used
Get in touch
Reviews
Fun with Filters
Getting started
Planning the app
Creating a black-and-white pencil sketch
Understanding approaches for using dodging and burning techniques
Implementing a Gaussian blur with two-dimensional convolution
Applying pencil sketch transformation
Using an optimized version of a Gaussian blur
Generating a warming and cooling filter
Using color manipulation via curve shifting
Implementing a curve filter using lookup tables
Designing the warming and cooling effect
Cartoonizing an image
Using a bilateral filter for edge-aware smoothing
Detecting and emphasizing prominent edges
Combining colors and outlines to produce a cartoon
Putting it all together
Running the app
Mapping the GUI base class
Understanding the GUI constructor
Learning about a basic GUI layout
Handling video streams
Drafting a custom filter layout
Summary
Attributions
Hand Gesture Recognition Using a Kinect Depth Sensor
Getting started
Planning the app
Setting up the app
Accessing the Kinect 3D sensor
Utilizing OpenNI-compatible sensors
Running the app and main function routine
Tracking hand gestures in real time
Understanding hand region segmentation
Finding the most prominent depth of the image center region
Applying morphological closing for smoothening
Finding connected components in a segmentation mask
Performing hand shape analysis
Determining the contour of the segmented hand region
Finding the convex hull of a contour area
Finding the convexity defects of a convex hull
Performing hand gesture recognition
Distinguishing between different causes of convexity defects
Classifying hand gestures based on the number of extended fingers
Summary
Finding Objects via Feature Matching and Perspective Transforms
Getting started
Listing the tasks performed by the app
Planning the app
Setting up the app
Running the app – the main() function routine
Displaying results
Understanding the process flow
Learning feature extraction
Looking at feature detection
Detecting features in an image with SURF
Obtaining feature descriptors with SURF
Understanding feature matching
Matching features across images with FLANN
Testing the ratio for outlier removal
Visualizing feature matches
Mapping homography estimation
Warping the image
Learning feature tracking
Understanding early outlier detection and rejection
Seeing the algorithm in action
Summary
Attributions
3D Scene Reconstruction Using Structure from Motion
Getting started
Planning the app
Learning about camera calibration
Understanding the pinhole camera model
Estimating the intrinsic camera parameters
Defining the camera calibration GUI
Initializing the algorithm
Collecting image and object points
Finding the camera matrix
Setting up the app
Understanding the main routine function
Implementing the SceneReconstruction3D class
Estimating the camera motion from a pair of images
Applying point matching with rich feature descriptors
Using point matching with optic flow
Finding the camera matrices
Applying image rectification
Reconstructing the scene
Understanding 3D point cloud visualization
Learning about structure from motion
Summary
Using Computational Photography with OpenCV
Getting started
Planning the app
Understanding the 8-bit problem
Learning about RAW images
Using gamma correction
Understanding high-dynamic-range imaging
Exploring ways to vary exposure
Shutter speed
Aperture
ISO speed
Generating HDR images using multiple exposure images
Extracting exposure strength from images
Estimating the camera response function
Writing an HDR script using OpenCV
Displaying HDR images
Understanding panorama stitching
Writing script arguments and filtering images
Figuring out relative positions and the final picture size
Finding camera parameters
Creating the canvas for the panorama
Blending the images together
Improving panorama stitching
Summary
Further reading
Attributions
Tracking Visually Salient Objects
Getting started
Understanding visual saliency
Planning the app
Setting up the app
Implementing the main function
Understanding the MultiObjectTracker class
Mapping visual saliency
Learning about Fourier analysis
Understanding the natural scene statistics
Generating a saliency map with the spectral residual approach
Detecting proto-objects in a scene
Understanding mean-shift tracking
Automatically tracking all players on a soccer field
Learning about the OpenCV Tracking API
Putting it all together
Summary
Dataset attribution
Learning to Recognize Traffic Signs
Getting started
Planning the app
Briefing on supervised learning concepts
The training procedure
The testing procedure
Understanding the GTSRB dataset
Parsing the dataset
Learning about dataset feature extraction
Understanding common preprocessing
Learning about grayscale features
Understanding color spaces
Using SURF descriptor
Mapping HOG descriptor
Learning about SVMs
Using SVMs for multiclass classification
Training the SVM
Testing the SVM
Accuracy
Confusion matrix
Precision
Recall
Putting it all together
Improving results with neural networks
Summary
Dataset attribution
Learning to Recognize Facial Emotions
Getting started
Planning the app
Learning about face detection
Learning about Haar-based cascade classifiers
Understanding pre-trained cascade classifiers
Using a pre-trained cascade classifier
Understanding the FaceDetector class
Detecting faces in grayscale images
Preprocessing detected faces
Detecting the eyes
Transforming the face
Collecting data
Assembling a training dataset
Running the application
Implementing the data collector GUI
Augmenting the basic layout
Processing the current frame
Storing the data
Understanding facial emotion recognition
Processing the dataset
Learning about PCA
Understanding MLPs
Understanding a perceptron
Knowing about deep architectures
Crafting an MLP for facial expression recognition
Training the MLP
Testing the MLP
Running the script
Putting it all together
Summary
Further reading
Attributions
Learning to Classify and Localize Objects
Getting started
Planning the app
Preparing an inference script
Preparing the dataset
Downloading and parsing the dataset
Creating a TensorFlow dataset
Classifying with CNNs
Understanding CNNs
Learning about transfer learning
Preparing the pet type and breed classifier
Training and evaluating the classifier
Localizing with CNNs
Preparing the model
Understanding backpropagation
Training the model
Seeing inference in action
Summary
Dataset attribution
Learning to Detect and Track Objects
Getting started
Planning the app
Preparing the main script
Detecting objects with SSD
Using other detectors
Understanding object detectors
The single-object detector
The sliding-window approach
Single-pass detectors
Learning about Intersection over Union
Training SSD- and YOLO-like networks
Tracking detected objects
Implementing a Sort tracker
Understanding the Kalman filter
Using a box tracker with the Kalman filter
Converting boundary boxes to observations
Implementing a Kalman filter
Associating detections with trackers
Defining the main class of the tracker
Seeing the app in action
Summary
Profiling and Accelerating Your Apps
Accelerating with Numba
Accelerating with the CPU
Understanding Numba, CUDA, and GPU acceleration
Setting Up a Docker Container
Defining a Dockerfile
Working with a GPU
Other Books You May Enjoy
Leave a review - let other readers know what you think
← Prev
Back
Next →
← Prev
Back
Next →