Walsh-Like Functions and Their Relations
Total Page:16
File Type:pdf, Size:1020Kb
WaIsh-like functions and their relations B.J. Falkowski S.Rahardja Indexing terms: Discrete transforms, Walshfunctions, Haar functions form except that the absolute value of the output is Abstract: A new discrete transform, the ‘Haar- taken before applying to the next stage. However, the Walsh transform’, has been introduced. Similar to rapid transform is nonorthogonal and does not have an well known Walsh and non-normalised Haar inverse. Another modified transform is based on a transforms, the new transform assumes only +1 hybrid version of the Haar and Walsh transforms [2, and -1 values, hence it is a Walsh-like function 111. This transform is derived from different linear and can be used in different applications of combinations of the basis Haar functions with an digital signal and image processing. In particular, appropriate scaling factor. Such a combinatioii of basis it is extremely well suited to the processing of functions have been found advantageous for feature two-valued binary logic signals. Besides being a selection and pattern recognition. The rationalised ver- discrete transform on its own, the proposed sion of this transform has also been introduced [12]. transform can also convert Haar and Walsh Another family of orthogonal functions related to the spectra uniquely between themselves. Besides the Walsh and Haar functions has been introduced [13-15]1. fast algorithm that can be implemented in the They are called bridge functions and can be generated form of in-place flexible architecture, the new by copy theory originated from work by Swick [16] for transform may be conveniently calculated using Walsh functions. With the introduction of the broad recursive definitions of a new type of matrix, a family of bridge functions, both Haar and Walsh func- ‘generator matrix’. The latter matrix can also be tions can be considered as the members of the same used to calculate some chosen Haar-Walsh group. Similarly to our transform, the bridge functions spectral coefficients which is a useful feature in share the good properties of both Haar and Walsh sys- applications of the new transform in logic tems. synthesis. Many authors have considered the mutual relation- ships between Haar and Walsh functions. Kaczmarz and Steinhaus [17] defined Walsh functions in Paley order through the linear combination of normalised 1 Introduction Haar functions by means of recursive equations. The same relations in the form of universal recursive equa- Discrete orthogonal Walsh-like transforms such as the tions operating on submatrices which translate Walsh- Walsh transform, the Haar transform (HT), and others Paley functions to Haar functions and vice versa have like the discrete-cosine transform, slant transform and been given in [7, 81. Walsh functions in Kaczmarz Fourier transform, have been used in image processing, ordering can also be generated through linear combina- speech processing, pattern recognition and communica- tions of Haar functions. Such forward and inverse rela- tion systems [l-71. Each of these orthogonal transforms tions for Kaczmarz ordering in a submatrix form have advantages and disadvantages for various applica- obtained through Walsh-Paley transforms with reor- tions. Walsh and non-normalised Haar [4, 5, 8, 91 derings have been shown [18, 191. Ways of obtaining (rationalised [2]) orthogonal functions assume values Haar functions row by row from three Walsh orderings +I and -1 only, and with such, the computation of the Hadamard, Kaczmarz and Paley [19] and also from transforms requires arithmetic addition and subtrac- Rademacher functions [9] have been developed. From tion. Owing to this fact, they yield the most economical relations between the submatrices of Haar and Walsh- computational costs and have been used efficiently in Kaczmarz transformations (named wrongly in [ 181 as applications involving two or more valued signals, situ- Walsh-Hadamard transforms), Fino [18] showed a ations that happen in digital signal processing of logical simultaneous calculation of Haar and Walsh-Kacz- signals and in the design of multirate digital signal marz spectral coefficients with the aid of reorderings. processing systems [l, 3-10]. However, the presented method is unable to calculate a Two modified transforms related to Walsh functions single spectral coefficient. have been known: rapid and Hadamard-Haar trans- In this paper, a transform that maps the Walsh-Kac- forms [2, 51. The flow graph for the rapid transform is zmarz spectrum into the Haar spectrum and vice versa identical to that of the fast Walsh-Hadamard trans- is introduced. The new transform is based on the com- bination of Walsh and Haar basis functions. The new 0 IEE, 1996 Haar-Walsh transform (HWT) is unique and has all IEE Proceedings online no. 19960760 the advantages of known Haar and Walsh transforms. Paper first received 12th January and in revised form 26th June 1996 The fast HWT may be simply derived by removing the The authors are with Nanyang Technological University, School of Elec- fast Haar transform from the butterfly of the fast trical and Electronic Engineering, Nanyang Avenue, Singapore 639798 Walsh-Paley transform. However, the transform is IEE Proc-Vis. Image Signal Process., Vol. 143, No. 5, October 1996 279 unique and may operate directly not only on Walsh of the data sequence may be expressed in the matrix and Haar spectra but also on arbitrary binary/ternary form data. Moreover, with the help of the novel generator FWK E WK[N]f (3) matrix introduced in this paper, one is able to calculate where WKIMis the Walsh-Kaczmarz transformation a single spectral coefficient of fast HWT. This is in matrix of order N. high contrast to previous developments [5, 8, 17-19]. We refer to the transformed data sequence as the dis- The HWT may be used in applications where tradi- crete transformation's spectrum, and its elements are tional Haar and Walsh transforms have been used, for example in image processing and digital signal process- known as the spectral coefficients. If WKCwin eqn. 3 is ing of logical signals. replaced by WPCNor HLw, then the resulting trans- There are a few reasons for introducing this trans- formed vector, denoted as FWPor FH, will contain the form. First, besides having all the advantages of exist- Walsh-Paley and Haar spectral coefficients, respec- ing discrete transforms, the new transform can serve tively. The Haar-Walsh transform (HWT) is derived another purpose: the forward HWT can transform from the combination of Walsh and Haar functions. Let TrN denote the HWT matrix of dimension N x N, spectral data from the Haar domain to the Walsh- where N = 2n. Then the forward HWT matrix TrNis Paley domain, and its inverse does exactly the opposite. The important application of the new transform makes defined as all three spectral representations available at any stage of the digital signal processing design process, thus (4) allowing an engineer to choose the form that is most suitable for a given application. An efficient way of cal- where Trll = WPCl1= 1. Trw= Tml-' when Trw-l is culating the transform, using the generator matrix con- made non-normalised. It should be noted that for non- cept has also been developed. Different new operators normalised basis functions the matrix TlW can be on generator matrices as well as evaluation of the com- applied directly to non-normalised Haar functions, and plexity calculating the HWT by using such matrices in such a case, the single matrix Trnldescribes the same have been provided. The existence of a fast flow dia- relationship between basis Haar and Walsh functions gram has substantially reduced the complexity of the which was given by the set of recursive equations. new transform. Another important property of the new These equations were first illustrated by Kaczmarz [ 171 transform is that the fast flow diagram of the forward and also through relations on submatrices [5, 8, 18, 211. HWT and inverse HWT are identical. Furthermore, the implementation of the new transform in hardware is 3 Definition and pro possible. The structure permits in-place architecture which reduces components' requirements. In this section, the basic definitions and properties of a generator matrix are presented. New matrix operations asic definitions of Walsh-like functions useful for the computation of the generator matrix are introduced. The generator matrix is used in the compu- In many applications of Walsh-like functions, represen- tation of spectral coefficients of the HWT. It is also tations of the orthogonal functions in matrix form are possible to compute a chosen spectral coefficient of the generally preferred. There are four commonly cited transform. We define G(") as a generator matrix, which Walsh orderings: Hadamard, Kaczmarz, Rademacher is a rectangular matrix of dimension 2m-1 x 2"'-1 with and Paley [2, 4-7, 9, 15, 20, 211. For the Walsh-Kacz- elements (1, -1} represented as {+, -} respectively, mar2 [4, 5, 171 transformation matrix, they are usually such that the scalar product of any two columns of generated by reordering the rows of a class of Had- G(") is either 0 or 2". The basis vector of the generator amard matrices [1, 2, 4-9, 20-221, which are known to matrix denoted as U is a 2 x 1 column vector defined as be conveniently generated by Kronecker products. Let WHfM and Hrnl be N x N matrices defining Walsh- Hadamard and the normalised Haar transforms [+I accordingly, and N = 2". Then [l, 3-91, The generator matrix G(") has a recursive structure G(") = G("-I) 2 i 0 2m-2 G(m-1) a 21 [ (5) where m 2 2, and the matrix operators o and a are defined as follows. Let A be an Y x c matrix. The matrix operator o of the matrix A with a scalar k is the partitioned matrix B of dimension rk x c such that its first r rows are exactly the same as the rows of matrix where WHC1]= Hrll= [l].