Problem

Use a full-frame, two-dimensional discrete cosine transform (2D-DCT) to implement a simple...

Use a full-frame, two-dimensional discrete cosine transform (2D-DCT) to implement a simple image compression algorithm. (The 2D-DCT and the inverse 2D-DCT are implemented in MATLAB by the commands dct2 and idc2, respectively.)

(a) Select a gray-scale image and read it into MATLAB.


(b) Compute the image’s DCT coefficients using the dct2 command.


(c) Use the idct2 command to find the inverse of the image’s DCT. Convert the recovered image to uint8 and display it to ensure that you can recover the image.


(d) Write a MATLAB function to accept an input argument for the percentage of DCT coefficients corresponding to the lowest horizontal and vertical frequencies (i.e., the upper left portion of the matrix of DCT coefficients) that are retained. The rest of the coefficients will be set to zero for a very crude form of signal compression. Using this function with the input argument set to 50, 25, 15, 10, 5, and 1% successively, compute the inverse DCT and display the image for each case.


(i) At what percentage does degradation of the image become noticeable?


(ii) Why are the lower frequency coefficients retained instead of the higher frequency coefficients?

(e) Print out and turn in:


(i) The original image


(ii) The image with just 1% of the DCT coefficients


(iii) The image for which you notice degradation of the image quality.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 12