logo资料库

Learning OpenCV 3 无水印pdf.pdf

第1页 / 共305页
第2页 / 共305页
第3页 / 共305页
第4页 / 共305页
第5页 / 共305页
第6页 / 共305页
第7页 / 共305页
第8页 / 共305页
资料共305页,剩余部分请下载后查看
Cover
Copyright
About the Author
Table of Contents
Preface
1: Laying the Foundation
Digital image basics
Pixel intensities
Color depth and color spaces
Color channels
Introduction to the Mat class
Exploring the Mat class: loading images
Exploring the Mat class – declaring Mat objects
Spatial dimensions of an image
Color space or color depth
Color channels
Image size
Default initialization value
Digging inside Mat objects
Traversing Mat objects
Continuity of the Mat data matrix
Image traversals
Image enhancement
Lookup tables
Linear transformations
Identity transformation
Negative transformation
Logarithmic transformations
Log transformation
Exponential or inverse-log transformation
Summary
2: Image Filtering
Neighborhood of a pixel
Image averaging
Image filters
Image averaging in OpenCV
Blurring an image in OpenCV
Gaussian smoothing
Gaussian function and Gaussian filtering
Gaussian filtering in OpenCV
Using your own filters in OpenCV
Image noise
Vignetting
Implementing Vignetting in OpenCV
Summary
3: Image Thresholding
Binary images
Image thresholding basics
Image thresholding in OpenCV
Types of simple image thresholding
Binary threshold
Inverted binary threshold
Truncate
Threshold-to-zero
Inverted threshold-to-zero
Adaptive thresholding
Morphological operations
Erosion and dilation
Erosion and dilation in OpenCV
Summary
4: Image Histograms
The basics of histograms
Histograms in OpenCV
Plotting histograms in OpenCV
Color histograms in OpenCV
Multidimensional histograms in OpenCV
Summary
5: Image Derivatives and Edge Detection
Image derivatives
Image derivatives in two dimensions
Visualizing image derivatives with OpenCV
The Sobel derivative filter
From derivatives to edges
The Sobel detector – a basic framework for edge detection
The Canny edge detector
Image noise and edge detection
Laplacian – yet another edge detection technique
Blur detection using OpenCV
Summary
6: Face Detection Using OpenCV
Image classification systems
Face detection
Haar features
Integral image
Integral image in OpenCV
AdaBoost learning
Cascaded classifiers
Face detection in OpenCV
Controlling the quality of detected faces
Gender classification
Working with real datasets
Summary
7: Affine Transformations and Face Alignment
Exploring the dataset
Running face detection on the dataset
Face alignment – the first step in facial analysis
Rotating faces
Image cropping — basics
Image cropping for face alignment
Face alignment – the complete pipeline
Summary
8: Feature Descriptors in OpenCV
Introduction to the local binary pattern
A basic implementation of LBP
Variants of LBP
What does LBP capture?
Applying LBP to aligned facial images
A complete implementation of LBP
Putting it all together – the main() function
Summary
9: Machine Learning with OpenCV
What is machine learning
Supervised and unsupervised learning
Revisiting the image classification framework
k-means clustering – the basics
k-means clustering – the algorithm
k-means clustering in OpenCV
k-nearest neighbors classifier – introduction
k-nearest neighbors classifier – algorithm
What k to use
k-nearest neighbors classifier in OpenCV
Some problems with kNN
Some enhancements to kNN
Support vector machines (SVMs) – introduction
Intuition into the workings of SVMs
Non-linear SVMs
SVM in OpenCV
Using an SVM as a gender classifier
Overfitting
Cross-validation
Common evaluation metrics
The P-R curve
Some qualitative results
Summary
Appendix: Command-line Arguments in C++
Introduction to command-line arguments
Parsing command-line arguments
Summary
Index
Learning OpenCV 3 Application Development Build, create, and deploy your own computer vision applications with the power of OpenCV Samyak Datta BIRMINGHAM - MUMBAI
Learning OpenCV 3 Application Development Copyright © 2016 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: December 2016 Production reference: 1131216 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78439-145-4 www.packtpub.com
Credits Author Samyak Datta Copy Editor Safis Editing Reviewer Nikolaus Gradwohl Project Coordinator Sheejal Shah Commissioning Editor Kunal Parikh Acquisition Editor Sonali Vernekar Proofreader Safis Editing Indexer Rekha Nair Content Development Editor Nikhil Borkar Graphics Abhinash Sahu Technical Editor Hussain Kanchwala Production Coordinator Shraddha Falebhai
About the Author Samyak Datta has a bachelor's and a master's degree in Computer Science from the Indian Institute of Technology, Roorkee. He is a computer vision and machine learning enthusiast. His first contact with OpenCV was in 2013 when he was working on his master's thesis, and since then, there has been no looking back. He has contributed to OpenCV's GitHub repository. Over the course of his undergraduate and master's degrees, Samyak has had the opportunity to engage with both the industry and research. He worked with Google India and Media.net (Directi) as a software engineering intern, where he was involved with projects ranging from machine learning and natural language processing to computer vision. As of 2016, he is working at the Center for Visual Information Technology (CVIT) at the Indian Institute of Information Technology, Hyderabad.
About the Reviewer Nikolaus Gradwohl was born 1976 in Vienna, Austria and always wanted to become an inventor like Gyro Gearloose. When he got his first Atari, he figured out that being a computer programmer is the closest he could get to that dream. He has written programs for nearly anything that can be programmed, ranging from 8-bit microcontrollers to mainframes, for a living. In his free time, he collects programming languages and operating systems. He is the author of the book Processing 2: Creative Coding Hotshot. You can see some of his work on his blog at h t t p ://w w w . l o c a l - g u r u . n e t /.
www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. h t t p s ://w w w . p a c k t p u b . c o m /m a p t Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser
Table of Contents Preface Chapter 1: Laying the Foundation Digital image basics Pixel intensities Color depth and color spaces Color channels Introduction to the Mat class Exploring the Mat class: loading images Exploring the Mat class – declaring Mat objects Spatial dimensions of an image Color space or color depth Color channels Image size Default initialization value Digging inside Mat objects Traversing Mat objects Continuity of the Mat data matrix Image traversals Image enhancement Lookup tables Linear transformations Identity transformation Negative transformation Logarithmic transformations Log transformation Exponential or inverse-log transformation Summary Chapter 2: Image Filtering Neighborhood of a pixel Image averaging Image filters Image averaging in OpenCV Blurring an image in OpenCV Gaussian smoothing 1 7 8 9 9 11 11 13 15 15 16 16 17 17 19 22 23 24 28 30 31 32 33 38 38 46 50 51 52 54 55 58 65 66
分享到:
收藏