"OpenCV3 programming entry" Mao Xingyun edited PDF HD full version download with a label and source code learning

1 EDITORIAL:

Speaking OpenCV3 entry-learning materials, should first recommendation Mao Xingyun edited "OpenCV3 programming entry" books, this book is simple and obvious move, and not too deep theory and practice, but rich in content and complete overview of the main contents OpenCV3 very suitable Children's learning portal and visual processing of reference, below a given book can be downloaded HD tagged PDF link and source code resources

Baidu cloud disk download link: "OpenCV3 Introduction to Programming" Mao Xingyun high-definition version of tagged PDF and source with books

 

 

 

 

 

 

 

2 content:

 

OpenCV play an important role in the field of computer vision. As a cross-platform based on open source computer vision library issue, OpenCV to achieve many common algorithms of image processing and computer vision. "OpenCV3 programming entry" to the most current version of OpenCV most common components of the core module for the index, easy to introduce a powerful, performance, and new features OpenCV2 and OpenCV3 in. Books and supporting OpenCV2 OpenCV3 double version of the sample code package, source code and Thinking containing a total of more than two hundred detailed explanatory description. Readers can find what you want, to get started fast and in-depth study by the technical direction.

The researchers "OpenCV3 programming entry" requires the reader has a basic C / C ++ knowledge, for research in computer vision and related fields of students and teachers, the initial contact OpenCV but has some C / C ++ programming foundation, and there had been OpenCV 1.0 programming experience and want to get started quickly understand and professionals in the field of computer vision openCV2, OpenCV3 programming. "OpenCV3 programming entry" is also suitable for image processing, computer vision amateurs, enthusiasts as open source projects leading to the new OpenCV reference manual use.

 

3 books catalog:

Quick Start first portion OpenCV 1

Chapter 1 encounter OpenCV 3

1.1 OpenCV surrounding the concept of cognitive 4

1.1.1 image processing, computer vision and OpenCV 4

1.1.2 OpenCV Overview 4

1.1.3 Origins and Development of 5

1.1.4 Application Overview 6

1.2 OpenCV basic framework analysis 7

1.3 OpenCV3 brought what 11

1.3.1 change the architecture of the project 11

1.3.2 upgrade OpenCV2 code into some strategies when OpenCV3 error 12

1.4 OpenCV download, installation and configuration 14

1.4.1 Pre-preparation: Download and install Integrated Development Environment 14

1.4.2 Step One: Download and install OpenCV SDK 15

1.4.3 Step Two: Configure Environment Variables 16

1.4.4 Step Three: Project include (include) the directory configuration 17

1.4.5 Step Four: Configure Engineering Library (lib) directory 21

1.4.6 Step Five: Configure link library 22

1.4.7 Step Six: Add OpenCV dynamic link library folder in the Windows 25

1.4.8 Step Seven: Final test 26

1.4.9 Problems and Solutions 27 may encounter

1.5 Quick Start OpenCV image processing 28

1.5.1 The first program: image display 29

1.5.2 The second program: 30 images corrosion

1.5.3 The third program: blurred images 31

1.5.4 fourth program: canny edge detection 32

Video operation 34 1.6 OpenCV base

1.6.1 to read and play video 34

1.6.2 call camera image acquisition 35

1.7 Summary 38

Chapter 2 of cognitive preparation before departure 39

2.1 OpenCV routines official guide and appreciation 40

2.1.1 Color tracking: Camshift 41

2.1.2 Optical Flow: optical flow 42

2.1.3 point tracking: lkdemo 43

2.1.4 Face Recognition: objectDetection 43

2.1.5 SVM guide 44

2.2 Open Source charm: Compile OpenCV source code 45

2.2.1 download and install CMake 45

2.2.2 Use CMake to generate OpenCV source code engineering solutions 46

2.2.3 Compile Source Code 50 OpenCV

2.3 "opencv.hpp" cognitive header 53

2.4 naming convention 54

2.5 argc and argv parameters doubts 56

2.5.1 acquaintance main function argc and argv 56

2.5.2 argc, argv specific meaning 57

Several written 2.5.3 Visual Studio 58 in the main function description

59 2.5.4 summary

2.6 output format the function printf () 59 Analysis

2.6.1 Output Format: printf () function 59

2.6.2 Sample program: printf function usage example 60

2.7 Smart Display OpenCV version currently being used 61

2.8 Summary 61

Chapter 3 HighGUI graphical user interface preliminary 63

3.1 loading the image, the display 64 and output to a file

Namespace 3.1.1 OpenCV 64

64 Analysis of class 3.1.2 Mat

3.1.3 Overview of load and display images 65

3.1.4 load the image: imread () function 65

3.1.5 displayed image: imshow () function 66

3.1.6 About 67 types InputArray

3.1.7 create a window: namedWindow () function 67

3.1.8 the output image to a file: imwrite () function 68

3.1.9 Comprehensive sample program: loading an image, display and output 70

3.2 to create and use the slider 73

3.2.1 Creating sliders: createTrackbar () function 73

3.2.2 Get current track position of the bar: getTrackbarPos () function 76

3.3 mouse 76

3.4 Summary 80

On the second portion of core assembly 83

Chapter 4 OpenCV basic graphics data structure 85

4.1 base image container Mat 86

Overview 86 4.1.1 digital image storage

Use 4.1.2 Mat structure 86

4.1.3 The method of storing pixel values ​​88

Seven Ways 4.1.4 explicitly create Mat object 89

Method formatted output 4.1.5 OpenCV 91

4.1.6 Other common output data structure 94

4.1.7 Example: Use base image 95 of the container class Mat

4.2 95 common data structures and functions

4.2.1 point represents: Point class 96

4.2.2 Color representation: Scalar Class 96

4.2.3 sizes represented: Size class 96

4.2.4 rectangle represents: Rect class 97

4.2.5 Color space conversion: cvtColor () function 98

4.2.6 Other common knowledge 100

4.3 Basic graphics rendering 100

Writing 4.3.1 DrawEllipse () function 101

Writing 4.3.2 DrawFilledCircle () function 102

Writing 4.3.3 DrawPolygon () function 102

Writing 4.3.4 DrawLine () function 103

4.3.5 main function is written 104

4.4 Summary 106

Chapter 5 core assembly 107 Advanced

5.1 access 108 pixels in the image

5.1.1 in the image storage memory 108

5.1.2 color space reduction 108

Function 5.1.3 LUT: Look up table operation 109

5.1.4 Timing function 110

5.1.5 three access methods 110 pixels in the image

5.1.6 Example program 114

5.2 ROI area image 114 superimposed image mixing &

5.2.1 area of ​​interest: ROI 115

5.2.2 Linear mixing operation 116

And calculating a weighted arrays 5.2.3: addWeighted () function 117

Comprehensive Example 5.2.4: mixing primary image 120

5.3 separate color channels, multi-channel image blending 125

5.3.1 channel separation: split (function 125)

5.3.2 Channel Merge: merge () function 126

5.3.3 Example program: multi-channel image mixing 127

5.4 image contrast, brightness adjustment value 131

5.4.1 theoretical basis for 131

5.4.2 Access 131 pixel picture

5.4.3 Example program: an image contrast, brightness adjustment value 132

5.5 Discrete Fourier Transform 135

Principle 135 5.5.1 Discrete Fourier Transform

5.5.2 dft () function Detailed 136

5.5.3 Optimal return DFT Size: getOptimalDFTSize () function 137

5.5.4 Expansion image boundaries: copyMakeBorder () function 137

5.5.5 Calculation of the two-dimensional vector magnitude: magnitude () function 138

5.5.6 natural logarithm: log () function 138

5.5.7 Matrix normalization: normalize () function 138

5.5.8 Example program: a discrete Fourier transform 139

5.6 input and output XML and YAML file 144

5.6.1 XML and YAML file Introduction 144

5.6.2 FileStorage class using the operation guide file 144

5.6.3 Sample program: Writing YAML and XML files 147

5.6.4 Sample program: reading 148 XML and YAML files

5.7 Summary 150

The third part of the master imgproc assembly 151

Chapter 6. Image Processing 153

6.1 Linear Filtering: block filtering, mean filtering, Gaussian filtering 154

6.1.1 smoothing processing 154

Image filtering with filter 154 6.1.2

6.1.3 Introduction of linear filter 155

6.1.4 filter and fuzzy 155

6.1.5 neighborhood Operators linear filter 155 Neighborhood

6.1.6 filter block (box Filter) 156

6.1.7 mean filter 157

6.1.8 Gaussian Filter 159

6.1.9 Analysis of linear filtering source 160 OpenCV related

6.1.10 OpenCV source code analysis function 164 in GaussianBlur

6.1.11 linear filtering core API function 165

6.1.12 Example for image linear filtering 170

6.2 nonlinear filtering: median filter, a bilateral filter 175

6.2.1 Overview nonlinear filter 175

6.2.2 median filtering 175

6.2.3 bilateral filtering 177

6.2.4 nonlinear filtering functions related to the core API 178

6.2.5 OpenCV five kinds of image filtering in the comprehensive example 181

6.3 morphological filtering (1): 187 Corrosion expansion

Overview 187 6.3.1 Morphology

188 6.3.2 expansion

189 6.3.3 Corrosion

6.3.4 OpenCV source code analysis related to traceability 190

6.3.5 related core API functions to explain 191

6.3.6 Comprehensive Example: Corrosion and expansion of 195

6.4 morphological filtering (2): opening, closing operation, morphological gradient, top hat, black hat 198

6.4.1 opening operation 199

6.4.2 closing operation 200

6.4.3 Morphological Gradient 200

6.4.4 overcap 201

202 6.4.5 Black Hat

6.4.6 Analysis of morphological filtering traceable source 203 OpenCV

6.4.7 Core API functions: morphologyEx () 205

Example 6.4.8 using various morphological operations list 206

Comprehensive Example 6.4.9: morphological filter 208

Diffuse water filled 214 6.5

6.5.1 defined diffuse water filled 214

The basic idea of ​​the method 6.5.2 diffuse water filled 214

6.5.3 achieve diffuse water filling algorithm: floodFill function 214

Comprehensive Example 6.5.4: diffuse water filled 216

6.6 image pyramid with image size scaling 223

6.6.1 Introduction 223

6.6.2 on image pyramid 223

6.6.3 Gaussian pyramid 225

6.6.4 Laplacian pyramid 226

6.6.5 resizing: resize () function 227

6.6.6 API functions related to the image pyramid 230

6.6.7 Comprehensive Example: Pyramid image scaling and image size 234

6.7 thresholding 237

6.7.1 Operation fixed threshold: Threshold () function 238

6.7.2 Adaptive thresholding operation: adaptiveThreshold () function 239

6.7.3 Example program: Basic threshold operation 240

6.8 Summary 244

Chapter 7 image transform 247

7.1 248 based on edge detection OpenCV

7.1.1 General Procedure edge detection 248

7.1.2 canny operator 248

7.1.3 sobel operator 253

7.1.4 Laplacian operator 256

7.1.5 scharr filter 259

Comprehensive Example 7.1.6: edge detection 262

7.2 Hough transform 267

Hough transform 267 7.2.1 Overview

7.2.2 OpenCV the Hough Transform line 268

Principle 7.2.3 Hough Transform line 268

7.2.4 Standard Hough transform: HoughLines () function 270

7.2.5 cumulative probability Hough transform: HoughLinesP () function 272

7.2.6 Hough transform circle 274

Principle 7.2.7 Hough Gradient Method 275

7.2.8 disadvantage Hough 276 Gradient Method

7.2.9 circular Hough transform: HoughCircles () function 276

7.2.10 Comprehensive Example: Hough transform 278

7.3 remapping 281

7.3.1 The concept remapping of 281

7.3.2 implemented remapping: remap () function 282

Example 7.3.3 based program: Basic remap 283

7.3.4 Comprehensive sample program: to achieve a variety remapping 285

7.4 affine transformation 289

7.4.1 understanding affine transformations 289

7.4.2 The method of seeking the affine transformation 290

7.4.3 affine transformation: warpAffine () function 291

7.4.4 2D rotation transformation matrix calculation: getRotationMatrix2D () function 292

7.4.5 Example program: an affine transformation 292

7.5 histogram equalization 295

7.5.1 histogram equalization concept and features 296

7.5.2 implement histogram equalization: equalizeHist () function 297

7.5.3 examples: Histogram equalization 298

7.6 Summary 300

Chapter 8 profile image restoration and image segmentation 303

Find and draw the outline 304 8.1

8.1.1 Looking outline: findContours () function 304

8.1.2 contouring: drawContours () function 305

8.1.3 basic sample program: Profile Find 306

8.1.4 Comprehensive sample program: Find and contouring 308

8.2 Find the object convex hull 312

8.2.1 convex hull 312

Looking convex hull 8.2.2: convexHull () function 313

Example 8.2.3 based program: detecting base convex hull 313

8.2.4 Comprehensive examples: finding and drawing the object convex hull 315

8.3 polygonal contour 318 encloses

8.3.1 Returning External rectangular boundary: boundingRect () function 318

8.3.2 find the smallest enclosing rectangle: minAreaRect () function 318

8.3.3 Find smallest enclosing circle: minEnclosingCircle () function 318

8.3.4 ellipse fitting using a two-dimensional set of points: fitEllipse () function 319

8.3.5 polygonal approximation curve: approxPolyDP () function 319

8.3.6 basic sample program: Create a rectangle surrounding the boundary contour 319

8.3.7 basic sample program: Create a profile surrounded by a circular boundary 321

8.3.8 Comprehensive Example: Use the polygonal contour surrounded by 324

Moment image 327 8.4

8.4.1 Calculation of moments: moments () function 328

8.4.2 Calculation of outline area: contourArea () function 328

8.4.3 Calculation contour length: arcLength () function 328

8.4.4 Comprehensive sample program: to find and draw the outline of the image moments 329

8.5 watershed algorithm 333

8.5.1 implement watershed algorithm: watershed () function 334

8.5.2 Comprehensive sample program: watershed algorithm 334

8.6 338 repair image

8.6.1 achieve image patch: inpaint () function 340

8.6.2 Comprehensive sample program: Patch 341 images

8.7 Summary 343

Chapter 9 histogram matching 345

Histogram 9.1 Overview 346

9.2 Calculation and draw a histogram 347

9.2.1 histogram is calculated: calcHist () function 347

9.2.2 find the most value: minMaxLoc () function 348

9.2.3 Program Example: plotted histograms H-S 348

9.2.4 Example program: rendering image and calculates a one-dimensional histogram 350

9.2.5 examples: three-color RGB histogram drawing 352

9.3 Comparison histogram 355

9.3.1 Compare the histogram: compareHist () function 355

9.3.2 examples: Histogram comparison 356

9.4 360 backprojection

9.4.1 Introduction 360

9.4.2 works backward projection of 360

9.4.3 effect backprojected 361

9.4.4 Results backprojected 361

9.4.5 Calculation back projection: calcBackProject () function 361

9.4.6 Channel Copy: mixChannels () function 362

9.4.7 Comprehensive program: back projection 363

9.5 template matching 367

9.5.1 template matching of concepts and principles 367

9.5.2 implement template matching: matchTemplate () function 367

9.5.3 Comprehensive Example: template match 369

9.6 Summary 373

The fourth component further feature2d 375

Chapter 10 377 Corner Detection

10.1 Harris corner detection 378

10.1.1 corner points of interest and 378

10.1.2 corner detection 378

10.1.3 Harris corner detection 379

10.1.4 achieve Harris corner detection: cornerHarris () function 379

Comprehensive Example 10.1.5: Harris corner detection and rendering 381

10.2 Shi-Tomasi angle point 检测 384

10.2.1 Shi-Tomasi corner detection overview 384

Determining an image intensity corner 10.2.2: goodFeaturesToTrack () function 384

Comprehensive Example 10.2.3: Shi-Tomasi corner detection 385

10.3 subpixel corner detection 388

Overview 388 10.3.1 Background

Looking subpixel corner 10.3.2: cornerSubPix () function 389

Comprehensive Example 10.3.3: corner detection sub-pixel 389

10.4 Summary 392

Chapter 11 matching feature detection 395

11.1 SURF feature point detector 396

Overview 396 11.1.1 SURF algorithm

11.1.2 SURF algorithm principle 396

11.1.3 SURF classes relevant OpenCV source code analysis 400

11.1.4 Drawing Key: drawKeypoints () function 401

11.1.5 KeyPoint class 402

11.1.6 Example program: SURF feature point detector 402

11.2 SURF feature extraction 405

11.2.1 draw matching point: drawMatches () function 405

11.2.2 BruteForceMatcher class source code analysis 407

11.2.3 Example program: SURF feature extraction 408

11.3 FLANN using feature point matching 410

Simple analysis of class 410 11.3.1 FlannBasedMatcher

11.3.2 find the best match: DescriptorMatcher :: match method 411

Example 11.3.3: Use FLANN matching feature points 411

11.3.4 Comprehensive sample program: FLANN carried out in conjunction with SURF key points description and matching 413

11.3.5 Comprehensive sample program: SIFT be matched with the violence and described the key points extracted 417

11.4 for known objects 420

11.4.1 Looking perspective transformation: findHomography () function 421

11.4.2 see-matrix transformation: perspectiveTransform () function 421

11.4.3 Example program: an object 422 for known

Feature extraction 425 11.5 ORB

Overview 425 11.5.1 ORB algorithm

11.5.2 cognitive concepts 425

11.5.3 ORB source code or related simple analysis 426

11.5.4 Example program: ORB algorithmic descriptions and match 426

11.6 Summary 430

Appendix 433

The sample program package 433 A1 list

A2 book comes with an additional program overview 436

A3 list of 439 books Kernel

A4 Mat class function list 442

A4.1 constructor: Mat :: Mat 442

A4.2 destructor Mat :: ~ Mat 444

A4.3 Mat class member function 444

Main references 447

Guess you like

Origin www.cnblogs.com/pfm-cnblogs1/p/11826367.html