Graphics, Multimedia and User-Interface Design



CS335 Exam 2

Directions

Answer all questions. The exam is worth 100 points. Place all answers/work on your answer sheet.

1. Grey Level Mapping [25]

[pic]

1. Apply the pixel mapping function below to the image. Code output values as shown below.

[pic]

2. Draw the two histograms (for the input image and the output image) side by side.

3. Show a new mapping function that will create an output image that is the “photographic negative” (i.e., intensities flip so that high values become low and low values become high).

4. If the pixels in the image above are randomly moved around (scrambled) but their intensity is never changed, how does the shape of the histogram change? Explain.

5. Suppose we subtract a constant value k from each of the pixel values in the input image above. How does this change its histogram?

2. Short Answers [50]

1. You are given an image of page of a book (black ink on white paper). The image is 8-bit grayscale. What does the histogram probably look like? You would like to threshold the image to create a binary image (one bit per pixel indicated either black or white). How can the histogram tell you what threshold value to use?

2. From your shack in the African bush you take two images one after the other (about a half a second apart, without moving your tripod-mounted camera) of an elephant running by. You perform a pixel-wise subtraction of the two images. What will the resulting image look like? Why?

3. You decide to compress a raw 24-bit color image from your digital camera by scaling its dimensions from 3000x2000 pixels to 600x400 pixels. Is this compression method lossy or loss-less? What is the compression ratio?

4. What parameters in the JPEG algorithm control the amount of loss?

5. Why do most histogram flattening algorithms produce histograms that aren’t really flat?

6. You are given the histogram of a valuable image that has been lost. Explain how to recover the image from the histogram.

7. You are implementing an efficient algorithm for rendering a sine function curve, and you decide to use forward differencing as is done with polynomial (e.g., cubic) curves. Explain how to set it up and how well it will work.

8. Define “keyframe” and “tween.”

9. Why is a third-order forward differencing algorithm the most efficient way to render B-spline curves when only second-order is the best for circles?

10. What is double buffering, and why does it remove flicker when rendering interactive animation?

3. Neighborhood Operations [25]

1. Apply the 3x3 filter below to the given image and show the resulting image (ignore the boundary pixels and fill in just the values where the 3x3 filter fits within the input image):

[pic]

2. If you wanted to store the output image in the same buffer as the input image (in other words, you want to apply the filter “in place”) explain what to look out for and why.

3. Suppose you want to fill in plausible values for the boundary pixels of the output image above. Give a method for doing that. If the kernel is expanded to a 9x9, what happens to the number of boundary pixels in the output image?

4. Write down a 3x3 mean filter kernel. Now define a mean filter that is 9x9. What effect does the larger kernel size have on the result?

-----------------------

4

40

4

9

9

7

9

9

9

9

9

40

4

4

4

4

4

4

7

9

9

4

4

1

4

4

0

4

4

9

4

4

4

4

4

4

4

2

4

9

4

4

4

4

4

4

4

4

4

4

0

4

4

4

4

4

4

4

4

4

9

9

9

9

7

8

9

9

9

9

4

4

4

4

4

4

4

9

9

9

9

9

4

4

4

4

4

4

9

9

9

4

9

2

3

3

2

4

4

9

0 1 2 3 4 5 6 7 8 9

Input intensities

9

5

0

Output intensities

0

5

9

Input image

Output image

Input image

Pixel code

Output image

Kernel

0

1

1

0

-1

3

-1

-1

1

5

5

5

5

5

5

5

5

5

5

5

5

5

5

5

5

5

5

5

5

0

0

0

0

5

5

0

0

0

0

5

50

0

0

0

0

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

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download