CS474/674 - Digital Image Processing, Fall 2003, Prof. C. G. Looney

Midterm Examination

[10 pts. ] 1. (a) Fill in the blank on the first line of the following image file.

P_

# taken July, 1999

640 480 255

158 161 159 158 ..... .......

................................. .......

(b) What is the size of this image? _________________ rows __________________columns

(c) What is the largest grayscale value? ___________________________________

(d) What is the value of the second pixel in the first row of pixel data? _____________________

[10 pts.] 2. (a) Draw a graph of a nonlinear transformation in the left square that contracts very dark and very light shades of gray but stretches the middle gray levels out to a wider range. (b) Draw a transformation in the right square that outputs the negative of the input image.

(a) (b)

[10 pts.] 3. Check which of the following image properties can be determined from a histogram.

(a) ___ gray level range is too small (b) ___ edges are not sharp enough (c) ___ too many pixels are too dark

(d) ___ too many pixels are too light (d) ___ image is too smooth (e) ___ there is a lot of noise

[15 pts.] 4. (a) Design a 3x3 mask on the left that detects edges when moving from left to right. Design a 3x3 mask in the center that detects edges when moving from top to bottom. Show the sum of these masks below on the right.

+ =

(b) Clearly and briefly, what does the sum mask do? ________________________________________________

___________________________________________________________________________________________

__________________________________________________________________________________________.

[15 pts.] 5. Consider the left mask below. (a) Describe the result of its convolution on an image._____________

___________________________________________________________________________________________

__________________________________________________________________________________________ .

(b) Break this mask into two masks whose sum is the mask shown on the left, and the center mask only boosts the original image by a factor greater than 1.

=

[10 ] 6. An image is converted to a white line drawing on a black background (image Iline) using the Sobel edge detectors. Show how the lines can be thinned using Matlab commands that read in this edge image, convert it to black and white using a threshold, and then thin the result (use commands as needed)

>>

>>

>>

>>

>>

>>

[10] 7. Draw a 4 point polynomial mapping from one image into another and derive the equations based on these 4 points.

Image 1 Image 2

[20 ] 8. (a) Describe how the objects in an image can be boundarized by a combination of one or more of closing, opening, dilating, eroding and subtraction. The result must show the boundary pixels of the objects. Assume the image has been converted to black and white first with a good threshold value.

(b) Im1 is a grayscale image. We want to use Matlab to multiply Im1 by a black and white image Ibw. How can we do it?