N O T I C E This Document Has Been Reproduced From
Total Page:16
File Type:pdf, Size:1020Kb
N O T I C E THIS DOCUMENT HAS BEEN REPRODUCED FROM MICROFICHE. ALTHOUGH IT IS RECOGNIZED THAT CERTAIN PORTIONS ARE ILLEGIBLE, IT IS BEING RELEASED IN THE INTEREST OF MAKING AVAILABLE AS MUCH INFORMATION AS POSSIBLE 1.-, 1 .Rk y NASA TECHNICAL 8.0 - 10. 0.4 .. MEMORANDUM " x a NASA TM-78227 s EVALUATION OF REGISTRATION, COMPRESSION, ANDD CLASSIFICATION ALGORITHMS — VOLUME 2 (DOCUMENTATION) Y By R. Jayroe, R. Atkinson, L. Callas, J. Hodges, B. Gaggint, and J. Peterson a (FRO-10042) RVALTJATTON OF RE(',T_ST P ATT0F, mqo-16392 COMPRESSION, AND CLASSIFICA T ION ALGORITHMS. VOLUME 2: DOCTIMENTAT70N (NASA) 331 p HC A15/MF A01 CSCL OAP TJnclas r,3/43 00042 February 1979 NASA George C. Marshall Space Flight Center Marshall Space Flight Center, Alabama MSFC • Form 3190 (Rev June 1971) G fFPk 1 L f. TtTf Nallf'A1 GCOAOT GTALIr%AOr% TIT. C OAf_C 1, REPORT N0. GOVERNMENT2. ACCESSION NO. 3. RECIPIENT'S CATALOG NO. t NASA TM-78227 4, TITLE AND SUBTITLE 5, REPORT DATE Evaluation of Registration, Compression and Classification February 1979 Algorithms. Volume 2 (Documentation) 6. PERFORMING ORGANIZATION CODE 7, AUTHOR(5) R. Jayroe, R. Atkinson, L. Callas, J. Hodges, 8. PERFORMING ORGANIZATION REPAR f n B ni and J Peterson 9. PERFORMING ORGANIZATION NAME AND ADDRESS 10. WORK UNIT NO, George C. Marshall Space Flight Center Marshall Space Flight Center, Alabama 35812 11. CONTRACT OR GRANT NO. 13, TYPE OF REPOR'i & PERIOD COVERED 12, SPONSORING AGENCY NAME AND ADDRESS Technical Memorandum National Aeronautics and Space Administration Washington, D. C. 20546 14. SPONSORING AGENCY CODE • 15. SUPPLEMENTARY NOTES Prepared by the Data Systems Laboratory. 16. ABSTRACT Volume I examines the effects that are produced by three registration and seven compression approaches on Landsat imagery and on results obtained from three classification approaches. The registration, compression and classification algorithms were selected on the basis that such a group would include most of the different and commonly used approaches. The results of the investigation indicate clear-cut, cost-effective choices for registering, compressing and classifying multispectral imagery. Volume 2 is a programmer's user manual containing IBM-360/75 Fortran listings of the algorithms used in the investigation. I i r 17. KEY WORDS 1s. DISTRIBUTION STATEMENT Unclassified-Unlimited +g, SECURITY CLASSIF. (of this repaetl 20, SECURITY CLASSIF. (of this page) 21, NO. OF PAGES 22. PRICE Unclassified Unclassified 329 NTIS MSFC - Form 3 2 9 2 (Rev. December 19 7 2) For sale by National Technical Information Service. Springfield. Virginia 2 215 1 TABLE OF CONTENTS Page IST OF ILLUSTRATIONS V HAPTER 1 Introduction HAPTER II Evaluation of Processing Effects 3 Average Uncertainty (Entropy) 4 Average Information Transferred from X to Y 9 Chi-Square Statistic 16 Multidimensional Histogram of Feature Vectors 22 Comparison of Supervised Classification Maps 30 Computation of Contingency Matrices 38 HAPTER 111 Registration of Image Data 48 Magnification of Imagery 49 Finding Coefficients of Registration Mapping Functions 57 Registration - 1 Generation of Mapping Grid 71 Registration - 2 Partitioning of Large Images by Cells 78 Registration - 3 Perform Uata Handling and Interpolation 84 Map Overlay 102 CHAPTER IV Data Compression 118 Compression by Adaptive Differential Pulse Code Modulation 119 Compression by Two Dimensional Transforms 130 Compression by a Hybrid Technique 156 Cluster Coding Algorithm 168 Vector Reduction 176 BLOB-1 Segmentation of Picture 181 iii -4'T PAGE BLANK Nr ^lt,MEG -41 TABLE OF CONTENTS Page BLOB-2 Detect Homogeneous Regions 189 BLOB-3 Reconstruction of Picture 223 CHAPTER V Classification 232 Sequential Linear Classifier 233. Maximum Likelihood Classifier 248 CHAPTER VI Preparation of Ground Truth Maps in Digital Format 259 Thinning of Boundary Images 260 Identification of Connected Regions 290 Removal of Boundaries 313 Replacement of Region Identification Numbers with Class Identification Numbers iv L LIST OF ILLUSTRATIONS Figure Title Page 1 A Simplified Flow Diagram for Computing the Mean Variance. and EntropyPY of a Data Set 6 2 A Simplified Flow Diagram of Subroutine TRNSIN 12 rr. 3 Simplified Flow Diag ram o f XS Q 1 8 4 Flow Chart for Creating Vector Table in Subroutine HASH 24 5 Sample Output of Subroutine COMPMP 33 P 6 A Portion of the Printout from CONMAT 40 7 Huntsville Airport Registered to UTM Coordinates ^- with Earth Rotation and Sensor Delay Effects Removed 53 8 Sample Printout of Grid Point Coordinates in the Landsat and UTM Systems 74 zG 9 Flow Chart for ADPCM ComCompression P 122 10 Histograms of Difference Images for Four Bands 124 11 Flow Chart for 2-D Transform Compression Method 135 12 Printed Output of the 2D Transform Compression P rog ram 13 i 13 Flow Chart of the Hybrid Compression Method 161 14 Difference Image 163 15 Simplified Flow Diagram for Cluster Coding Algorithm 170 16 Flow Chart for Subroutine REFORM 184 17 Flow Chart for the BLOB Program 195 18 Flow Chart for Subroutine RECON 227 19 Discriminant Training Phase of Sequential Linear Classifier 236 20 Classification Phase of Linear Classifier 237 21 Classifier Training Phase of Maximum Likelihood Classification 253 v Figure Title E29e 22 Classification Phase of Maximum Likelihood Classifier 253 23 Simplified Flow Diagram for Thinning Boundaries 265 24 Thinned Boundaries 270 25 Simplified Flow Diagram for Subroutine RIDER2 294 26 Plot of Distinct Regions as Determined by Subroutine Region 298 27 Plot of Class Numbers after Removal of Boundaries 316 28 P rog ram to Change Region Numbers to Class Numbers 322 VI CHAPTER 1 INTRODUCTION This volume documents the computer programs which were used to implement I and evaluate the image processing algorithms described in Volume I. All of the programs described were run on an IBM 360/75 computer, ana core 4 requirements are given in units of 8-bit bytes. The Landsat-1 and -2 data used as Input was formatted into bytes, such that the four spectral measurements appear in one full word. The data sets used were seasonal passes covering a LACIE sample segment of 117 by 196 pixels, and a 1200 pixel square segment containing Mobile, Alabama. 2 CHAPTER II EVALUATION OF PROCESSING EFFECTS 3 AVERAGE UNCERTAINTY (ENTROPY) 1. NAME ENTRPY II. DESCRIPTION The average uncertainty (entropy) of a data set X is g'ven by N N ( X ) _ _ P(Xd 109 2 P(Xd i=1 where P(X I ) is the probability of occurrence of the i th event in data set X. This subroutine computes the entropy of a data set X. III. CALLING SEQUENCE CALL ENTRPY (IX, NREC, NEL, NDEVI, IBANO, XMEAN, SIGMAX, XNTRPV) where IX is an array into which the data set is read; NREC and NEL are the number of records and the number of pixels (bytes) per record in the data set; NDEVI is the logical unit number of the data set; IBAND is the band (one out of four) of the data set; and, XMEAN, SIGMAX, and XNTRPY are outputs of the subroutine giving the mean, variance, and entropy, respectively, of the data set. IV. INPUT/OUTPUT 1. INPUT The input to this program is a sequential data set on logical unit NDEVI, having NREC records each NEL 4-band pixels long, stored in unformatted FORTRAN mode. 2. OUTPUT The outputs of the program are the three variables XMEAN, SIGMAX, and XNTRPY denoting mean, variance, and entropy of the data set. 4 L V. DESCRIPTION OF SUBROUTINES No subroutines are required by this routine. VI. PERFORMANCE SPECIFICATIONS 1. STORAGE This subroutine is 1594 bytes long. 2. EXECUTION TIME For a data set of 112 records, each 192 elements long, it takes a about 1/3 second on the IBM 360/75 computer to compute the mean, variance, and entropy of one band of data. ^. VII. METHOD A simplified program for computing the mean, varlasice, and entropy of a data set is shown in Figure 1. First, a histogram of the data is obtained giving the number of occurrences of each intensity. Then, the probability of each intensity is found by dividing the number of occurrences by the total number of pixels. Once the probabilities are determined, the entropy is computed from the relationship given in Section 11. The mean, X, is determined from N Xi X s N where N is the total number of pixels (NREC X NEL) and the X l 's are the intensities. The variance, S 2 , is found from N S2 s N 1 1 (XI _ )2. VIII. COMMENTS None 5 -4-A START REPEAT NREC TI READ IN ONE RECORD REPEAT NEL TIMES COMPUTE THE RANGE OF DATA COUNT THE NUM- BER OF nCCUR- RENCES OF EA. INTENSITY COMPUTE THE MEAN OF THE DATA SET COMPUTE THE VARIANCE COMPUTE THE ENTROPY OF THE DATA SET CRETURN Figures 1. A Simplified Flow Diagram for Computing the Mean. Variance, and Entropy of a Data Set 4 Ix. TESTS This program has been tested on the LACIE data (112 lines x 192 pixels/line). For the 10/22/75 pass, band 1, the mean and variance were found to be 25.1 and 12.4, respectively. When the logarithm to the base of two was used, the entropy was 3.7 bits. X. LISTINGS Thesii ing for ENTRPY is attached at the end of this section. 7 tr SUPPOUTINF. ENTRPY(IX NEL IdAuD XMEAK,SIG MAX XNTRPY) ► NREC ► ► kDEVI ► ► ► ME Ako VA FKTROPY THIS SUORCUTIkF CO M PUTES THE K IANCF ► ANC OF A nATA SET aaa. ^^f aaaaaaaaaaaaaaaaaaaaaa+ aaA. ♦ ^a^a+:.•fa.••ra.aa!•^a *ota^aaa^• LOGICAL * 1 IX(q ► NEL) OI M ENSIC K IH(128) DATA NPTS /1281 CO M PUTE THE MISTOGNAM OF THE DATA Do 5 I=10NPTS 5 P4 (I a 0 00 10 I21.NREC REAn(hum Ix nn 10 Jo1 ► NEL M a IX( 19AN0 ► J)4t 10 COOT IKOF CrMPUTE THE M EAL► AKO VARIANCF.