# Thread: Fundamental question in image transformation and compression

1. ## Fundamental question in image transformation and compression

Hey All,

When we apply haar discrete wavelet transformation to an image we should get four quadrants LL, LH, HL and HH; where LL represents the blurred low-frequency version of the original image. So when I do it with MATLAB using the dwt2 I get it (please see DWT2.png attached). While when I perform linear algebra transformation using the following formula HIH^T; where H is the transformation matrix, I is the original input image and H^T is the transpose of H, I don't get similar results to the dwt2 (please see Transformation.png attached) method which is about high and low pass filtering instead of matrix multiplication. I don't know what's causing such a difference and can't relate between the two!  Reply With Quote

2. Originally Posted by Jessy When we apply haar discrete wavelet transformation to an image we should get four quadrants LL, LH, HL and HH; where LL represents the blurred low-frequency version of the original image. So when I do it with MATLAB using the dwt2 I get it (please see DWT2.png attached). While when I perform linear algebra transformation using the following formula HIH^T; where H is the transformation matrix, I is the original input image and H^T is the transpose of H, I don't get similar results to the dwt2 (please see Transformation.png attached) method which is about high and low pass filtering instead of matrix multiplication. I don't know what's causing such a difference and can't relate between the two!
You are confused. The wavelet transformation Matlab implements is of course the tensor product of two one-dimensional transformations, plus coefficient reordering. And not the application of H and its transposed. That is: What matlab does is that it first applies a one-dimensional transform on all columns of the image, thus a multiplication of all column vectors of the image with H. It then applies H again, but on the row-vectors of the image. (This is called the tensor product of the transformation H with itself, i.e. H \otimes H). Note that this is something fundamentally different than the application of H H^T! As last step, matlab reorders the coefficients. Typically, the Haar wavelet is understood as generating the low-pass at even sample positions, and the high-pass as odd sample positions. A somewhat more convenient representation is to sort all low-passes to the left (or top) and all high-passes to the right (or bottom). Then you get the typical "window cross" you see matlab generates.  Reply With Quote

dwt image compression, energy-compaction, filtering, matrix multiplication 