Preface xiii
1 Introduction 1
1.1 A Difficult Problem 1
1.2 The Human Vision System 2
1.3 Practical Applications of Computer Vision 3
1.4 The Future of Computer Vision 5
1.5 Material in This Textbook 6
1.6 Going Further with Computer Vision 7
2 Images 9
2.1 Cameras 9
2.1.1 The Simple Pinhole Camera Model 9
2.2 Images 10
2.2.1 Sampling 11
2.2.2 Quantisation 11
2.3 Colour Images 13
2.3.1 Red-Green-Blue (RGB) Images 14
2.3.2 Cyan-Magenta-Yellow (CMY) Images 17
2.3.3 YUV Images 17
2.3.4 Hue Luminance Saturation (HLS) Images 18
2.3.5 Other Colour Spaces 20
2.3.6 Some Colour Applications 20
2.4 Noise 22
2.4.1 Types of Noise 23
2.4.2 Noise Models 25
2.4.3 Noise Generation 26
2.4.4 Noise Evaluation 26
2.5 Smoothing 27
2.5.1 Image Averaging 27
2.5.2 Local Averaging and Gaussian Smoothing 28
2.5.3 Rotating Mask 30
2.5.4 Median Filter 31
3 Histograms 35
3.1 1D Histograms 35
3.1.1 Histogram Smoothing 36
3.1.2 Colour Histograms 37
3.2 3D Histograms 39
3.3 Histogram/Image Equalisation 40
3.4 Histogram Comparison 41
3.5 Back-projection 43
3.6 k-means Clustering 44
4 Binary Vision 49
4.1 Thresholding 49
4.1.1 Thresholding Problems 50
4.2 Threshold Detection Methods 51
4.2.1 Bimodal Histogram Analysis 52
4.2.2 Optimal Thresholding 52
4.2.3 Otsu Thresholding 54
4.3 Variations on Thresholding 56
4.3.1 Adaptive Thresholding 56
4.3.2 Band Thresholding 57
4.3.3 Semi-thresholding 58
4.3.4 Multispectral Thresholding 58
4.4 Mathematical Morphology 59
4.4.1 Dilation 60
4.4.2 Erosion 62
4.4.3 Opening and Closing 63
4.4.4 Grey-scale and Colour Morphology 65
4.5 Connectivity 66
4.5.1 Connectedness: Paradoxes and Solutions 66
4.5.2 Connected Components Analysis 67
5 Geometric Transformations 71
5.1 Problem Specification and Algorithm 71
5.2 Affine Transformations 73
5.2.1 Known Affine Transformations 74
5.2.2 Unknown Affine Transformations 75
5.3 Perspective Transformations 76
5.4 Specification of More Complex Transformations 78
5.5 Interpolation 78
5.5.1 Nearest Neighbour Interpolation 79
5.5.2 Bilinear Interpolation 79
5.5.3 Bi-Cubic Interpolation 80
5.6 Modelling and Removing Distortion from Cameras 80
5.6.1 Camera Distortions 81
5.6.2 Camera Calibration and Removing Distortion 82
6 Edges 83
6.1 Edge Detection 83
6.1.1 First Derivative Edge Detectors 85
6.1.2 Second Derivative Edge Detectors 92
6.1.3 Multispectral Edge Detection 97
6.1.4 Image Sharpening 98
6.2 Contour Segmentation 99
6.2.1 Basic Representations of Edge Data 99
6.2.2 Border Detection 102
6.2.3 Extracting Line Segment Representations of Edge Contours 105
6.3 Hough Transform 108
6.3.1 Hough for Lines 109
6.3.2 Hough for Circles 111
6.3.3 Generalised Hough 112
7 Features 115
7.1 Moravec Corner Detection 117
7.2 Harris Corner Detection 118
7.3 FAST Corner Detection 121
7.4 SIFT 122
7.4.1 Scale Space Extrema Detection 123
7.4.2 Accurate Keypoint Location 124
7.4.3 Keypoint Orientation Assignment 126
7.4.4 Keypoint Descriptor 127
7.4.5 Matching Keypoints 127
7.4.6 Recognition 127
7.5 Other Detectors 129
7.5.1 Minimum Eigenvalues 130
7.5.2 SURF 130
8 Recognition 131
8.1 Template Matching 131
8.1.1 Applications 131
8.1.2 Template Matching Algorithm 133
8.1.3 Matching Metrics 134
8.1.4 Finding Local Maxima or Minima 135
8.1.5 Control Strategies for Matching 137
8.2 Chamfer Matching 137
8.2.1 Chamfering Algorithm 137
8.2.2 Chamfer Matching Algorithm 139
8.3 Statistical Pattern Recognition 140
8.3.1 Probability Review 142
8.3.2 Sample Features 143
8.3.3 Statistical Pattern Recognition Technique 149
8.4 Cascade of Haar Classifiers 152
8.4.1 Features 154
8.4.2 Training 156
8.4.3 Classifiers 156
8.4.4 Recognition 158
8.5 Other Recognition Techniques 158
8.5.1 Support Vector Machines (SVM) 158
8.5.2 Histogram of Oriented Gradients (HoG) 159
8.6 Performance 160
8.6.1 Image and Video Datasets 160
8.6.2 Ground Truth 161
8.6.3 Metrics for Assessing Classification Performance 162
8.6.4 Improving Computation Time 165
9 Video 167
9.1 Moving Object Detection 167
9.1.1 Object of Interest 168
9.1.2 Common Problems 168
9.1.3 Difference Images 169
9.1.4 Background Models 171
9.1.5 Shadow Detection 179
9.2 Tracking 180
9.2.1 Exhaustive Search 181
9.2.2 Mean Shift 181
9.2.3 Dense Optical Flow 182
9.2.4 Feature Based Optical Flow 185
9.3 Performance 186
9.3.1 Video Datasets (and Formats) 186
9.3.2 Metrics for Assessing Video Tracking Performance 187
10 Vision Problems 189
10.1 Baby Food 189
10.2 Labels on Glue 190
10.3 O-rings 191
10.4 Staying in Lane 192
10.5 Reading Notices 193
10.6 Mailboxes 194
10.7 Abandoned and Removed Object Detection 195
10.8 Surveillance 196
10.9 Traffic Lights 197
10.10 Real Time Face Tracking 198
10.11 Playing Pool 199
10.12 Open Windows 200
10.13 Modelling Doors 201
10.14 Determining the Time from Analogue Clocks 202
10.15 Which Page 203
10.16 Nut/Bolt/Washer Classification 204
10.17 Road Sign Recognition 205
10.18 License Plates 206
10.19 Counting Bicycles 207
10.20 Recognise Paintings 208
References 209
Index 213