{"@context":{"@language":"en","Affiliation":"http:\/\/vivoweb.org\/ontology\/core#departmentOrSchool","AggregatedSourceRepository":"http:\/\/www.europeana.eu\/schemas\/edm\/dataProvider","Campus":"https:\/\/open.library.ubc.ca\/terms#degreeCampus","Creator":"http:\/\/purl.org\/dc\/terms\/creator","DateAvailable":"http:\/\/purl.org\/dc\/terms\/issued","DateIssued":"http:\/\/purl.org\/dc\/terms\/issued","Degree":"http:\/\/vivoweb.org\/ontology\/core#relatedDegree","DegreeGrantor":"https:\/\/open.library.ubc.ca\/terms#degreeGrantor","Description":"http:\/\/purl.org\/dc\/terms\/description","DigitalResourceOriginalRecord":"http:\/\/www.europeana.eu\/schemas\/edm\/aggregatedCHO","FullText":"http:\/\/www.w3.org\/2009\/08\/skos-reference\/skos.html#note","Genre":"http:\/\/www.europeana.eu\/schemas\/edm\/hasType","IsShownAt":"http:\/\/www.europeana.eu\/schemas\/edm\/isShownAt","Language":"http:\/\/purl.org\/dc\/terms\/language","Program":"https:\/\/open.library.ubc.ca\/terms#degreeDiscipline","Provider":"http:\/\/www.europeana.eu\/schemas\/edm\/provider","Publisher":"http:\/\/purl.org\/dc\/terms\/publisher","Rights":"http:\/\/purl.org\/dc\/terms\/rights","ScholarlyLevel":"https:\/\/open.library.ubc.ca\/terms#scholarLevel","Title":"http:\/\/purl.org\/dc\/terms\/title","Type":"http:\/\/purl.org\/dc\/terms\/type","URI":"https:\/\/open.library.ubc.ca\/terms#identifierURI","SortDate":"http:\/\/purl.org\/dc\/terms\/date"},"Affiliation":[{"@value":"Applied Science, Faculty of","@language":"en"},{"@value":"Electrical and Computer Engineering, Department of","@language":"en"}],"AggregatedSourceRepository":[{"@value":"DSpace","@language":"en"}],"Campus":[{"@value":"UBCV","@language":"en"}],"Creator":[{"@value":"Baillie, Alexander John Main","@language":"en"}],"DateAvailable":[{"@value":"2010-01-23T00:00:13Z","@language":"en"}],"DateIssued":[{"@value":"1973","@language":"en"}],"Degree":[{"@value":"Master of Applied Science - MASc","@language":"en"}],"DegreeGrantor":[{"@value":"University of British Columbia","@language":"en"}],"Description":[{"@value":"The performance of systems which employ a linear transformation and block quantization to encode visual information sources has been investigated. The effect of several relevant design parameters upon the behavior of these systems was examined theoretically. The performance criterion used was the rate measured in bits-per-picture sample required to transmit an image through a noiseless digital channel such that the average distortion in the received picture is less than a specified value. As a measure of image distortion, the mean-squared-error, well-known for its analytical tractability, was used.\r\nA second measure of image distortion which incorporates knowledge of the human visual system was examined. The new distortion index proposed by Stockham is expected to correlate well with subjective assessments of picture distortion although no experiments have been performed, as yet, to show this. In order to determine what, if anything, could be learned about this second distortion measure from theoretical considerations alone, a procedure was developed to estimate its value for given bit rates. These values were compared to the mean-squared-error distortion values obtained for the same bit rates in an attempt to gain some insight into the usefulness of the second distortion measure.","@language":"en"}],"DigitalResourceOriginalRecord":[{"@value":"https:\/\/circle.library.ubc.ca\/rest\/handle\/2429\/19078?expand=metadata","@language":"en"}],"FullText":[{"@value":"A THEORETICAL STUDY OF TRANSFORM PICTURE CODING SYSTEMS AND AN INVESTIGATION OF A NEW MEASURE OF DISTORTION IN PROCESSED IMAGES by Alexander John Main B a i l l i e B.A.Sc, University of B r i t i s h Columbia, 1971 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE i n the Department of E l e c t r i c a l Engineering We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA December 1973 In presenting t h i s thesis i n p a r t i a l f u l f i l m e n t of the requirements for an advanced degree at the University of B r i t i s h Columbia, I agree that the Library s h a l l make i t f r e e l y available for reference and study. I further agree that permission for extensive copying of t h i s thesis for scholarly purposes may be granted by the Head of my Department or by h i s representatives. It i s understood that copying or publication of t h i s thesis for f i n a n c i a l gain s h a l l not be allowed without my written permission. Department o The University of B r i t i s h Columbia Vancouver 8, Canada Date A b s t r a c t The performance of systems which employ a l i n e a r t r a n s f o r m a t i o n and block q u a n t i z a t i o n to encode v i s u a l i n f o r m a t i o n sources has been i n v e s t i g a t e d . The e f f e c t of s e v e r a l r e l e v a n t design parameters upon the behavior of these systems was examined t h e o r e t i c a l l y . The performance c r i t e r i o n used was the r a t e measured i n b i t s - p e r - p i c t u r e sample r e q u i r e d to transmit an image through a n o i s e l e s s d i g i t a l channel such that the average d i s t o r t i o n i n the rec e i v e d p i c t u r e i s l e s s than a s p e c i f i e d value. As a measure of image d i s t o r t i o n , the mean-squared-error, w e l l -known f o r i t s a n a l y t i c a l t r a c t a b i l i t y , was used. A second measure of image d i s t o r t i o n which i n c o r p o r a t e s knowledge of the human v i s u a l system was examined. The new d i s t o r t i o n index proposed by Stockham i s expected to c o r r e l a t e w e l l w i t h s u b j e c t i v e assessments of p i c t u r e d i s t o r t i o n although no experiments have been performed, as y e t , to show t h i s . In order to determine what, i f anything, could be learned about t h i s second d i s t o r t i o n measure from t h e o r e t i c a l c o n s i d e r a t i o n s alone, a procedure was developed to estimate i t s value f o r given b i t r a t e s . These values were compared to the mean~squared--error d i s t o r t i o n values obtained f o r the same b i t ra t e s i n an attempt to gain some i n s i g h t i n t o the usefulness of the second d i s t o r t i o n measure. TABLE OF CONTENTS Page I. INTRODUCTION 1.1 Motivation 1 1.2 Background ' . .- 1 1.3 Outline of Thesis 2 II. MONOCHROMATIC IMAGE CODING BY LINEAR TRANSFORMATION AND BLOCK QUANTIZATION 2.1 Introduction- Why Transform Coding? 4 2.2 A S t a t i s t i c a l Model for Motion Pictures 6 2.3 The Generalized Transform Coding System 7 2.4 Linear Transformations 11 2.5 Block Quantization 14 III. A THEORETICAL EVALUATION OF TRANSFORM CODING SYSTEM PERFORMANCE \"3.1 Introduction 15 3.2 The Work of Habibi and Wintz 17 3.3 Factors Affecting the Performance of Transform Coding Systems 20 . 3.4 Basis-restricted Transformations and a Performance Measure for Transform Picture Coding 22 3.5 Numerical Results 26 3.6 Conclusions 36 IV. A THEORETICAL INVESTIGATION OF AN ALTERNATIVE TO THE MEAN-SQUARED-ERROR DISTORTION MEASURE 4.1 Introduction 38 4.2 A Theoretical Assessment of Transform Coding Using Stockham's Distortion Measure 40 4.2.1 Preliminary Remarks 40 i i i 4.2.2 The Procedure Used to Evaluate System Perform-ance With Stockham's Measure 41 4.2.3 The Computation of S e(u,v) 46 4.2.4 Numerical Results 53 4.3 Conclusions 61 V. CONCLUSION 5.1 Summary of Thesis 62 5.2 Future Research . 63 APPENDIX A. DEFINITIONS AND SOFTWARE IMPLEMENTATION OF THE DISCRETE KARHUNEN-LOEVE, FOURIER, AND HADAMARD TRANSFORMATIONS A.l General Definition of a Linear Transform 64 A. 2 The Discrete Karhunen-Loeve Transform 65 A. 3 The Discrete Fourier Transformation 67 A. 4 The Discrete Walsh or Hadamard Transformation 67 --A-i'5 '-Variances 'of Transform Coefficients 70 A. 6 Software Implementations . 72 A.6.1 The Discrete KL Transform 72 A.6.2 The Discrete Fourier Transform 73 A.6.3 The Hadamard Transform . 73 A.6.4 Listing of the Subprogram KLVAR1 . . 73 A.6.5 Listing of the Subprogram FVAR1 . 74 A.6.6 Listing of the Subprograms HVAR1 and HAD2 . . . . 75 APPENDIX B. DETAILS CONCERNING PEARL'S PERFORMANCE MEASURE FOR TRANSFORM CODING SYSTEMS B. l Derivation of Equations (3.11) and (3.12) . 85 B.2 An Objection to Pearl's Measure 86 APPENDIX C. LISTINGS OF.THE PROGRAMS USED TO CALCULATE e^L,,T i v C l Explanatory Remarks 88 C.2 Program Listings ' 88 REFERENCES . 96 a v LIST OF ILLUSTRATIONS Figure P a g e 2.1 Generalized transform coding system ' 8 3.1 B a s i s - r e s t r i c t e d transform structure 23 3.2 . Comparison of rate versus d i s t o r t i o n curves f o r one-, two-, and three-dimensional blocks of data when N = 64 and adjacent sample c o r r e l a t i o n equals 0-.85. (a) K-L. (b) Fou r i e r . (c) Hadamard 28 3.3 Comparison.of rate versus d i s t o r t i o n curves f o r K-L, Fourier, and Hadamard transforms when N = 64 and adjacent sample corre-l a t i o n equals 0.85. (a) One-dimensional blocks, (b). Two-dimen-s i o n a l blocks, (c) Three-dimensional blocks 29 3.4 Comparison of rate versus c o r r e l a t i o n curves f o r one-, two-, and three-dimensional blocks of data when N = 64 and the s i g -nal-to-noise r a t i o i s 30 db. (a) K-L. (b) Fourier, (c) Hada-mard 31 3.5 Comparison of rate versus c o r r e l a t i o n curves f o r K-L, Fourier, and Hadamard transforms when N = 64 and the signa l - t o - n o i s e r a t i o i s 30 db. (a) One-dimensional blocks, (b) Two-dimen-\u2022'S'i\u00a9nal-\u00bbb4ook-r5, \u2022\u2022 (o) \u2022 \u2022Tbi?ee-d4mens*onal'>bio'cks \u00bb\u2022 . 3-2 3.6 Comparison of rate versus block length for one-, two-, and three-dimensional blocks of data when the adjacent sample c o r r e l a t i o n i s 0.85 and the signa l - t o - n o i s e r a t i o i s 30 db. (a) K-L. (b) Fourier, (c) Hadamard 34' 3.7 Comparison of rate versus block length curves f o r K-L, Fourier, and Hadamard transforms when the adjacent sample c o r r e l a t i o n i s 0.85 and the signal-to-noise r a t i o i s 30 db. (a) One-dimen-s i o n a l blocks, (b) Two-dimensional blocks, (c) Three-dimen-s i o n a l blocks 35 4.1 Stockham's v i s u a l model . 39 4.2 Pl o t of equation (4.8) . 45 2 4.3 The p a r t i t i o n i n g of an image into M subsections 47 v i LIST OF TABLES Table Page I Performance estimates for the one-dimensional Fourier transform coder (Block length = 64) 54 II Performance estimates for the one-dimensional Hadamard transform coder (Block length = 64) 55 III Performance estimates for the two-dimensional Fourier transform coder (Block length = 64) 57 IV Performance estimates for the two-dimensional Hadamard transform coder (Block length = 64) 57 V Performance estimates for the one-dimensional Fourier transform coder (Block length = 256) 59 VI Performance estimates for the one-dimensional Hadamard transform coder (Block length = 256) 60 v i i ACKNOWLEDGEMENT I would l i k e to thank my supervisor, Dr. Grant Anderson, for his constant encouragement, and inexhaustible patience during the course of this thesis. Thanks are also due to Miss Betty Cockburn and Miss Linda C h r i s t i e who patiently and quickly typed the manuscript. The technical assistance of Messrs. A. Mackenzie and H. H. Black i s greatly appreciated, as w e l l . Grateful acknowledgement i s given to the National Research Council for f i n a n c i a l assistance under grant NRC 67-7994. F i n a l l y , I would l i k e to thank my wife, Joanne, for making i t a l l worthwhile. v i i i 1 I. INTRODUCTION 1.1 Motivation Experimental studies of transform picture coding systems are generally performed using large, high-speed, general-purpose d i g i t a l computers to simulate the operation of the transform coder [l ] - [ 2 ] . However, the time required to digitize the pictures, process them with the computer, and display the results has prevented researchers from performing a thorough examination of the effect of relevant parameters upon the performance of transform picture coders. In this thesis, a scheme for estimating the per-formance of transform coders [3] is employed to predict system performance for a wide range of values of certain pertinent design parameters. The analytical technique used yields useful results in a fraction of the time taken to find corresponding results experimentally. Assessing the quality of processed images by subjective testing is another time-consuming and laborious task. Not surprisingly, objective measures of picture quality which correlate well with subjective judgements are constantly being sought after for their time- and labour-saving proper-ties. One such measure proposed recently by Stockham [4] i s studied in this thesis. 1.2 Background The concept of linear transformation and block quantization was f i r s t reported by Huang and Schultheiss [5]. Several researchers have since applied the technique to the coding of picture data. Wintz [6] has surveyed a l l known applications of linear transformation and block quantization to monochromatic image coding. Wilkins and Wintz [7] published a comprehensive bibliography of picture coding techniques, ranging from pulse-code-modulation 2 (PCM) through a host of ad hoc intuitive schemes. Many published reports of transform coding schemes are included in their l i s t i n g s . Also included in [7] are l i s t s of published papers dealing with picture properties and models, and with various aspects of human visual information processing. Knowledge of how humans process visual data has been ut i l i z e d by researchers [4][8] to define objective measures of picture quality. Wilder [8] studied fifteen objective error measures, each of which involved some function of the point-by-point difference between the original scene and the processed version. He concluded that point-by-point error measures were not subjectively relevant from the viewpoint of overall quality. Further, he suggested that future investigators should choose objective error measures which take area properties of vision into account. In particular, he recommended considering pictures from a spatial frequency viewpoint as Stockham has clone [4]. 1.3 Outline of Thesis In Chapter 2, the reasons for studying transform coding systems are discussed, a theoretical model for picture data sources i s outlined, and a generalized transform coder i s described. Chapter 3 is devoted to a theoretical evaluation of transform pic-ture coding system performance. The results are presented i n the form of curves which show the effects on system performance of varying the values of several important design parameters. The performance evaluations used in this study are based upon a mean-squared-error distortion measure and certain applicable rate-versus-distortion expressions due to Pearl et. a l . [3]. Also in Chapter 3 i s a summary of the work of Habibi and Wintz [9], included for the following reasons: (1) Theirs is the only study which compares the performance of the three linear transformations most frequently used in transform coding research, and (2) An understanding of the theoretical technique which they used to estimate the performance'of transform coding systems helps one to appreci-ate the simplicity and usefulness of the method which was used in this thesis. In Chapter 4, an objective measure of image distortion proposed by Stockham [4] is investigated by comparing i t to the mean-squared-error distortion criterion. A procedure i s developed for estimating the value of the new measure for images which have been transform coded. The results are presented in tabular form for both one- and too-dimensional Fourier and Had-amard transforms. Finally, Chapter 5 contains a summary of the thesis and an outline of possible directions for future research. II. MONOCHROMATIC IMAGE CODING BY LINEAR TRANSFORMATION AND BLOCK QUANTIZATION 2.1 Introduction- Why Transform Coding? Since analog sources have i n f i n i t e entropy and practical channels have f i n i t e capacity, analog source outputs cannot be transmitted with arb-i t r a r i l y small error. This fact, embodied in the converse to the noisy channel coding theorem [10], motivated studies of how to e f f i c i e n t l y approx-imate analog sources with f i n i t e entropy discrete sources in such a way that tolerable distortion occurs relative to an appropriate f i d e l i t y c r i t e r -ion. The simplest and most widely employed method to accomplish the above stated task is to sample the analog source output and then to quantize each sample using a uniform quantizer. The resultant signal i s a pulse-code-modulated \u00a3P.CM) .version,.of ...the ..analog signal,. In the case of a monochromatic picture source, for which the brightness signal varies with too spatial variables and time, i t has been found that sampling at 15 to 60 frames per second and 500 x 500 samples per frame using 16 to 256 uniformly spaced quantizing levels per sample point yields PCM pictures with quality comparable to that of commercial television pictures. The channel capacity required to transmit PCM pictures of this 7 8 quality is seen to be about 10 to 10 bits per second which i s undesirably large [11]. Thus, although digit i z i n g the analog picture source output in the above manner does yield a f i n i t e entropy approximation, the approximation is inefficient. S t a t i s t i c a l relationships between neighbouring samples remain to be exploited. In addition, i t is expected that psychovisual properties can be ut i l i z e d to further reduce the amount of information re-quired to adequately represent the source output. That this should be poss-ible follows from the fact that the digitization scheme seeks to approximate the analog brightness values as closely as possible at each sample point. This implies a sample-by-sample error criterion wThich, as Wilder [8] pointed out, is not subjectively relevant since the eye does not operate on a point-by-point basis. Methods have been studied [12] to reduce the information rate of digitized analog sources below that required for PCM without employing the inter-sample correlations. These methods require either sophisticated coding schemes such as the Huffman procedure or non-uniform quantization in order to obtain relatively small rate decreases. As- alternatives to PCM, several techniques have been proposed [ 7 ] . -'Atnes.-g-'-t-hem, -one technique -that- has-'been -receiving-much- -attention recently [6] is coding by linear transformation and block quantization. As stated above, simply digitizing an analog source output yields an inefficient f i n i t e entropy approximation to the analog source. Linear transform coding seeks to correct this inefficiency by eliminating some of the redundancy contained in the discrete version of the original source. In addition, the block quantizer can be designed in accordance with known properties of human vision to fur-ther enhance the performance of the transform coder. The remainder of this chapter i s devoted to explaining the opera-tion of a generalized transform coding system for source encoding picture data. In Chapter 3 the performance of this system w i l l be studied. 2.2 A S t a t i s t i c a l Model for Motion Pictures Before describing the generalized transform coding system, a few preliminary observations are in order concerning the s t a t i s t i c s of the picture data upon which the system w i l l operate. Franks [13] derived an expression for the power spectral density of the e l e c t r i c a l process gener-ated by linear sequential scanning of a rectangular portion of an i n f i n i t e , two-dimensional random picture. He found that the power spectral density of a sampled picture source could be expressed as a product of three factors, characterizing separately the influence of point-to-point, line-to-line, and frame-to-frame correlation. In addition to being separable in space and time, the autocorrelation function for his random picture model had an exponential form in each dimension. To express these ideas in mathematical form, let f(x,y,t) represent the picture brightness at the point (x,y,t). Then, the autocorrelation function determined by Franks takes the follox^ing form: R(Ax, Ay,At) = E{f (x,y, t) f (x' ,y', t') } = a2p ~ I A X ' p \" l ^ l p \" l A t l (2.1) x y r 2 2 where Ax = x-x', Ay = y-y', At = t - t ' , a - E{f (x,y,t)}, E is the expect-ation operator, and p^, p^, and p^_ are the correlation coefficients of brightness between adjacent picture elements in the x-, y-, and t-dimension, respectively. Experimental measurements by Kretzmer [14] placed p f c in the range 0.80 to 0.86 for typical television material. Typical p and p x y values, as measured by Kretzmer, were slightly higher. Of course, the corre-lation coefficients depend upon the content of the picture material. A random f i e l d having an autocorrelation function of the form given i n equation (2.1) is known as a wide-sense stationary Markov f i e l d , in addition to the 7 Markov assumption, we w i l l also assume the picture data to be Gaussian and zero-mean. Actually, the assumption that f(x,y,t) is zero-mean is implicit in (2.1). Given that f(x,y,t) i s not zero-mean, a simple change of scale can make i t so. The primary motivation behind using this model, apart from i t s agreement with certain experimental measurements [14] on picture data, i s it s analytical tractability. In particular, the separability of the auto-correlation function is a powerful feature that permits a multi-dimensional analysis of the generalized transform coding system. The assumption of Gaussianity w i l l allow other analytic simplifications in certain theoretical evaluations to follow. 2.3 The Generalized Transform Coding System The system depicted in Figure 2.1 i s a generalized transform coding system. The system is generalized in the sense that i t can operate on the digitized source data in blocks of any desired dimension up to the dimension of the continuous function. In the case of monochromatic motion pictures, the maximum dimension is three since f(x,y,t) prescribes brightness as a function of two spatial variables and time. Past studies [6] have only considered transform coding systems which blocked the picture data in one-and two-dimensional blocks for encoding. This was a natural consequence of the fact that the digitization of a continuous picture is performed by a flying-spot scanner or similar sequential device that generates picture samples from one complete frame, scanning a line at a time, before proceeding to scan the next frame. To obtain three-dimensional blocks of digitized picture data would require storing previous frames. Although such a proced-ure i s prohibitively expensive today, future technological innovations i n GITIZER \\ BLOCK ORGANIZATION u LINEAR TRANSFORM v = Au ENCODER v=0(v ) S a w j DIGITAL CHANNEL -A CONVERTER u= A v INVERSE I v = Q\/( v') LINEAR TRANSFORM Figure 2.1 Generalized transform coding system co 9 the area of random access, high density storage devices could make three-dimensional transform coding feasible. For this reason, and because the analytical tools exist to handle the three-dimensional case, transform coders of one-, two-, and three-dimensions w i l l be considered here. In order to isolate the source encoder and measure i t s effect upon the system's performance, i t i s convenient to conceptually partition the transform coding system as shown in Figure 2.1. The digitizer uses sampling and quantization to convert the con-tinuous source function f(x,y,t) into a three-dimensional array of discrete sample values, f'(x.,y.,t, ). 1 j k. The block organization unit partitions f' into sub-arrays of spec-i f i e d dimension and size, N, and then rearranges the elements of the sub-arrays to form one-dimensional vectors, u, of length N. o The,.linear -.transform and .r.the. .encoder ..following it-comprise the source encoding section. The transform multiplies the vector, u, by the matrix, A, to yield a transform vector, v. The results of Huang and Schul-theiss [5] suggest that an appropriate choice of the matrix, A, could result in the elements of v being uncorrelated. Because of the assumed Gaussianity of the original samples and the linearity of the matrix operation, the ele-ments of v would then also be s t a t i s t i c a l l y independent. If the transformed samples contained in v are s t a t i s t i c a l l y independent, the task of the encoder is significantly simplified. To understand why this is so, consider the operation of the encoder. The encoder quantizes the elements of v and ass-igns coding bits to each of them in preparation for transmission over the d i g i t a l channel. This process can be viewed as a mapping, (\">(\u2022)> of the N-dimensional space in which v is defined into the N-dimensional space in which v 1 is defined. Since the elements of v' are quantized versions of the \u2022elements in v, the operator Q(0> is seen to map the v-space into i t s e l f . In general, when the elements of v are correlated, such a mapping, i f opti-mum, requires knowledge of a l l N components of v for determination of each component of v'. But, i f the components of v are independent, then the i 1 * * 1 element of v' can be determined from knowledge of the i * ^ 1 element of v alone, ignoring the other N-1 elements of v. Thus, a linear transformation which decorrelates the samples contained in v serves not only to eliminate the inherent redundancy i n the digitized image samples but also to simplify the computational task of an optimum encoder unit significantly. For our purpose, the d i g i t a l channel is restricted to performing an operation representable as an identity matrix. At the receiving end of the d i g i t a l channel, the decoder functions to recover v' as accurately as possible under a specified error criterion. \u2022\u2022Prom--the 'restriction -of - ~lrtie--,above--'
given by: $ u = E{uu } (2.2) where \"T\" denotes a transpose. That i s , the columns of A are the vector solutions, x, of the matrix equation: | of $^ are, by d e f i n i t i o n , equal to the variances of the transform c o e f f i c i e n t s , (A.36) states the additional fact that the matrix, \u00a7 , can be obtained by appropriate trans-form operations upon the rows and columns of the data covariance matrix, $ . x Equation (A.36) was used to compute the Fourier and Hadamard transform c o e f f i c i e n t variances. The Karhunen-Loeve transform variances, however, were not computed i n this manner. The reason for this i s that before the KL transform can be performed, (A.7) must be solved to obtain the eigenvectors. Siiyce solution of (A.7) yields the eigenvalues as wel l as the eigenvectors and since the eigenvalues are the KL transform c o e f f i c i e n t variances, there was no need to use (A.36). -1 * Since, by d e f i n i t i o n , A = A for the Fourier transform while .A ^ = A for .the Hadamard transform, (A.36) becomes * | = A$ A*| , \u00a3=0,1,...,L-1 (A.37) y . \u00a3 \u00a3 x \u00a3 \u00a3 ' for the Fourier case, and * J = A* A| , \u00a3=0,1, . . .,L-1 (A.38)-for the Hadamard case. (A.38) i s simply the two-dimensional Hadamard transform of the covariance matrix $ . (A.37) i s implemented by Fourier transforming each column of \u00a7 x and then Fourier transforming each row of the resultant matrix to obtain $ . y A.6 Software Implementations A.6.1 The Discrete. KL Transform The linear transformations discussed above were used i n the 73 calculation of (A.36). However, the Karhunen-Loeve transform c o e f f i c i e n t variances were found by determining the eigenvalues of $ , the covariance matrix of the data vector, x. In order to solve (A.7), advantage was taken of the fact that $ i s , by d e f i n i t i o n , a symmetric matrix. A FORTRAN-callable subroutine, SYMAL[33], which calculates the eigenvalues of a symmetric matrix was used to find the variances of one-dimensional KL transform c o e f f i c i e n t s . The subprogram, KLVAR1, written to control the process of obtaining the KL variances, i s l i s t e d i n section A.6.4. A.6.2 The Discrete Fourier Transform The subprogram, FVAEl, was written to calculate the variances of one-dimensional Fourier transform c o e f f i c i e n t s according to equation (A.37). This subprogram, l i s t e d i n section A.6.5, c a l l s the l i b r a r y subroutine F0UR2 [34], which i s a fast Fourier transform routine [18] [35] [36]. ~A\/6 .3 \"The H a d am a r'd\" \"T r an s\"f o rm The subroutine, HVAR1, was written to compute the variances of one-dimensional Hadamard transform c o e f f i c i e n t s according to equation (A.38). This subprogram, l i s t e d i n section A.6.6, c a l l s the subroutine HAD2, which i s a too-dimensional Hadamard transform routine. HAD2, which i s also l i s t e d i n section A.6.6, i s a FORTRAN IV implementation of the fast Hadamard transform algorithm described i n [16]. A.6.4 L i s t i n g of the Subprogram KLVAR1 SUBROUTINE KLVARWS ,EX t N, M, A ) C T H I S S\/R COMPUTES THF V A R I A N C E S OF THE L - D I M . KL TRANSFORM C C O E F F I C I E N T S US TNG THE L I B R A R Y S\/R ' S YM AL 1 . THE ARGUMENTS C OF THE S\/R KLVAR1 ARE: S,THE VECTOR IN WHICH THE V A R I A N C E S C ARE RETURNED; EX, THF C O R R E L A T I O N PARAMETER USED TO G F N E R -C A T E THE ELEMENTS OF THE S Y M M E T R I C C O V A R I A N C E M A T R I X OF THE C DATA VECTOR; N,THE LENGTH OF THE DATA VECTOR AND HENCE T E E C ORDER OF THE C O V A R I A N C E M A T R I X ; M=N* ( N+l) fl I S THE LENGTH C OF THE ARRAY A; A,A L - D I M . ARRAY C O N T A I N I N G THE ELEMENTS C OF THE SYMMETRIC C O V A R I A N C E M A T R I X ARRANGED AS R E Q U I R E D PY 74 C THE S\/R SYMAL. REAL S ( N ) , A(M) C FORM THF ARRAY A USING THE E X P O N E N T I A L A U T O C O R R E L A T I O N F U N C T I O N . DO 1 1 = 1, N 0 0 1 J = 1. 1 1 K={ I - L ) * I \/ 2 +J A ( K ) = E X P ( - E X * IABS ( I - J ) ) 1 CONTINUE C NOW F I N D THE E I G E N V A L U E S OF A. C A L L SYMAL* A ,N, S , I E RROR\u00bb0 ) 1F{ TERROR .EO.O ) GO TO 3 W R I T E ( 6 , 2 ) I ERROR 2 F 0 R M A T ( \u2022 \u00ab,' SOMETHING WRONG . I ERRO R \u2022=\u2022 , I 2 ) STO P 3 RETURN END A.6.5 L i s t i n g of the Subprogram FVARl S U B R O U T I N E FV AR I ( S, R f A t GAMMA , I .) C T H I S IS A S\/R TO COMPUTE THE V A R I A N C E S OF THE 1- D I M . FOURIER C TRANSFORM C O E F F I C I E N T S O B T A I N E D FROM THE XSFORMAT TON OF A DATA C VECTOR OF L E N G T H I . THE DATA I S ASSUMED TO HAVE AN E X P O N E N T I A L .C .AUTOCORRELATION EUN.CT ION WITH C O R R E L A T I O N PARMET.ER .., GAMMA . R C I S THE C O V A R I A N C E MATRIX OF THE DATA. A I S A WORKING ARRAY ANO C S IS THE ARRAY IN WHICH THE V A R I A N C E S ARE R E T U R N E D . T H I S S\/R C C A L L S THE L I B R A R Y S\/R 'FOUR2\u00ab , A F A S T F O U R I E R TRANSFORM P A C K -C A G E . \u2022 REAL Si T ) COMPLEX R ( I , I ) , A { I ) I N T E G E R D I M ( 1 ) - D IM ( L ) = I C GENERATE THE C O V A R I A N C E M A T R I X ,R. DO 1 J = l , I DO 1 K= 1, I 1 R { J , K ) = E X P ( - G A M M A * I A B S { J - K ) ) \u2022 C TRANSFORM EACH COLUMN OF R. DG 4 K = l , I DO 2 J = l , l 2 A ( J ) = R ( J , K ) C A L L F O U R 2 ( A , D I M , 1 , - 1 , 1 ) DO 3 J= 1 , I 3 R ( J , K ) = A { J ) 4 CONTINUE C NOW I N V E R S E XSFORM EACH ROW OF THF MTX. OF XSFORMEC COLUMNS. IP= 1\/2 + 1 t 2=IP\u20141 DO 7 J = 1, I P DO 'S K - 1 , I 5 A ( K ) = R { J , K ) C A L L FOUR 21 A , D I M , 1 , 1,1) 75 0 0 6 K = l , F 6 R ( J , K) = A { K ) 7 CONTINUE C THE V A R I A N C E S D E S I R E D ARE THE DIAGONAL E L E M E N T S OF THE C TRANSFORMED ARRAY ,R. DO 8 J = l , IP 8 S ( J ) = R E A L ( P ( J t J ) ) DO 9 J = 2 , I 2 K=I-J+2 9 S ( K > = S ( J ) RETURN END A. 6.6 Listing of the Subprograms HVARl and HAD2 SUBROUTINE HVAR1{S,R,GAMMA*H1,H2,K) C T H I S I S A S\/R TO C A L C U L A T E THE V A R I A N C E S OF THE 1 - D I M . C HADAMARD TRANSFORM C O E F F I C I E N T S O B T A I N E D BY TRANSFORMING C A DATA V E C T O R . THE DATA I S ASSUMED TO HAVE AN E X P O N E N T I A L C A U T O C O R R E L A T I O N F U N C T I O N WITH C O R R E L A T I O N PARAMETER , GAMMA. C THE DATA VECTOR HAS L E N G T H K. AS HAVE THE ARRAY ,S, I N WHICH C THE V A R I A N C E S ARE RETURNED AND HI AND H2 ,2 WORKING A R R A Y S . C R I S THE C O V A R I A N C E MATRIX FOR THE DATA V E C T O R . T H I S S\/P C C A L L S THE S\/R 'HA02' WHICH C O N T A I N S A F A S T HADAMARD TRANSFORM -C P A C K A G E , R E A L SIK) i R ( K , K) \u00bb HI (K.) , H2 I K } C G E N E R A T E THE C O V A R I A N C E A R R A Y ,R. DG 1 1 = 1\u00bb K DO 1 J = 1 , K 1 R ( 11 J )= EXP (-GAMM A*( TABS ( I - J ) ) C PERFORM A 2 - D I M . HADAMARD TRANSFORM OF R. C A L L HAD 2 { R , K ,H1 \u00bbH2 ) C THE V A R I A N C E S A P E THE DIAGONAL ELEMENT'S OF THE TRANSFORMED R. DO 2 1=1 , K 2 S ( I ) = R U t I ) RETURN E ND SUBROUTINE H A 0 2 ( D , N , H 1 , H 2 ) C T H I S IS A S\/R TO COMPUTE THE 2-DIM. D I S C R E T E WALSH C TRANSFORM OF DATA STORED IN THE ARRAY 'D*. THE C TRANSFORMED DATA I S RETURNED I N THE ARRAY D. 0 MUST ' C BE SQUARE WITH D I M E N S I O N ANY POWER OF 2 FROM 2 UP TO. C 2 5 6 . REAL D ( N , N ) , H 1 ( N ) , H 2 ( N ) COMMON\/ HA C.T\/T7 ( L 28 ) , T 6 ( 64 ) , T 5 I 3 2 ) , T4( I. 6 ) , T3( 8 ) , T 2 ( 4 ) , T 1 ( 2 ) C PERFORM A 1-DIM. HAD\u00bb TRANSFORM CN EACH ROW OF D. DO 20 1=1,N 76 DC 5 J = l , N 5 H 1 ( J ) = D ( I , J I CALL H A D K H1,N,H2\u00bb \u00a3125) C THE TRANSFORM I S RETURNED I N THE H2 V E C T O R . DO 10 J = 1 , N 10 D{ I , J )=H2{ J ) 2 0 . CCNTTNUF C N E X T , TRANSFORM EACH COLUMN OF THE R E S U L T A N T MTX. DO 30 J = 1 , N C A L L HA 01 ( D U , J ) , N,H2 f t l . 2 5) DO 25 1 = 1, N 25 0 ( 1 , J ) = H2( I )\/N 30 C C N T I N U E R ETURM 12 5 W R T T E ( 6 , 1 2 7 ) 127 F 0 R M A T( 5 'ERROR I N H A D l ' J STOP END S L 6 R 0 U T I N E HAD1 (D,N,H,*) C T H I S S\/R COMPUTES THE 1-DIM. TRANSFORM OF THE DATA I N C THE ARRAY D OF LENGTH N . THE TRANSFORM IS RETURNED C I N THE ARRAY H,ALSO OF LENGTH N. T H I S S\/R I S AN C I M PL E i vE NT AT I ON OF THE FAST HADAMARD TRANSFORM AS C P U B L I S H E D BY PRATT TANDREWS AND K A N E . REAL D ( M ) , B (N ) COMMON\/HA DT\/T7 ( 1 2 8 ) , T6 ( 64 ) , T 5 ( 32 ) f T 4 ( 16 ) , T 3 (-8 ) \u00bb T2 ( 4) , T H 2 ) \u2022IF <-t-M\u00ab.t?Q, \u2022?:\u2022) \u00bbG-P \u2022'TO-'-^ O H l l )= . S E Q S ( D , N ) H ( 2 > = S E 0 1 ( T l ) \u2022IF ( N . E Q . 4 ) G 0 TO 95 . H (3 )= SEQ2{ T2 ) H ( 4 ) = S E Q K T l ) I F ( N . E C 8) GO TO 100 H ( 5 ) = S E Q 3 ( T 3 ) H ( 6 ) = S E Q K T l ) H ( 7 ) = S EQ 2 { T 2 ) H (3) = S E C 1 1 T 1 ) I F ( N .EQ. 161 GO TO 5 0 \u2022 H ( 9 ) = S E Q 4 C T 4 ) 1 . H ( 1 0 ) = S E Q l ( T l ) H ( 11) = S E 0 2 1 T 2 ) H (12 )= S E C T ( T 1 ) H ( 1 3 ) = S E Q 3 ( T 3 ) H( 1 4 ) = S E Q K T l ) H U 5 ) = S F Q 2 ( T 2 ) H ( 1 6 ) = S E G 1 ( T l ) I F C N . E Q . 16.) RETURN I F ( N . E Q . 3 2 ) GO TO 60 H< 1 7 ) = S E G 5 ( T5) 2 H ( 1 3 ) = S E 0 1 ( T l ) H ( 1 9 ) = S E C 2 ( T 2 ) H( 2 0 ) = S E Q K T l ) H ( 2 l ) = S E Q 3 ( T 3 ) H ( 2 2 ) = S E Q 1 ( T l ) H ( 2 3 ) = S E 0 2 ( 1 2 ) H (2 4 ) = S E Q1 ( T 1 ) H ( 2 5 ) = S E C 4 ( T 4 ) H( 26 5= S E Q l . ( T l ) H (2 7 ) = S E C2 IT 2 ) H { 2 8 ) = S E 0 1 ( T l ) H ( 2 9 ) = S E Q 3 ( T 3 ) H (3 0) = SEG1 ( T l . ) H { 31 ) --- SE 0 2 ( T 2) H ( 3 2 ) = S E Q K T l ) I F (N.\u00a30.32.) RETURN I F ( N . E Q . 6 4 ) G 0 TO 70 H ( 3 3 ) = S E06