Drexel University

Department of Electrical and Computer Engineering

ECES 682, Introduction to Image Processing

Spring 2006

Homework 3

Due Mau 22, 2006

All problems are from Gonzalez and Woods, Digital Image Processing, second edition

Note: Please submit your results in hard copy (not electronically).

1. Problem 6.5

2. 6.6

3. 6.21 Give a matrix that operates on the YUV coordinates and on the RGB coordinates. The equations for transforming from RGB to YUV are:

The inverse matrix can be used to transform from YUV to RGB.

4. 8.11

5. Consider the image described in problem 8.24.

(a) How many bytes are required for the uncompressed image?

(b) Assume that the image is to be sent in one minute. What transmission rate (bits/second) is required?

(c) Describe a method for sending an approximation to the image in 6 seconds over the same line. Consider only the transmission time: assume that the time to process at the source and destination is negligible.

The following two problems use the JPEG compressor in MATLAB. Please read the index information on ‘imwrite’

6. The purpose of this problem is to construct a ‘rate-distortion curve’ for the JPEG compressor in MATLAB. The curve that you plot should have the general shape of Figure 8.10, though the horizontal axis is to be plotted on a logarithmic scale.

Download image ‘hand.tif’ from our web site. Use imwrite to perform JPEG compression with a range of quality values. For each compressed image, find the number of bits in the file (you can do with the !ls command under Matlab or by using the Windows directory information. The distortion is to be computed by using formula 8.1-8.

Plot the ‘rate-distortion’ curve, and print the original and the most highly compressed images.

7. The purpose of this exercise is to examine the effect of various distortions on an image and on the image appearance. This excursive is to be done with image eagle.jpg.

(a) Quantize the rgb image to 3 bits (8 levels). A matrix with values in the range of 0-255 can be quantized with the command new = 64*round(old/ 64). This image will be called Qrgb.

(b) Convert the image to YCbCr coordinates (there’s a MATLAB command for this) quantize the Cb and Cr planes to 3 bits, and convert the image to rgb. This will be called Qycbcr.

(c) Compress the image with quality 25. This will be called JPEG25.

Examine the three images and compare. Comment on the difference.

Examine (print) the green plane of the images. Compare and comment.

Examine and print the Y plane on the three images. Compare and comment.

Examine and print the Cb plane of the images. Compare and comment.

State any overall comments about the effect of the operations performed.