ClemensKim - kyj909

다시 관심이 생겨서 찾아 보는중 - openCV with python3 본문

카테고리 없음

다시 관심이 생겨서 찾아 보는중 - openCV with python3

kyj909 2022. 8. 23. 23:35

요근래 다시 관심이 생긴 컴퓨터 비전.... openCV, python3

음....일단 생각이 안난다. 할때는 아~ 하지만 한동안 잊고 있다. 다시 보면..

모지? 이런게 있었나? 내머리속에 지우개....와....하나도 기억이안나............

 

2년전에 했던건데...기억이 하나도 안남.

라즈베리에다 우분트 올리고 거기다 구글코랄 붙인거로 테스트 한것들이긴한데......

찍어논 영상은있는데....어떻게 했는지 하나도 기억이...ㅎㅎㅎ

뭐 그렇다 치고. 다시하면되지모.

 

악!! 2년전 내가 저랬어...ㅠ,.ㅠ

 

 

추가로...이게 참 좋다는 소문이 있어..그래서 난 노인이라. 종이가 좋더라...

바로 보고싶어서..바로 출력해서 봄.

 

난 영어 못함. 어떻게 보냐고? 대충 코드로 보고 더 궁금하면 그냥 구글 번역기 돌려서 봐..ㅠ,.ㅠ

나도 영어 잘했으면 좋겠다. 

 

 

Learning OpenCV 4 Computer Vision with Python 3 - Third Edition

 

Preface 1
Chapter 1: Setting Up OpenCV 7
Technical requirements 8
What's new in OpenCV 4 9
Choosing and using the right setup tools 9
Installation on Windows 10
Using a ready-made OpenCV package 11
Building OpenCV from source 11
Installation on macOS 15
Using Homebrew with ready-made packages 15
Using Homebrew with your own custom packages 17
Installation on Debian, Ubuntu, Linux Mint, and similar systems 17
Using a ready-made OpenCV package 18
Building OpenCV from source 19
Installation on other Unix-like systems 21
Running samples 22
Finding documentation, help, and updates 23
Summary 24
Chapter 2: Handling Files, Cameras, and GUIs 25
Technical requirements 26
Basic I/O scripts 26
Reading/writing an image file 26
Converting between an image and raw bytes 29
Accessing image data with numpy.array 32
Reading/writing a video file 34
Capturing camera frames 36
Displaying an image in a window 38
Displaying camera frames in a window 39
Project Cameo (face tracking and image manipulation) 41
Cameo – an object-oriented design 42
Abstracting a video stream with managers.CaptureManager 42
Abstracting a window and keyboard with managers.WindowManager 48
Applying everything with cameo.Cameo 49
Summary 52
Chapter 3: Processing Images with OpenCV 53
Technical requirements 53
Converting images between different color models 54
Light is not paint 55
Table of Contents
[ ii ]
Exploring the Fourier transform 55
HPFs and LPFs 56
Creating modules 60
Edge detection 60
Custom kernels – getting convoluted 62
Modifying the application 64
Edge detection with Canny 66
Contour detection 68
Bounding box, minimum area rectangle, and minimum enclosing circle 69
Convex contours and the Douglas-Peucker algorithm 73
Detecting lines, circles, and other shapes 75
Detecting lines 76
Detecting circles 77
Detecting other shapes 78
Summary 79
Chapter 4: Depth Estimation and Segmentation 80
Technical requirements 81
Creating modules 81
Capturing frames from a depth camera 82
Converting 10-bit images to 8-bit 84
Creating a mask from a disparity map 87
Modifying the application 88
Depth estimation with a normal camera 91
Foreground detection with the GrabCut algorithm 98
Image segmentation with the Watershed algorithm 102
Summary 105
Chapter 5: Detecting and Recognizing Faces 106
Technical requirements 107
Conceptualizing Haar cascades 107
Getting Haar cascade data 108
Using OpenCV to perform face detection 109
Performing face detection on a still image 110
Performing face detection on a video 112
Performing face recognition 116
Generating the data for face recognition 116
Recognizing faces 118
Loading the training data for face recognition 119
Performing face recognition with Eigenfaces 121
Performing face recognition with Fisherfaces 123
Performing face recognition with LBPH 124
Discarding results based on the confidence score 124
Swapping faces in the infrared 125
Modifying the application's loop 126
Table of Contents
[ iii ]
Masking a copy operation 129
Summary 132
Chapter 6: Retrieving Images and Searching Using Image Descriptors 133
Technical requirements 134
Understanding types of feature detection and matching 134
Defining features 135
Detecting Harris corners 135
Detecting DoG features and extracting SIFT descriptors 138
Anatomy of a keypoint 141
Detecting Fast Hessian features and extracting SURF descriptors 141
Using ORB with FAST features and BRIEF descriptors 143
FAST 144
BRIEF 145
Brute-force matching 145
Matching a logo in two images 146
Filtering matches using K-Nearest Neighbors and the ratio test 149
Matching with FLANN 153
Performing homography with FLANN-based matches 158
A sample application – tattoo forensics 162
Saving image descriptors to file 162
Scanning for matches 164
Summary 167
Chapter 7: Building Custom Object Detectors 168
Technical requirements 169
Understanding HOG descriptors 169
Visualizing HOG 170
Using HOG to describe regions of an image 172
Understanding NMS 173
Understanding SVMs 174
Detecting people with HOG descriptors 175
Creating and training an object detector 178
Understanding BoW 179
Applying BoW to computer vision 180
k-means clustering 181
Detecting cars 181
Combining an SVM with a sliding window 190
Detecting a car in a scene 191
Saving and loading a trained SVM 199
Summary 200
Chapter 8: Tracking Objects 201
Technical requirements 202
Detecting moving objects with background subtraction 202
Table of Contents
[ iv ]
Implementing a basic background subtractor 204
Using a MOG background subtractor 207
Using a KNN background subtractor 212
Using GMG and other background subtractors 214
Tracking colorful objects using MeanShift and CamShift 217
Planning our MeanShift sample 218
Calculating and back-projecting color histograms 219
Understanding the parameters of cv2.calcHist 222
Understanding the parameters of cv2.calcBackProject 223
Implementing the MeanShift example 224
Using CamShift 227
Finding trends in motion using the Kalman filter 228
Understanding the predict and update phases 229
Tracking a mouse cursor 230
Tracking pedestrians 233
Planning the flow of the application 233
Comparing the object-oriented and functional paradigms 234
Implementing the Pedestrian class 236
Implementing the main function 238
Considering the next steps 242
Summary 243
Chapter 9: Camera Models and Augmented Reality 244
Technical requirements 245
Understanding 3D image tracking and augmented reality 245
Understanding camera and lens parameters 248
Understanding cv2.solvePnPRansac 253
Implementing the demo application 256
Importing modules 256
Performing grayscale conversion 257
Performing 2D-to-3D spatial conversions 258
Implementing the application class 260
Initializing the tracker 261
Implementing the main loop 269
Tracking the image in 3D 270
Initializing and applying the Kalman filter 274
Drawing the tracking results and masking the tracked object 278
Running and testing the application 281
Improving the 3D tracking algorithm 286
Summary 287
Chapter 10: Introduction to Neural Networks with OpenCV 288
Technical requirements 289
Understanding ANNs 290
Understanding neurons and perceptrons 292
Understanding the layers of a neural network 293
Table of Contents
[ v ]
Choosing the size of the input layer 294
Choosing the size of the output layer 294
Choosing the size of the hidden layer 294
Training a basic ANN in OpenCV 295
Training an ANN classifier in multiple epochs 298
Recognizing handwritten digits with an ANN 303
Understanding the MNIST database of handwritten digits 303
Choosing training parameters for the MNIST database 305
Implementing a module to train the ANN 305
Implementing a minimal test module 310
Implementing the main module 310
Trying to improve the ANN's training 316
Finding other potential applications 318
Using DNNs from other frameworks in OpenCV 319
Detecting and classifying objects with third-party DNNs 320
Detecting

 

 

Comments