Machine Vision - GBV

coatiarfΤεχνίτη Νοημοσύνη και Ρομποτική

17 Οκτ 2013 (πριν από 3 χρόνια και 9 μήνες)

73 εμφανίσεις

Machine Vision
THEORY, ALGORI THMS, PRACTI CALI TI ES
3RD EDITION
E. R. DAVIES
Department of Physics
Royal Holloway
University of London
AMSTERDAM . BOSTON . HEIDELBERG . LONDON
NEW YORK . OXFORD . PARIS . SAN DIEGO
SAN FRANCISCO . SINGAPORE . SYDNEY . TOKYO
Morgan Kaufmann Publishers is an imprint of Elsevier
V
/'•
Contents
Foreword xxiii
Preface xxv
Acknowledgment s xxix
CHAPTER 1
Vision, the Challenge
1.1 Introduction—The Senses 1
1.2 The Nature of Vision 2
1.2.1 The Process of Recognition 2
1.2.2 Tackling the Recognition Problem 4
1.2.3 Object Location 7
1.2.4 Scene Analysis 9
1.2.5 Vision as Inverse Graphics 10
1.3 From Automated Visual Inspection to Surveillance 11
1.4 What This Book Is About 12
1.5 The Following Chapters 14
1.6 Bibliographical Notes 15
PART 1
L OW- L E V E L V I S I O N 17
CHAPTER 2
Images and Imaging Operations
2.1 Introduction 19
2.1.1 Gray-scale versus Color 21
2.2 Image Processing Operations 24
2.2.1 Some Basic Operations on Gray-scale Images 25
2.2.2 Basic Operations on Binary Images 32
2.2.3 Noise Suppression by Image Accumulation 37
2.3 Convolutions and Point Spread Functions 39
2.4 Sequential versus Parallel Operations 41
2.5 Concluding Remarks 43
2.6 Bibliographical and Historical Notes 44
2.7 Problems 44
ontents
CHAPTER 3
Basic Image Filtering Operations
3.1 Introduction 47
3.2 Noise Suppression by Gaussian Smoothing 49
3.3 Median Filters 51
3.4 Mode Filters 54
3.5 Rank Order Filters 61
3.6 Reducing Computational Load 61
3.6.1 A Bit-based Method for Fast Median Filtering 64
3.7 Sharp-Unshar p Masking 65
3.8 Shifts Introduced by Median Filters 66
3.8.1 Continuum Model of Median Shifts 68
3.8.2 Generalization to Gray-scale Images 72
3.8.3 Shifts Arising with Hybrid Median Filters 75
3.8.4 Problems with Statistics 76
3.9 Discrete Model of Median Shifts 78
3.9.1 Generalization to Gray-scale Images 82
3.10 Shifts Introduced by Mode Filters 84
3.11 Shifts Introduced by Mean and Gaussian Filters 86
3.12 Shifts Introduced by Rank Order Filters 86
3.12.1 Shifts in Rectangular Neighborhoods 87
3.12.2 Case of High Curvature 91
3.12.3 Test of the Model in a Discrete Case 91
3.13 The Role of Filters in Industrial Applications of Vision 94
3.14 Color in Image Filtering 94
3.15 Concluding Remarks 96
3.16 Bibliographical and Historical Notes 96
3.17 Problems 98
CHAPTER 4
Thresholding Techniques
4.1 Introduction 103
4.2 Region-growing Methods 104
4.3 Thresholding 105
4.3.1 Finding a Suitable Threshold 105
4.3.2 Tackling the Problem of Bias in Threshold Selection 107
4.3.3 A Convenient Mathematical Model 111
4.3.4 Summary 114
4.4 Adaptive Thresholding 114
4.4.1 The Chow and Kaneko Approach 118
4.4.2 Local Thresholding Methods 119
4.5 More Thoroughgoing Approaches to Threshold Selection 122
4.5.1 Variance-based Thresholding 122
4.5.2 Entropy-based Thresholding 123
4.5.3 Maximum Likelihood Thresholding 125
4.6 Concluding Remarks 126
4.7 Bibliographical and Historical Notes 127
4.8 Problems 129
CHAPTER 5
Edge Detection
5.1 Introduction 131
5.2 Basic Theory of Edge Detection 132
5.3 The Template Matching Approach 133
5.4 Theory of 3 x 3 Template Operators 135
5.5 Summary—Design Constraints and Conclusions 140
5.6 The Design of Differential Gradient Operators 141
5.7 The Concept of a Circular Operator 143
5.8 Detailed Implementation of Circular Operators 144
5.9 Structured Bands of Pixels in Neighborhoods of Various Sizes 146
5.10 The Systematic Design of Differential Edge Operators 150
5.11 Problems with the above Approach—Some Alternative Schemes 151
5.12 Concluding Remarks 155
5.13 Bibliographical and Historical Notes 156
5.14 Problems 157
CHAPTER 6
Binary Shape Analysis
6.1 Introduction 159
6.2 Connectedness in Binary Images 160
6.3 Object Labeling and Counting 161
6.3.1 Solving the Labeling Problem in a More Complex Case 164
6.4 Metric Properties in Digital Images 168
6.5 Size Filtering 169
6.6 The Convex Hull and Its Computation 171
6.7 Distance Functions and Their Uses 177
6.8 Skeletons and Thinning 181
6.8.1 Crossing Number 183
6.8.2 Parallel and Sequential Implementations of Thinning 186
6.8.3 Guided Thinning 189
6.8.4 A Comment on the Nature of the Skeleton 189
6.8.5 Skeleton Node Analysis 191
6.8.6 Application of Skeletons for Shape Recognition 192
6.9 Some Simple Measures for Shape Recognition 193
6.10 Shape Description by Moments 194
6.11 Boundary Tracking Procedures 195
6.12 More Detail on the Sigma and Chi Functions 196
6.13 Concluding Remarks 197
6.14 Bibliographical and Historical Notes 199
6.15 Problems 200
CHAPTER 7
Boundary Pattern Analysis
7.1 Introduction 207
7.1.1 Hysteresis Thresholding 209
7.2 Boundary Tracking Procedures 212
7.3 Template Matching—A Reminder 212
7.4 Centroidal Profiles 213
7.5 Problems with the Centroidal Profile Approach 214
7.5.1 Some Solutions 216
7.6 The (s, i/0 Plot 218
7.7 Tackling the Problems of Occlusion 220
7.8 Chain Code 223
7.9 The {r, s) Plot 224
7.10 Accuracy of Boundary Length Measures 225
7.11 Concluding Remarks 227
7.12 Bibliographical and Historical Notes 228
7.13 Problems 229
CHAPTER 8
Mathematical Morphology
8.1 Introduction 233
8.2 Dilation and Erosion in Binary Images 234
8.2.1 Dilation and Erosion 234
8.2.2 Cancellation Effects 234
8.2.3 Modified Dilation and Erosion Operators 235
8.3 Mathematical Morphology 235
8.3.1 Generalized Morphological Dilation 235
8.3.2 Generalized Morphological Erosion 237
8.3.3 Duality between Dilation and Erosion 238
8.3.4 Properties of Dilation and Erosion Operators 239
8.3.5 Closing and Opening 242
8.3.6 Summary of Basic Morphological Operations 245
8.3.7 Hit-and-Miss Transform 248
8.3.8 Template Matching 249
8.4 Connectivity-based Analysis of Images 249
8.4.1 Skeletons and Thinning 250
8.5 Gray-scale Processing 251
8.5.1 Morphological Edge Enhancement 252
8.5.2 Further Remarks on the Generalization to Gray-scale Processing 252
8.6 Effect of Noise on Morphological Grouping Operations 255
8.6.1 Detailed Analysis 257
8.6.2 Discussion 259
8.7 Concluding Remarks 259
8.8 Bibliographical and Historical Notes 260
8.9 Problem 261
PART 2
I N T E R ME D I A T E - L E V E L V I S I O N 26 3
CHAPTER 9
Line Detection
9.1 Introduction 265
9.2 Application of the Hough Transform to Line Detection 265
9.3 The Foot-of-Normal Method 269
9.3.1 Error Analysis 272
9.3.2 Quality of the Resulting Data 214
9.3.3 Application of the Foot-of-Normal Method 276
9.4 Longitudinal Line Localization 276
9.5 Final Line Fitting 277
9.6 Concluding Remarks 277
9.7 Bibliographical and Historical Notes 278
9.8 Problems 280
CHAPTER 1 0
Circle Detection
10.1 Introduction 283
10.2 Hough-based Schemes for Circular Object Detection 284
10.3 The Problem of Unknown Circle Radius 288
10.3.1 Experimental Results 290
10.4 The Problem of Accurate Center Location 295
10.4.1 Obtaining a Method for Reducing Computational Load 296
10.4.2 Improvements on the Basic Scheme 299
10.4.3 Discussion 300
10.4.4 Practical Details 300
10.5 Overcoming the Speed Problem 302
10.5.1 More Detailed Estimates of Speed 303
10.5.2 Robustness 305
10.5.3 Experimental Results 306
10.5.4 Summary 307
10.6 Concluding Remarks 310
10.7 Bibliographical and Historical Notes 311
10.8 Problems 312
CHAPTER 1 1
The Hough Transform and Its Nature
11.1 Introduction 315
11.2 The Generalized Hough Transform 315
11.3 Setting Up the Generalized Hough Transform—Some Relevant Questions
11.4 Spatial Matched Filtering in Images 318
11.5 From Spatial Matched Filters to Generalized Hough Transforms 319
11.6 Gradient Weighting versus Uniform Weighting 320
11.6.1 Calculation of Sensitivity and Computational Load 323
11.7 Summary 324
11.8 Applying the Generalized Hough Transform to Line Detection 325
11.9 The Effects of Occlusions for Objects with Straight Edges 327
11.10 Fast Implementations of the Hough Transform 329
11.11 The Approach of Gerig and Klein 332
11.12 Concluding Remarks 333
11.13 Bibliographical and Historical Notes 334
11.14 Problem 337
CHAPTER 1 2
Ellipse Detection
12.1 Introduction 339
12.2 The Diameter Bisection Method 339
12.3 The Chord-Tangent Method 341
12.4 Finding the Remaining Ellipse Parameters 343
12.5 Reducing Computational Load for the Generalized Hough
Transform Method 345
12.5.1 Practical Details 349
12.6 Comparing the Various Methods 353
12.7 Concluding Remarks 355
12.8 Bibliographical and Historical Notes 357
12.9 Problems 358
CHAPTER 1 3
Hole Detection
13.1 Introduction 361
13.2 The Template Matching Approach 361
13.3 The Lateral Histogram Technique 363
13.4 The Removal of Ambiguities in the Lateral Histogram Technique 363
13.4.1 Computational Implications of the Need to Check for Ambiguities 36
13.4.2 Further Detail of the Subimage Method 366
13.5 Application of the Lateral Histogram Technique for Object Location 368
13.5.1 Limitations of the Approach 370
13.6 Appraisal of the Hole Detection Problem 372
13.7 Concluding Remarks 374
13.8 Bibliographical and Historical Notes 375
13.9 Problems 376
CHAPTER 14
Polygon and Corner Detection
14.1 Introduction 379
14.2 The Generalized Hough Transform 380
14.2.1 Straight Edge Detection 380
14.3 Application to Polygon Detection 381
14.3.1 The Case of an Arbitrary Triangle 382
14.3.2 The Case of an Arbitrary Rectangle 383
14.3.3 Lower Bounds on the Numbers of Parameter Planes 385
14.4 Determining Polygon Orientation 387
14.5 Why Corner Detection? 389
14.6 Template Matching 390
14.7 Second-order Derivative Schemes 391
14.8 A Median-Filter-Based Corner Detector 393
14.8.1 Analyzing the Operation of the Median Detector 394
14.8.2 Practical Results 396
14.9 The Hough Transform Approach to Corner Detection 399
14.10 The Plessey Corner Detector 402
14.11 Corner Orientation 404
14.12 Concluding Remarks 406
14.13 Bibliographical and Historical Notes 407
14.14 Problems 410
CHAPTER 1 5
Abstract Pattern Matching Techniques
15.1 Introduction 413
15.2 A Graph-theoreti c Approach to Object Location 414
15.2.1 A Practical Example—Locating Cream Biscuits 419
15.3 Possibilities for Saving Computation 422
15.4 Using the Generalized Hough Transform for Feature Collation 424
15.4.1 Computational Load 426
15.5 Generalizing the Maximal Clique and Other Approaches 427
15.6 Relational Descriptors 428
15.7 Search 432
15.8 Concluding Remarks 433
15.9 Bibliographical and Historical Notes 434
15.10 Problems 437
PART 3
3-D VI SI ON AND MOTI ON 443
CHAPTER 1 6
The Three-dimensional Worl d
16.1 Introduction 445
16.2 Three-Dimensional Vision—The Variety of Methods 446
16.3 Projection Schemes for Three-dimensional Vision 448
16.3.1 Binocular Images 450
16.3.2 The Correspondence Problem 452
16.4 Shape from Shading 454
16.5 Photometric Stereo 459
16.6 The Assumption of Surface Smoothness 462
16.7 Shape from Texture 464
16.8 Use of Structured Lighting 464
16.9 Three-Dimensional Object Recognition Schemes 466
16.10 The Method of Ballard and Sabbah 468
16.11 The Method of Silberberg et al. 470
16.12 Horaud's Junction Orientation Technique 472
16.13 An Important Paradigm—Location of Industrial Parts 476
16.14 Concluding Remarks 478
16.15 Bibliographical and Historical Notes 480
16.16 Problems 482
CHAPTER 1 7
Tackling the Perspective n-Point Problem
17.1 Introduction 487
17.2 The Phenomenon of Perspective Inversion 487
17.3 Ambiguity of Pose under Weak Perspective Projection 489
17.4 Obtaining Unique Solutions to the Pose Problem 493
17.4.1 Solution of the i-Point Problem 497
17.4.2 Using Symmetrical Trapezia for Estimating Pose 498
17.5 Concluding Remarks 498
17.6 Bibliographical and Historical Notes 501
17.7 Problems 502
CHAPTER 1 8
Motion
18.1 Introduction 505
18.2 Optical Flow 505
18.3 Interpretation of Optical Flow Fields 509
18.4 Using Focus of Expansion to Avoid Collision 511
18.5 Time-to-Adjacency Analysis 513
18.6 Basic Difficulties with the Optical Flow Model 515
18.7 Stereo from Motion 516
18.8 Applications to the Monitoring of Traffic Flow 518
18.8.1 The System of Bascle et al. 518
18.8.2 The System of Roller et al. 520
18.9 People Tracking 524
18.9.1 Some Basic Techniques 526
18.9.2 Within-vehicle Pedestrian Tracking 528
18.10 Human Gait Analysis 530
18.11 Model-based Tracking of Animals—A Case Study 533
18.12 Snakes 536
18.13 The Kalman Filter 538
18.14 Concluding Remarks 540
18.15 Bibliographical and Historical Notes 542
18.16 Problem 543
CHAPTER 1 9
Invariants and Their Applications
19.1 Introduction 545
19.2 Cross Ratios: The "Ratio of Ratios" Concept 547
19.3 Invariants for Noncollinear Points 552
19.3.1 Further Remarks about the 5-Point Configuration 554
19.4 Invariants for Points on Conies 556
19.5 Differential and Semidifferential Invariants 560
19.6 Symmetrical Cross Ratio Functions 562
19.7 Concluding Remarks 564
19.8 Bibliographical and Historical Notes 566
19.9 Problems 567
CHAPTER 2 0
Egomotion and Related Tasks
20.1 Introduction 571
20.2 Autonomous Mobile Robots 572
20.3 Active Vision 573
20.4 Vanishing Point Detection 574
20.5 Navigation for Autonomous Mobile Robots 576
20.6 Constructing the Plan View of Ground Plane 579
20.7 Further Factors Involved in Mobile Robot Navigation 581
20.8 More on Vanishing Points 583
20.9 Centers of Circles and Ellipses 585
20.10 Vehicle Guidance in Agriculture—A Case Study 588
20.10.1 3-D Aspects of the Task 590
20.10.2 Real-time Implementation 591
20.11 Concluding Remarks 592
20.12 Bibliographical and Historical Notes 592
20.13 Problems 593
CHAPTER 2 1
Image Transformations and Camera Calibration
21.1 Introduction 595
21.2 Image Transformations 596
21.3 Camera Calibration 601
21.4 Intrinsic and Extrinsic Parameters 604
21.5 Correcting for Radial Distortions 607
21.6 Multiple-view Vision 609
21.7 Generalized Epipolar Geometry 610
21.8 The Essential Matrix 611
21.9 The Fundamental Matrix 613
21.10 Properties of the Essential and Fundamental Matrices 614
21.11 Estimating the Fundamental Matrix 615
21.12 Image Rectification 616
21.13 3-D Reconstruction 617
21.14 An Update on the 8-Point Algorithm 619
21.15 Concluding Remarks 621
21.16 Bibliographical and Historical Notes 622
21.17 Problems 623
PART 4
T O WA R D RE AL - T I M E PAT T ER N R E C OGN I T I O N SYST EM S
CHAPTER 22
Automated Visual Inspection
22.1 Introduction 627
22.2 The Process of Inspection 628
22.3 Review of the Types of Objects to Be Inspected 629
22.3.1 Food Products 629
22.3.2 Precision Components 630
22.3.3 Differing Requirements for Size Measurement 630
22.3.4 Three-dimensional Objects 631
22.3.5 Other Products and Materials for Inspection 632
22.4 Summary—The Main Categories of Inspection 632
22.5 Shape Deviations Relative to a Standard Template 634
22.6 Inspection of Circular Products 635
22.6.1 Computation of the Radial Histogram: Statistical Problems 636
22.6.2 Application of Radial Histograms 641
22.7 Inspection of Printed Circuits 642
22.8 Steel Strip and Wood Inspection 643
22.9 Inspection of Products with High Levels of Variability 644
22.10 X-ray Inspection 648
22.11 The Importance of Color in Inspection 651
22.12 Bringing Inspection to the Factory 653
22.13 Concluding Remarks 654
22.14 Bibliographical and Historical Notes 656
CHAPTER 23
Inspection of Cereal Grains
23.1 Introduction 659
23.2 Case Study 1: Location of Dark Contaminant s in Cereals 660
23.2.1 Application of Morphological and Nonlinear Filters to
Locate Rodent Droppings 663
23.2.2 Appraisal of the Various Schemas 664
23.2.3 Problems with Closing 665
23.3 Case Study 2: Location of Insects 665
23.3.1 The Vectorial Strategy for Linear Feature Detection 666
23.3.2 Designing Linear Feature Detection Masks for Larger
Windows 669
23.3.3 Application to Cereal Inspection 670
23.3.4 Experimental Results 671
23.4 Case Study 3: High-speed Grain Location 673
23.4.1 Extending an Earlier Sampling Approach 673
23.4.2 Application to Grain Inspection 675
23.4.3 Summary 679
23.5 Optimizing the Output for Sets of Directional
Template Masks 680
23.5.1 Application of the Formulas 682
23.5.2 Discussion 683
23.6 Concluding Remarks 683
23.7 Bibliographical and Historical Notes 684
CHAPTER 2 4
Statistical Pattern Recognition
24.1 Introduction 687
24.2 The Nearest Neighbor Algorithm 688
24.3 Bayes' Decision Theory 691
24.4 Relation of the Nearest Neighbor and Bayes' Approaches 693
24.4.1 Mathematical Statement of the Problem 693
24.4.2 The Importance of the Nearest Neighbor Classifier 696
24.5 The Optimum Number of Features 696
24.6 Cost Functions and Error-Reject Tradeoff 697
24.7 The Receiver-Operator Characteristic 699
24.8 Multiple Classifiers 702
24.9 Cluster Analysis 705
24.9.1 Supervised and Unsupervised Learning 705
24.9.2 Clustering Procedures 706
24.10 Principal Components Analysis 710
24.11 The Relevance of Probability in Image Analysis 713
24.12 The Route to Face Recognition 715
24.12.1 The Face as Part of a 3-D Object 716
24.13 Another Look at Statistical Pattern Recognition: The Support
Vector Machine 719
24.14 Concluding Remarks 720
24.15 Bibliographical and Historical Notes 722
24.16 Problems 723
CHAPTER 25
Biologically Inspired Recognition Schemes
25.1 Introduction 725
25.2 Artificial Neural Networks 726
25.3 The Backpropagation Algorithm 731
25.4 MLP Architectures 735
25.5 Overfitting to the Training Data 736
25.6 Optimizing the Network Architecture 739
25.7 Hebbian Learning 740
25.8 Case Study: Noise Suppression Using ANNs 745
25.9 Genetic Algorithms 750
25.10 Concluding Remarks 752
25.11 Bibliographical and Historical Notes 753
CHAPTER 2 6
Texture
26.1 Introduction 757
26.2 Some Basic Approaches to Texture Analysis 763
26.3 Gray-level Co-occurrence Matrices 764
26.4 Laws' Texture Energy Approach 768
26.5 Ade's Eigenfilter Approach 771
26.6 Appraisal of the Laws and Ade Approaches 772
26.7 Fractal-based Measures of Texture 774
26.8 Shape from Texture 775
26.9 Markov Random Field Models of Texture 776
26.10 Structural Approaches to Texture Analysis 777
26.11 Concluding Remarks 777
26.12 Bibliographical and Historical Notes 778
CHAPTER 27
Image Acquisition
27.1 Introduction 781
27.2 Illumination Schemes 782
27.2.1 Eliminating Shadows 784
27.2.2 Principles for Producing Regions of Uniform Illumination 787
27.2.3 Case of Two Infinite Parallel Strip Lights 790
27.2.4 Overview of the Uniform Illumination Scenario 793
27.2.5 Use of Line-scan Cameras 794
27.3 Cameras and Digitization 796
27.3.1 Digitization 798
27.4 The Sampling Theorem 798
27.5 Concluding Remarks 802
27.6 Bibliographical and Historical Notes 803
CHAPTER 2 8
Real-time Hardware and Systems Design Considerations
28.1 Introduction 805
28.2 Parallel Processing 806
28.3 SIMD Systems 807
28.4 The Gain in Speed Attainable with N Processors 809
28.5 Flynn's Classification 810
28.6 Optimal Implementation of an Image Analysis Algorithm 813
28.6.1 Hardware Specification and Design 813
28.6.2 Basic Ideas on Optimal Hardware Implementation 814
28.7 Some Useful Real-time Hardware Options 816
28.8 Systems Design Considerations 818
28.9 Design of Inspection Systems—The Status Quo 818
28.10 System Optimization 822
28.11 The Value of Case Studies 824
28.12 Concluding Remarks 825
28.13 Bibliographical and Historical Notes 827
28.13.1 General Background 827
28.13.2 Recent Highly Relevant Work 829
PART 5
P E RS P E CT I V E S O N V I S I O N 83 1
CHAPTER 29
Machine Vision: Art or Science?
•29.1 Introduction 833
29.2 Parameters of Importance in Machine Vision 834
29.3 Tradeoffs 836
29.3.1 Some Important Tradeoffs 837
29.3.2 Tradeoffs for Two-stage Template Matching 838
29.4 Future Directions 839
29.5 Hardware, Algorithms, and Processes 840
29.6 A Retrospective View 841
29.7 Just a Glimpse of Vision? 842
29.8 Bibliographical and Historical Notes 843
APPENDI X
Robust Statistics
A. 1 Introduction 845
A.2 Preliminary Definitions and Analysis 848
A.3 The M-estimator (Influence Function) Approach 850
A.4 The Least Median of Squares Approach to Regression 856
A. 5 Overview of the Robustness Problem 860
A.6 The RANSAC Approach 861
A.7 Concluding Remarks 863
A.8 Bibliographical and Historical Notes 864
A.9 Problem 865
List of Acronyms and Abbreviations 867
References 869
Author Index 917
Subject Index 925