• Homework Help
• 3

This preview shows page 2 - 3 out of 3 pages.

Start by looking over the Wikipedia page on JPEG: Turn in your code for all parts, plots and reconstructed images for a few values of M for part c, and your calculations and reconstructed image for part d. (a) Write a MATLAB function block dct2.m which takes an N × N pixel image, divides it into 8 × 8 pixel blocks (you may assume that N is divisible by 8), and returns the dis- crete cosine transform coefficients for each block. You will find the MATLAB command dct2.m helpful. Write another MATLAB function iblock dct2.m which is the inverse of the above: that takes the blocked DCT coefficients and returns the image. (b) The provided function jpgzzind.m orders the indexes of a block from low frequencies to high frequencies, as shown below: If xb is an 8 × 8 block, then xb(jpgzzind(8,8)) is a 64 × 1 vector containing the same elements, just in the “correct” order. Using this utility, write a MATLAB function block dct2 approx.m that takes an N × N image and a number M , and returns an N × N approximation ˜ x M formed by keeping the first M DCT coefficients in each block.

Subscribe to view the full document.

• Fall '08
• Staff

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern