Review Problems for Midterm Examination: CS474/674



 1. Draw a piecewise linear transformation that takes [0,39] to 0,
    [40,200] to [0,255] and [201, 255] to 255.

 2. How can the contrast of an image be increased for the middle range
    of gray levels by using XView or LView Pro or Matlab? Give complete
    directions.

 3. If we wanted high compression to yield a much smaller image file,
    and the image has continuous shades rather than sharp lines, what
    format should we use to save an image? What are its disadvantages?

 4. If we wanted to compress an image but wanted to keep the same level of
    detail and not lose any information, what formats could we use for
    saving the image?

 5. What determines the resolution of an image when a very high resolution
    image is scanned into digital form with a scanner (that uses diodes
    to capture the light intensity in a small area)? What does the value
    of each pixel value represent in terms of the original image?

 6. If we use 8-bits for each pixel value for a color image, then what
    do the pixel values represent in terms of colors (the R, G and B
    values for the color guns for displaying the image on a video 
    monitor)?

 7. Why is it so convenient to process gray scale images in the PGM format?

 8. What does a histogram of a gray scale image tell us about an image that
    has a bad distribution of gray levels? Explain.

 9. What is the purpose of histogram equalization? Explain.

10. Suppose that you want to use LView Pro to filter an image with a
    certain convolution mask. Describe how to do it, once the image is
    loaded into LView Pro's workspace.

11. What is the JPEG image format good for? Explain.

12. Derive a mask for unsharp masking by adding two masks and give the
    purpose of each of the two masks.

13. Design a 5x5 mask that detects edge pixels going in a diagonal
    direction from the lower left to the upper right.

14. Design a 5x5 mask that will detect edge or line pixels moving in
    either direction along a line from the upper right to the lower
    left corners.

15. Draw a 3x3 mask and a 3x3 nbhd of a pixel. Give the mathematical
    equation for the mask convolution of these two 3x3 blocks.

16. Design an algorithm that smooths pixels that have very different
    values from the average value of the other nbhd pixels, but
    otherwise does not change the pixel value.

17. Design a blurring mask that blurs moderately but not strongly.

18. Suppose we want to use the Laplacian convolution mask on an image
    (all -1 values except for the value 8 in the center). What could we
    do first to help keep it from accentuating the noise?

19. Describe how to do unsharp masking on the image "shuttle.pgm" by
    use of either the tool LView Pro or Matlab.

20. If we load a PGM image into a text editor, how can we tell if it
    is in packed format or not?

21. Draw a thresholding graph for a transformation that will segment 
    an image into regions of 5 separate gray scales.

22. Describe an algorithm in psuedo-code that will do the thresholding
    of an image into 3 separate gray levels (describe only the critical
    part where the thresholding is done).

23. Describe an algorithm that selects a pixel at random, and then
    grows a connected region around it consisting of all pixel values
    that are close to its value.

24. In Problem 23 above, what would cause the region to quit growing?

25. Write the pseudo-code for an algorithm that examines each pixel
    in an image and computes the 8 differences of between this center
    pixel and the other 8 pixels in its 3x3 nbhd. If the average
    difference magnitude is greater than 12, then change output
    center pixel value to have a greater difference (edge enhancement),
    else put the output center pixel value to be equal to the average
    value.

26. Does the process in Problem 25 above smooth or sharpen an image,
    or both?

27. What is the net result if an image is converted to its negative
    and then added to the original image (addition is on each pixel)?

28. What is the net result if an image is added to itself and truncated
    so that the output sum pixel values are truncated to [0, 255]?

29. Give examples of 3x3 convolution masks that smooth and sharpen.

30. Give examples of 3x3 convolution masks that detect edges moving
    along horizontal and vertical lines, moving left or right, or
    moving up or down (both directions on each line). Give an example
    of a mask that will detect edges in all directions (there are 8
    directions, total).

31. Construct a 5x5 mask that detects edges across the line from
    the upper left corner to the lower right corner. It must detect
    edges in both directions. Do not use the center value, that is,
    put 0 in the center position. Explain how it works. 

32. Develop a processing function whereby a pixel is smoothed if all
    pixels in its neighborhood are close to its gray level but is
    sharpened if a majority of the neighborhood pixels differ
    significantly. This smooths and sharpens at the same time.


33. Discuss the effect of unsharp masking when ß > 1 and the 
    smoothing mask to be subtracted is multiplied by a
    = ß - 1. 

34. What is the result of adding a sharpening and a smoothing mask to
    obtain a resulting mask such that the entries of the resulting mask
    sum to 1?

35. Develop a 5x5 Laplacian type mask by adding line detector masks for the 
    horizontal, vertical, and diagonal directions.

36. Complete the mask equation given just before Figure 5b.6 in Unit 5b
    and explain the effects of each of the two parts. 

37. Run XV or Lview Pro on shuttle.pgm and invert it by changing 
    the diagonal line in the Intensity box in XView

         Windows | Color Edit

    window, or by using

         Color | Curves

    in LView Pro).

38. Use XV or LView Pro to threshold the inverted image of Problem 37 to 
    convert it to black and white.

39. Write a simple program in C that performs mask convolution.

40. Perform unsharp masking on "Lena" to sharpen it by entering a single
    mask into the program of Problem 39 above. What effect does ß
    have (try a higher and lower value than ß = 2)? What effect does
    the degree of smoothing have (for example, if the subtracted mask blurs
    the image)?