The WHT is known for its important computational advantages. For instance, it is a real (not complex) transform, it only needs addition and subtraction operations and if the input signal is a set of integer-valued data (as in the case of digital images), it only uses integer operations. Furthermore, there is a fast algorithm for Walsh transforms proposed in [23]. The transform matrix, usually referred to as Hadamard matrix, can also be saved in the binary format resulting in the memory requirements reduction [24]. Moreover, hardware implementation of WHT is rather easier than other transforms [25].
Inspired by oriented/multi-band structures of Gabor filters [26], novel DWHT is recommended by Monadjemi and Moallem [21]. The algorithm of DWHT is capable of extracting texture features in different directions and sequency scales. As mentioned before, DWHT keeps all the advantages of WHT. Furthermore, the DWHT preserves the directional properties of texture. The DWHT can be defined as
(10)
In which, H is sequency-ordered Hadamard (SOH) matrix [25, 27] where the rows (and columns) are ordered according to their sequency. In other words, while there is no sign of change in the first row, there are n – 1 sign changes in the n th row. As an example, see Figure 2 in which SOH matrix is shown for a rank is 3 (or 8 × 8).
In fact, for a Hadamard matrix, H is always equal its transpose, H′. In this article, we use the second rank of Hadamard matrix (4 × 4).
In Equation (10), Aα, α = {0°, 45°, 90°, 135°}, is the rotated version of A. The rotation is applied to each element in the top row of the image matrix. At border pixels, corresponding elements are used from a repeated imaginary version of the same image matrix (i.e., image is vertically and horizontally wrapped around).
The full rotation set where α = {0°, 45°, 90°, 135°} can be defined for a simple 4 × 4 image matrix as follows
(11)
Note that this is not an ordinary geometrical rotation. For example, we create the rows of A45° image by considering the pixels that sit in a 45° direction in the image A0° and so on. This means that the resulting horizontal rows capture the information at the specified angles. In fact, it looks more like a pixel rearrangement rather than a geometrical rotation.
This rotation means that after applying the DWHT transform we need only extracting the row sequency information, corresponding to the direction used. As Equation (12) shows, the operation DWHT
α
(A) = A
α
× H′ is computed and gathers the sequency information of input matrix rows into transformed matrix columns. Hence, the same half transform for a rotated matrix (e.g., A45°) will give us the sequency information of pixels with a 45°-orientation, again into the columns of transformed matrix. In transfer matrix, the number of sign changes in each column of the sequences is the same and it increases from left to right. In other words, the transformed matrix columns from left to right correspond to the lower to higher sequency elements.
(12)
In the Hadamard-based feature extraction procedure, we exploited the mentioned rotation and transformation for four different orientations:
(13)
Since the relative arrangement of pixels is essential in texture analysis [28], sequency-based features which represent the number of zero-crossing of pixels in a particular direction can convey a notable amount of textural information. We can measure the DWHT energy in DWHT
α
(A) as the absolute value of the DWHT output along each column. Columns can be divided into a few groups that represent different sequency bands. Then the statistics of each band can be extracted to configure a feature vector with reasonable dimensionality. So, a DWHT output and feature vector can be defined as
(14)
where H is the transform’s output matrix, N is the matrix size, F is the feature vector, M indicates the applied statistical function, and b is the desired sequency band. Again, log2or semi-log2bandwidth scales could be applied. However, we mostly use a simpler division for a three-band and a division for a four-band feature sets. For example, in three-band division of four-column transform matrix, the band b 1 is determined by a first column sequency, the band b 2 is determined by a second column sequency, and the third and fourth columns generate band b 3. For example, the sequency bands of DWHD0° (A) are defined as follows:
(15)