Objectives:
� Learn about block processing.
� Gain more experience with transforms.
� Understand basic components that are used in JPEG and MPEG encoding.
� Understand how data-dependent transforms work.
Assignment: In this assignment you will be analyzing the cameraman.tif
image using the direct cosine transformation and KL decomposition (the
hotelling transform). You should use the blkproc command to apply the
transforms to blocks. This function is described in Chapter 6 of the Image
Processing manual as well as in the help.
� Direct cosine transform on 8x8 blocks:
� Compute the average pixel value in each of the 8x8 blocks of the
cameraman.tif. Display the average as an image (e.g., create an
image in which the pixels in each 8x8 block is set to the average
of the corresponding 8x8 block in the cameraman image.
� Remove the 8x8 block average from 8x8 blocks of the cameraman.tif
image. The resulting image will be referred to as the zero-mean
cameraman. (You can subtract the image that you created from the
previous step.)
� Apply the direct cosine transform to 8x8 blocks of the zero-mean
cameraman image. Display the transformed image as a block image.
� Set all but the three largest transform coefficients in each block
to zero and transform the result back to image space. Display the
resulting image after adding the average back in.
� Hand in the code and put all of the resulting images on your web
page for lab 4.
� Function to do a block transform:
� Gather the code that you wrote in the previous part into a matlab
function. The function should have the following parameters:
o An image.
o A block size (which must be a power of 2).
o The number of coefficients to retain in the transformed
image.
o The function that performs the block transformation (e.g.,
the direct cosine transform).
o The function that performs the inverse transform (e.g., the
inverse of the direct cosine transform).