Learn OpenCV with Python by Examples: Implement Computer Vision Algorithms Provided by OpenCV with Python for Image Processing, Object Detection and Machine Learning. 2 Ed

Learn OpenCV with Python by Examples: Implement Computer Vision Algorithms Provided by OpenCV with Python for Image Processing, Object Detection and Machine Learning. 2 Ed

Learn OpenCV with Python by Examples: Implement Computer Vision Algorithms Provided by OpenCV with Python for Image Processing, Object Detection and Machine Learning. 2 Ed
Автор: Chen James
Дата выхода: 2023
Издательство: Independent publishing
Количество страниц: 303
Размер файла: 3.8 MB
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы

1 Introduction....11

1.1 About OpenCV....12

1.2 Target Audients of This Book....14

1.3 Source Codes for This Book....15

1.4 Hardware Requirements and Software Versions....16

1.5 How This Book Is Organized....18

2 Installation....20

2.1 Install on Windows....21

2.1.1 Install Python on Windows 10....21

2.1.2 PyCharm, the Integrated Development Environment....23

2.2 Install Python on Ubuntu....23

2.2.1 Install Python on Ubuntu....23

2.2.2 Install PyCharm on Ubuntu....25

2.3 Configure PyCharm and Install OpenCV....25

2.3.1 Create a New Python Project....25

2.3.2 Install and Upgrade OpenCV and Libraries....27

2.3.3 Load the Project Files....29

2.3.4 Hello OpenCV....31

3 OpenCV Basics....34

3.1 Load and Display Images....34

3.1.1 Load Color Images....35

3.1.2 Load Grayscale Images....37

3.1.3 Convert Color Image to Grayscale....37

3.2 Load and Display Videos....39

3.3 Display Webcam....41

3.4 Image Fundamentals....43

3.4.1 Pixels....43

3.4.2 BGR Color Space and Channels....45

3.4.3 HSV Color Space and Channels....46

3.5 Draw Shapes....50

3.5.1 Create an Empty Canvas....50

3.5.2 Draw a Line....52

3.5.3 Draw Rectangles, Circles, Ellipses and Polylines....54

3.6 Draw Texts....56

3.7 Draw an OpenCV-like Icon....58

4 User Interaction....62

4.1 Mouse Operations....63

4.2 Draw Circles with Mouse....66

4.3 Draw Polygon with Mouse....70

4.4 Crop an Image with Mouse....72

4.5 Input Values with Trackbars....74

5 Image Processing....80

5.1 Conversion of Color Spaces....81

5.1.1 Convert BGR to Gray....81

5.1.2 Convert Grayscale to BGR....83

5.1.3 Convert BGR to HSV....84

5.1.4 Convert HSV to BGR....85

5.2 Resize, Crop and Rotate an Image....86

5.3 Adjust Contrast and Brightness of an Image....92

5.4 Adjust Hue, Saturation and Value....96

5.5 Blend Image....100

5.6 Bitwise Operation....104

5.7 Warp Image....111

5.8 Blur Image....117

5.8.1 What is Gaussian Blur....118

5.8.2 Gaussian Blur....121

5.8.3 Median Blur....123

5.9 Histogram....124

5.9.1 About Histogram....124

5.9.2 Histogram for Grayscale Images....126

5.9.3 Histogram for Color Images....129

6 Object Detection....131

6.1 Canny Edge Detection....132

6.2 Dilation and Erosion....135

6.3 Shape Detection....139

6.3.1 Pre-processing for Shape Detection....140

6.3.2 Find Contours....141

6.3.3 Detect the Type, Area and Perimeter of the Shapes....142

6.3.4 Other Contour Features....146

6.4 Color Detection....147

6.4.1 Find Color from an Image....147

6.4.2 Find Color Labels....151

6.5 Text Recognition with Tesseract....154

6.5.1 Install and configure Tesseract....155

6.5.2 Text Recognition....156

6.6 Human Detection....165

6.6.1 Human Detection from Pictures....165

6.6.2 Human Detection from Videos....167

6.7 Face and Eye Detection....169

6.8 Remove Background....173

6.8.1 Remove Background by Color....174

6.8.2 Remove Background by Contour....178

6.8.3 Remove Background by Machine Learning....182

6.8.4 Remove Background by Mask....186

6.9 Blur Background....188

7 Machine Learning....195

7.1 K-Means Clustering....199

7.1.1 What is K-Means Clustering....199

7.1.2 Color Quantization....206

7.1.3 Handwritten Digits Grouping....210

7.2 K-Nearest Neighbors....215

7.2.1 What is K-Nearest Neighbors....215

7.2.2 KNN Evaluation....219

7.2.3 Recognize Handwritten Digits with KNN....228

7.3 Support Vector Machine....236

7.3.1 What is Support Vector Machine....236

7.3.2 Recognize Handwritten Digits with SVM....244

7.3.3 IRIS Dataset Classification....247

7.4 Artificial Neural Network (ANN)....252

7.4.1 What is an Artificial Neural Network (ANN)?....252

7.4.2 Activation Functions....257

7.4.3 Recognize Handwritten Digits with ANN....266

7.5 Convolutional Neural Network (CNN)....274

7.5.1 What is a Convolutional Neural Network....274

7.5.2 Convolution Layer....275

7.5.3 Pooling Layer....283

7.5.4 Fully Connected Layer....285

7.5.5 CNN Architecture....286

7.5.6 Build a CNN Model with Tensorflow/Keras....287

7.5.7 Popular CNN Architectures....296

References....299

About the Author....301

This book is a comprehensive guide to learning the basics of computer vision and machine learning using the powerful OpenCV library and the Python programming language. The book offers a practical, hands-on approach to learn the concepts and techniques of computer vision through practical example. All codes in this book are available at Github.


Through a series of examples, the book covers a wide range of topics including image and video processing, feature detection, object detection and recognition, machine learning and deep neural networks. Each chapter includes detailed explanations of the concepts and techniques involved, as well as practical examples and code snippets that demonstrate how to implement them in Python. Throughout the book, readers will work through hands-on examples and projects, learning how to build image processing applications from scratch.


Whether you are a beginner or an experienced programmer, this book provides a valuable resource for learning computer vision with OpenCV and Python. The clear and concise writing style makes it easy for readers to follow along, and the numerous examples ensure that readers can practice and apply what they have learned. By the end of the book, readers will have a solid understanding of the fundamentals of computer vision and be able to build their own computer vision applications with confidence. This book is an excellent resource for anyone looking to learn computer vision and machine learning using the OpenCV library and Python programming language.


Похожее:

Список отзывов:

Нет отзывов к книге.