IMAGE ANALYSIS, CLASSIFICATION AND CHANGE DETECTION IN REMOTE SENSING With Algorithms for ENVI/IDL and Python THIRD EDITION Morton J. Canty CRC Press Taylor & Francis Group Boca Raton London NewYork CRC Press is an imprint of the Taylor St Francis Croup, an informa business
Contents Preface to the First Edition xi Preface to the Second Edition xiii Preface to the Third Edition xv List of Figures xvii Program Listings xxiii 1 Images, Arrays, and Matrices 1 1.1 Multispectral satellite images 4 1.2 Synthetic aperture radar images 8 1.3 Algebra of vectors and matrices 11 1.3.1 Elementary properties 11 1.3.2 Square matrices 14 1.3.3 Singular matrices 16 1.3.4 Symmetric, positive definite matrices 16 1.3.5 Linear dependence and vector spaces 17 1.4 Eigenvalues and eigenvectors 18 1.5 Singular value decomposition 21 1.6 Finding minima and maxima 23 1.7 Exercises 32 2 Image Statistics 35 2.1 Random variables 35 2.1.1 Discrete random variables 36 2.1.2 Continuous random variables 37 2.1.3 Random vectors 40 2.1.4 The normal distribution 42 2.1.5 The gamma distribution and its derivatives 45 2.2 Parameter estimation 47 2.2.1 Random samples 47 2.2.2 Sample distributions and interval estimators 50 2.3 Multivariate distributions 53 2.3.1 Vector sample functions and the data matrix 54 2.3.2 Provisional means 55 v
vi Image Analysis, Classification, and Change Detection in Remote Sensing. 59 2.3.3 Real and complex multivariate sample distributions. 2.4 Bayes' Theorem, likelihood and classification 61 2.5 Hypothesis testing 64 2.6 Ordinary linear regression 69 2.6.1 One independent variable 69 2.6.2 Coefficient of determination (R2) 71 2.6.3 More than one independent variable 72 2.6.4 Regularization, duality and the Gram matrix 74 2.7 Entropy and information 76 2.7.1 Kullback-Leibler divergence 78 2.7.2 Mutual information 78 2.8 Exercises 80 3 Transformations 85 3.1 The discrete Fourier transform 85 3.2 The discrete wavelet transform 91 3.2.1 Haar wavelets 91 3.2.2 Image compression 95 3.2.3 Multiresolution analysis 98 3.3 Principal components 105 3.3.1 Image compression and reconstruction 107 3.3.2 Primal solution 108 3.3.3 Dual solution 110 3.4 Minimum noise fraction Ill 3.4.1 Additive noise 112 3.4.2 Minimum noise fraction in ENVI 115 3.5 Spatial correlation 117 3.5.1 Maximum autocorrelation factor 117 3.5.2 Noise estimation 119 3.6 Exercises 122 4 Filters, Kernels and Fields 127 4.1 The Convolution Theorem 127 4.2 Linear filters 132 4.3 Wavelets and filter banks 135 4.3.1 One-dimensional arrays 135 4.3.2 Two-dimensional arrays 141 4.4 Kernel methods 146 4.4.1 Valid kernels 146 4.4.2 Kernel PCA 150 4.5 Gibbs-Markov random fields 152 4.6 Exercises 156
Contents vii 5 Image Enhancement and Correction 159 5.1 Lookup tables and histogram functions 159 5.2 High-pass spatial filtering and feature extraction 161 5.2.1 Sobel filter 161 5.2.2 Laplacian-of-Gaussian filter 163 5.2.3 OpenCV functions 166 5.2.4 Invariant moments 170 5.3 Panchromatic sharpening 176 5.3.1 HSV fusion 176 5.3.2 Brovey fusion 179 5.3.3 PCA fusion 179 5.3.4 DWT fusion 180 5.3.5 A trous fusion 181 5.3.6 A quality index 184 5.4 Radiometric correction of polarimetric SAR imagery 185 5.4.1 Speckle statistics 185 5.4.2 Multi-look data 188 5.4.3 Speckle filtering 191 5.5 Topographic correction 196 5.5.1 Rotation, scaling and translation 196 5.5.2 Imaging transformations 197 5.5.3 Camera models and RFM approximations 199 5.5.4 Stereo imaging and digital elevation models 201 5.5.5 Slope and aspect 207 5.5.6 Illumination correction 208 5.6 Image-image registration 212 5.6.1 Frequency domain registration 212 5.6.2 Feature matching 217 5.6.3 Re-sampling with ground control points 222 5.7 Exercises 226.. 6 Supervised Classification Part 1 231 6.1 Maximizing the a posteriori probability 232 6.2 Training data and separability 233 6.3 Maximum likelihood classification 238 6.3.1 ENVI's maximum likelihood classifier 239 6.3.2 A modified classifier for ENVI and a Python script 241 6.4 Gaussian kernel classification 243 6.5 Neural networks 249 6.5.1 The neural network classifier 252 6.5.2 Cost functions 257 6.5.3 Backpropagation 258 6.5.4 Overfitting and generalization 264 6.6 Support vector machines 266 6.6.1 Linearly separable classes 267
viii Image Analysis, Classification, and Change Detection in Remote Sensing 6.6.2 Overlapping classes 272 6.6.3 Solution with sequential minimal optimization 274 6.6.4 Multiclass SVMs 275 6.6.5 Kernel substitution 277 6.6.6 A modified SVM classifier 278 6.7 Exercises 280 7 Supervised Classification Part 2 285 7.1 Postprocessing 285 7.1.1 Majority filtering 286 7.1.2 Probabilistic label relaxation 286 7.2 Evaluation and comparison of classification accuracy 288 7.2.1 Accuracy assessment 289 7.2.2 Cross-validation on the cloud 294 7.2.3 Model comparison 296 7.3 Adaptive boosting 300 7.4 Classification of polarimetric SAR imagery 305 7.5 Hyperspectral image analysis 307 7.5.1 Spectral mixture modeling 307 7.5.2 Unconstrained linear unmixing 310 7.5.3 Intrinsic end-members and pixel purity 311 7.5.4 Anomaly detection: The RX algorithm 313 7.5.5 Anomaly detection: The kernel RX algorithm 315 7.6 Exercises 320 8 Unsupervised Classification 323 8.1 Simple cost functions 324 8.2 Algorithms that minimize the simple cost functions 326 8.2.1 K-means clustering 327 8.2.2 Kernel K-means clustering 329 8.2.3 Extended K-means clustering 332 8.2.4 Agglomerative hierarchical clustering 335 8.2.5 Fuzzy K-means clustering 337 8.3 Gaussian mixture clustering 339 8.3.1 Expectation 8.3.2 Simulated annealing 343 maximization 340 8.3.3 Partition density 343 8.3.4 Implementation notes 344 8.4 Including spatial information 346 8.4.1 Multiresolution clustering 346 8.4.2 Spatial clustering 348 8.5 A benchmark 351 8.6 The Kohonen self-organizing map 353 8.7 Image segmentation 357 8.7.1 Segmenting a classified image 358
Contents ix 8.7.2 Object-based classification 360 8.7.3 The mean shift 361 8.8 Exercises 363 9 Change Detection 369 9.1 Algebraic methods 370 9.2 Postclassification comparison 371 9.3 Principal components analysis (PCA) 371 9.3.1 Iterated PCA 374 9.3.2 Kernel PCA 376 9.4 Multivariate alteration detection (MAD) 377 9.4.1 Canonical correlation analysis (CCA) 379 9.4.2 Orthogonality properties 381 9.4.3 Scale invariance 384 9.4.4 Iteratively re-weighted MAD 384 9.4.5 Correlation with the original observations 387 9.4.6 Regularization 387 9.4.7 Postprocessing 391 9.5 Decision thresholds 391 9.6 Unsupervised change classification 395 9.7 Change detection with polarimetric SAR imagery 398 9.7.1 Single polarimetry: The gamma distribution 398 9.7.2 Quad polarimetry: The complex Wishart distribution 400 9.8 Radiometric normalization of multispectral imagery 403 9.8.1 Scatterplot matching 404 9.8.2 IR-MAD normalization 406 9.9 Exercises 411 A Mathematical Tools 415 A.1 Cholesky decomposition 415 A.2 Vector and inner product spaces 417 A.3 Complex numbers, vectors and matrices 418 A.4 Least squares procedures 420 A.4.1 Recursive linear regression 420 A. 4.2 Orthogonal linear regression 422 A. 5 Proof of Theorem 7.1 425 B Efficient Neural Network Training Algorithms 429 B. l The Hessian matrix 429 B. l.l The.R-operator 430 B.1.2 Calculating the Hessian 433 B.2 Scaled conjugate gradient training 434 B.2.1 Conjugate directions 434 B.2.2 Minimizing a quadratic function 437 B.2.3 The algorithm 440
x Image Analysis, Classification, and Change Detection in Remote Sensing B.3 Kalman filter training 444 B.3.1 Linearization 444 B. 3.2 The algorithm 446 B.4 A neural network classifier with hybrid training 452 C ENVI Extensions in IDL 453 C. l Installation 453 C.2 Documentation 454 C. 2.1 ENVI extensions for Chapter 4 455 C.2.2 ENVI extensions for Chapter 5 455 C.2.3 ENVI extensions for Chapter 6 460 C.2.4 ENVI extensions for Chapter 7 461 C.2.5 ENVI extensions for Chapter 8 463 C. 2.6 ENVI extensions for Chapter 9 466 D Python Scripts 471 D. l Installation 471 D. l.l Required packages 471 D.1.2 Eclipse and Pydev 472 D.2 Documentation 473 D.2.1 Utilities 473 D.2.2 Scripts for Chapter 1 473 D.2.3 Scripts for Chapter 4 474 D.2.4 Scripts for Chapter 5 474 D.2.5 Scripts for Chapter 6 476 D.2.6 Scripts for Chapter 7 477 D.2.7 Scripts for Chapter 8 478 D.2.8 Scripts for Chapter 9 479 Mathematical Notation 481 References 483 Index 495