Docsity

Image Processing - Assignment 9 Unsolved | EECS 556, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
EECS 556, Imaging Processing, Douglas C. Noll 4/10/2002
Homework #9
This is for practice only – do not hand in.
1. Energy compaction in transform coding. Download the template hw9_template.m for
use in this problem. This problem will again use the house image from homework #7. We
will examine three different transforms: the DCT, the Hadamard and Haar transforms and we
will use 8x8 blocks. The size 8 1D Haar transform matrix is:
−
−
−
−−−
−−−−
−−
=
22 00
0 02 2
0000
0000
0000
0000
2 200
00 2 2 2222
0000
1111
1111
0000
2222
1111
1111
8
1
8
Haar
The 1D Hadamard transform matrix can be determined from the Matlab hadamard
command. The 2D DCT can be derived from Matlab’s dct command. I would avoid using
the dct function we created in homework #3 as that one was not an energy preserving
transformation.
a. Implement 8x8 transform for DCT, Hadamard, and Haar. Verify that each is energy
preserving using a sample 8x8 image (sum squared energy in transform domain will be
the same as sub squared energy in the image – or that H*H’ = I)
b. Take the 8x8 transform for all 8x8 blocks in the image and store the transform
coefficients in a 64x5400 array.
c. Determine the variance of each of the coefficients and sort by magnitude.
d. Plot the variances in increasing or decreasing order for each method. Use a log scale
(semilogy) and put all three methods on one plot.
e. Create a plot of the cumulative variance in the n highest coefficients for each method.
Use a linear scale and put all three methods on one plot. Which method has the best
energy compaction.
f. Determine the number of bits that should be assigned to each coefficient for an average
bit rate of 1 bit/pixel. Round to the nearest integer and disallow the assignment of
negative bits/pixel. Which transform method results in the most coefficients coded with
zero bits/pixel.

Partial preview of the text

Download Image Processing - Assignment 9 Unsolved | EECS 556 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

EECS 556, Imaging Processing, Douglas C. Noll 4/10/

Homework # This is for practice only – do not hand in.

  1. Energy compaction in transform coding. Download the template hw9_template.m for use in this problem. This problem will again use the house image from homework #7. We will examine three different transforms: the DCT, the Hadamard and Haar transforms and we will use 8x8 blocks. The size 8 1D Haar transform matrix is:

Haar 8

The 1D Hadamard transform matrix can be determined from the Matlab hadamard command. The 2D DCT can be derived from Matlab’s dct command. I would avoid using the dct function we created in homework #3 as that one was not an energy preserving transformation. a. Implement 8x8 transform for DCT, Hadamard, and Haar. Verify that each is energy preserving using a sample 8x8 image (sum squared energy in transform domain will be the same as sub squared energy in the image – or that H*H’ = I ) b. Take the 8x8 transform for all 8x8 blocks in the image and store the transform coefficients in a 64x5400 array. c. Determine the variance of each of the coefficients and sort by magnitude. d. Plot the variances in increasing or decreasing order for each method. Use a log scale (semilogy) and put all three methods on one plot. e. Create a plot of the cumulative variance in the n highest coefficients for each method. Use a linear scale and put all three methods on one plot. Which method has the best energy compaction. f. Determine the number of bits that should be assigned to each coefficient for an average bit rate of 1 bit/pixel. Round to the nearest integer and disallow the assignment of negative bits/pixel. Which transform method results in the most coefficients coded with zero bits/pixel.