Feature Extraction & Image Processing for Computer Vision Third edition Mark S. Nixon Alberto S. Aguado 1 Ж 1 v ). лГжЖ №"ЧУИМ? ELSEVIER AMSTERDAM • BOSTON • HEIDELBERG • LONDON NEW Y0RK * 0 X F 0 R D ' PARIS • SAN DIEGO SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Academic Press is an imprint of Elsevier Contents Preface About the authors xi xvii • CHAPTER 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 CHAPTER 2 2.1 2.2 2.3 2.4 2.5 2.6 Introduction Overview Human and computer vision The human vision system 1.3.1 The eye 1.3.2 The neural system 1.3.3 Processing Computer vision systems 1.4.1 Cameras 1.4.2 Computer interfaces 1.4.3 Processing an image Mathematical systems 1.5.1 Mathematical tools 1.5.2 Hello Matlab, hello images! 1.5.3 Hello Mathcad! Associated literature 1.6.1 Journals, magazines, and conferences 1.6.2 Textbooks 1.6.3 The Web Conclusions References 1 1 2 4 5 8 9 12 12 15 17 19 19 20 25 30 30 31 34 35 35 Images, Sampling, and Frequency Domain Processing Overview Image formation The Fourier transform The sampling criterion The discrete Fourier transform 2.5.1 ID transform 2.5.2 2D transform Other properties of the Fourier transform 2.6.1 Shift invariance 2.6.2 Rotation 2.6.3 Frequency scaling 2.6.4 Superposition (linearity) 37 37 38 42 49 53 53 57 63 63 65 66 67 vi Contents 2.7 Transforms other than Fourier 2.7.1 Discrete cosine transform 2.7.2 Discrete Hartley transform 2.7.3 Introductory wavelets 2.7.4 Other transforms 2.8 Applications using frequency domain properties 2.9 Further reading 2.10 References CHAPTER 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 CHAPTER 4 4.1 4.2 68 68 70 71 78 78 80 81 Basic Image Processing Operations Overview Histograms Point operators 3.3.1 Basic point operations 3.3.2 Histogram normalization 3.3.3 Histogram equalization 3.3.4 Thresholding Group operations 3.4.1 Template convolution 3.4.2 Averaging operator 3.4.3 On different template size 3.4.4 Gaussian averaging operator 3.4.5 More on averaging Other statistical operators 3.5.1 Median filter 3.5.2 Mode filter 3.5.3 Anisotropic diffusion 3.5.4 Force field transform 3.5.5 Comparison of statistical operators Mathematical morphology 3.6.1 Morphological operators 3.6.2 Gray-level morphology 3.6.3 Gray-level erosion and dilation 3.6.4 Minkowski operators Further reading References 83 83 84 86 86 89 90 93 98 98 101 103 104 107 109 109 112 114 121 122 123 124 127 128 130 134 134 Low-Level Feature Extraction (including edge detection) Overview Edge detection 4.2.1 First-order edge-detection operators 4.2.2 Second-order edge-detection operators 137 138 140 140 161 Contents 4.3 4.4 4.5 4.6 4.7 CHAPTER 5 4.2.3 Other edge-detection operators 4.2.4 Comparison of edge-detection operators 4.2.5 Further reading on edge detection Phase congruency Localized feature extraction 4.4.1 Detecting image curvature (corner extraction) 4.4.2 Modern approaches: region/patch analysis Describing image motion 4.5.1 Area-based approach 4.5.2 Differential approach 4.5.3 Further reading on optical flow Further reading References 170 171 173 173 180 180 193 199 200 204 211 212 212 High-Level Feature Extraction: Fixed Shape Matching 217 5.1 Overview 5.2 Thresholding and subtraction 5.3 Template matching 5.3.1 Definition 5.3.2 Fourier transform implementation 5.3.3 Discussion of template matching 5.4 Feature extraction by low-level features 5.4.1 Appearance-based approaches 5.4.2 Distribution-based descriptors 5.5 Hough transform 5.5.1 Overview 5.5.2 Lines 5.5.3 HT for circles 5.5.4 HT for ellipses 5.5.5 Parameter space decomposition 5.5.6 Generalized HT 5.5.7 Other extensions to the HT 5.6 Further reading 5.7 References СНАPTER6 6.1 6.2 218 220 222 222 230 234 235 235 238 243 243 243 250 255 258 271 287 288 289 High-Level Feature Extraction: Deformable Shape Analysis 293 Overview Deformable shape analysis 6.2.1 Deformable templates 6.2.2 Parts-based shape analysis 293 294 294 297 VII VIM Contents 6.3 6.4 6.5 6.6 6.7 CHAPTER 7 7.1 7.2 7.3 7.4 7.5 CHAPTER 8 8.1 8.2 8.3 8.4 Active 6.3.1 6.3.2 6.3.3 6.3.4 6.3.5 6.3.6 contours (snakes) Basics The Greedy algorithm for snakes Complete (Kass) snake implementation Other snake approaches Further snake developments Geometric active contours (level-set-based approaches) Shape skeletonization 6.4.1 Distance transforms 6.4.2 Symmetry Flexible shape models—active shape and active appearance Further reading References 299 299 301 308 313 314 318 325 325 327 334 338 338 Object Description Overview Boundary descriptions 7.2.1 Boundary and region 7.2.2 Chain codes 7.2.3 Fourier descriptors Region descriptors 7.3.1 Basic region descriptors 7.3.2 Moments Further reading References 343 343 345 345 346 349 378 378 383 395 395 Introduction to Texture Description, Segmentation, and Classification Overview What is texture? Texture description 8.3.1 Performance requirements 8.3.2 Structural approaches 8.3.3 Statistical approaches 8.3.4 Combination approaches 8.3.5 Local binary patterns 8.3.6 Other approaches Classification 8.4.1 Distance measures 8.4.2 The /c-nearest neighbor rule 8.4.3 Other classification approaches 399 399 400 403 403 403 406 409 411 417 417 417 424 428 Contents 8.5 8.6 8.7 CHAPTER 9 9.1 9.2 9.3 9.4 9.5 9.6 CHAPTER 10 Segmentation Further reading References 429 431 432 Moving Object Detection and Description 435 Overview Moving object detection 9.2.1 Basic approaches 9.2.2 Modeling and adapting to the (static) background 9.2.3 Background segmentation by thresholding 9.2.4 Problems and advances Tracking moving features 9.3.1 Tracking moving objects 9.3.2 Tracking by local search 9.3.3 Problems in tracking 9.3.4 Approaches to tracking 9.3.5 Meanshift and Camshift 9.3.6 Recent approaches Moving feature extraction and description 9.4.1 Moving (biological) shape analysis 9.4.2 Detecting moving shapes by shape matching in image sequences 9.4.3 Moving shape description Further reading References 435 437 437 442 447 450 451 451 452 455 455 457 472 474 474 Appendix 1: Camera Geometry Fundamentals 10.1 Image geometry 10.2 Perspective camera 10.3 Perspective camera model 10.3.1 Homogeneous coordinates and projective geometry 10.3.2 Perspective camera model analysis 10.3.3 Parameters of the perspective camera model 10.4 Affine camera 10.4.1 Affine camera model 10.4.2 Affine camera model and the perspective projection 10.4.3 Parameters of the affine camera model 10.5 Weak perspective model 10.6 Example of camera models 10.7 Discussion 10.8 References 476 480 483 484 489 489 490 491 491 496 499 500 501 503 504 505 507 517 518 ix X Contents CHAPTER 11 Appendix 2: Least Squares Analysis 11.1 The least squares criterion 11.2 Curve fitting by least squares 519 519 521 CHAPTER 12 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 12.9 12.10 12.11 Appendix 3: Principal Components Analysis Principal components analysis Data Covariance Covariance matrix Data transformation Inverse transformation Eigenproblem Solving the eigenproblem PCA method summary Example References 525 525 526 526 529 530 531 532 533 533 534 540 CHAPTER 13 13.1 13.2 13.3 Appendix 4: Color Images Color images Tristimulus theory Color models 13.3.1 The colorimetric equation 13.3.2 Luminosity function 13.3.3 Perception based color models: the CIE RGB andCIEXYZ 13.3.4 Uniform color spaces: CIE LUV and CIE LAB 13.3.5 Additive and subtractive color models: RGB andCMY 13.3.6 Luminance and chrominance color models: YUV, YIQ, and YCbCr 13.3.7 Perceptual color models: HSV and HLS 13.3.8 More color models References 541 542 542 544 544 545 13.4 Index 547 562 568 575 583 599 600 601