Graphics, Multimedia and User-Interface Design

Graphics, Multimedia and User-Interface Design

CS335 Exam 2

(makeup)

Directions

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

1. Grey Level Mapping [25]

  1. Apply the pixel mapping function below to the image. Code output valuesas shown below.
  1. Draw the two histograms (for the input image and the output image) side by side.
  1. 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).
  1. 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.
  1. Suppose we add a constant value kfrom each of the pixel values in the input image above. How does this change its histogram?
  1. Short Answers [50]
  1. You are given an image of page of a chessboard (black and white squares). 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 ten images one after the other(about 100 milliseconds apart, without moving your tripod-mounted camera) of an elephant running by. You perform a pixel-wiseaverage of the ten 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 300x200 pixels. Is this compression method lossy or loss-less? What is the compression ratio?
  4. What is the “blocking factor” in the JPEG algorithm?
  5. Why do most histogram flattening algorithms produce histograms that aren’t really flat?
  6. You are given a target histogram (just the histogram) and an image, which has a histogram that is different from the target. Explain how to make the histogram of the second image match the specified histogram.
  7. You are implementing an efficient algorithm for rendering a degree five polynomial 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?
  1. 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):

  1. 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.
  1. Suppose you want to fill in plausible values for the boundary pixels of the output image above. Give a method for doing that.
  1. Write down a 3x3 filter that will do nothing (i.e., it will not change the image). Now write one that will double the brightness (without any blurring).