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]
- Apply the pixel mapping function below to the image. Code output valuesas shown below.
- Draw the two histograms (for the input image and the output image) side by side.
- 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).
- 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.
- Suppose we add a constant value kfrom each of the pixel values in the input image above. How does this change its histogram?
- Short Answers [50]
- 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?
- 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?
- 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?
- What is the “blocking factor” in the JPEG algorithm?
- Why do most histogram flattening algorithms produce histograms that aren’t really flat?
- 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.
- 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.
- Define “keyframe” and “tween.”
- 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?
- What is double buffering, and why does it remove flicker when rendering interactive animation?
- Neighborhood Operations [25]
- 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):
- 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.
- Suppose you want to fill in plausible values for the boundary pixels of the output image above. Give a method for doing that.
- 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).