In-Place Computation of the Discrete Haar Wavelet Transform By Madeline Schuster and Sam Van Fleet Target Audience Our project is focused on improving an image compression method for grayscale images. Image compression is a process that encodes an image in bits; this means each pixel is represented by strings of binary code composed of bits (0s or 1s). An ideal method of image compression reduces the number of total bits needed, and thus reduces the file size, making the image file easier to store or send electronically. There are two types of image compression: lossy and lossless. Lossy compression is a process that does not maintain the quality of the original image. The image will still look recognizable, and may not even appear different from the original file, but data from the original file is altered and the quality of the image is technically lower. Lossless compression is a process that does maintain the quality of the original image. The file size may be smaller, but none of the data from the original file is changed. Our project is considered with lossless compression, but could be expanded with further work to lossy compression. Several image compression methods utilize Huffman coding. 1 Without Huffman coding, each pixel in a grayscale image is assigned a byte--a byte is 8 bits, where each bit is a 0 or a 1. This means that an image with 200 pixels would be composed of 200 bytes or 1600 bits. Huffman coding assigns each pixel a number of bits based on how frequently it occurs. If the same gray pixel occurs more often, the number of bits encoding that pixel is smaller. However, this method is only very efficient if a picture contains a large number of the same color pixels. For images with many uniquely colored pixels, Huffman coding does not reduce the size of the image file by any significant amount. Problem Statement Image compression is able to be done in a variety of ways. The method of image compression we are interested Utilizes the Haar Wavelet Transformation (HWT) to improve the efficiency of Huffman Coding. Let A be a matrix with numbers 0 to 255 assigned to each pixel of an image, 0 representing black and 255 representing white. Then the HWT can be written as WAW T , where W is a matrix the same size as A. The HWT matrix we use for our research looks like the following: 1 JPEG uses an embellished version of Huffman Coding.
11
Embed
In-Place Computation of the Discrete Haar Wavelet Transform By … · 2019-10-01 · Discrete wavelet transformations: An elementary approach with applications. Hoboken, NJ: Wiley-Interscience.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
In-Place Computation of the Discrete Haar
Wavelet Transform
By Madeline Schuster and Sam Van Fleet
Target Audience
Our project is focused on improving an image compression method for grayscale images. Image
compression is a process that encodes an image in bits; this means each pixel is represented by
strings of binary code composed of bits (0s or 1s). An ideal method of image compression
reduces the number of total bits needed, and thus reduces the file size, making the image file
easier to store or send electronically.
There are two types of image compression: lossy and lossless. Lossy compression is a process
that does not maintain the quality of the original image. The image will still look recognizable,
and may not even appear different from the original file, but data from the original file is altered
and the quality of the image is technically lower. Lossless compression is a process that does
maintain the quality of the original image. The file size may be smaller, but none of the data
from the original file is changed. Our project is considered with lossless compression, but could
be expanded with further work to lossy compression.
Several image compression methods utilize Huffman coding.1 Without Huffman coding, each
pixel in a grayscale image is assigned a byte--a byte is 8 bits, where each bit is a 0 or a 1. This
means that an image with 200 pixels would be composed of 200 bytes or 1600 bits. Huffman
coding assigns each pixel a number of bits based on how frequently it occurs. If the same gray
pixel occurs more often, the number of bits encoding that pixel is smaller. However, this method
is only very efficient if a picture contains a large number of the same color pixels. For images
with many uniquely colored pixels, Huffman coding does not reduce the size of the image file by
any significant amount.
Problem Statement
Image compression is able to be done in a variety of ways. The method of image compression we
are interested Utilizes the Haar Wavelet Transformation (HWT) to improve the efficiency of
Huffman Coding. Let A be a matrix with numbers 0 to 255 assigned to each pixel of an image, 0
representing black and 255 representing white. Then the HWT can be written as WAWT, where
W is a matrix the same size as A. The HWT matrix we use for our research looks like the
following:
1 JPEG uses an embellished version of Huffman Coding.
2x2 matrix 4x4 matrix 8x8 matrix
An HWT for one iteration on a generic 4x4 A matrix would look like this:
W A WT
=
Answer
The resulting image from the same WAWT transformation applied on a photo with a much larger
file size would look like this:
Original One iteration of WAWT
The second iteration is done using the upper left block image created in the previous iteration.
Then a WAWT transformation is applied to that image and then replaces the upper left block.
Second Iteration
W A WT
First iteration
W Upper left quadrant of first iteration WT
Upper left quadrant of second iteration
↓
Second iteration
Since some of the data in the image is changing from iteration to iteration before the final result
is reached, there is unnecessary computation being done in this transformation. For example, for
a second iteration transformation, the element in position [1,1] of the matrix is computed twice.
Research Goals
The goal of our research was to find a way to improve the computational efficiency of the HWT.
We strive to eliminate the unnecessary computations described in the paragraph above. Right
now, the HWT has to be applied to a given matrix n times in order to produce the nth iteration of
the transformation. We would hope to accomplish this computation in one step for any number
of iterations, saving on computing time. In order to do this, we first to prove that the HWT is
linear, and then find a given matrix M that can be multiplied by any image matrix A that would
give the same result as the original HWT. We also wanted to eliminate unnecessary data by
creating a process that would identify elements of the matrix that had a difference with the
neighboring element close to 0 and set them to a common number on the grayscale, since the
difference would be indistinguishable to the human eye. This will make Huffman Coding more
effective because there are more of the same elements.
Our attempt was to create a simplified process for HWT that would work on any matrix
representing a rectangular black-and-white image, for any number of iterations that can be done
for that image. For each iteration i, the dimensions of the matrix must be divisible by 2i. For
example, for 4 iterations, both dimensions must be divisible by 24 or 16 in order for 4 iterations
to be computed.
Our method that we use flattens the matrix into a vector and find one matrix M to perform the
transformation with the A vector. This results in a vector and it must then be put correctly back
into the matrix.
Results and Methodology
In order for a transformation to be linear we must prove that for:
i) M(u + v) = M(u) + M(v) for all u, v in the domain of M;
ii) M(cu) = cM(u) for all scalars c and all u in the domain of M.