Practice Excercises

The current list of practice excercises are collected from previous years of this course.

The excercises on this page are NOT homework assignments. You are not required to solve them or turn anything in, but they may help you in digesting the material presented in class. Some of them might even turn up in an exam...

I have a long-standing policy of not posting answers to exercises, exam questions, etc; I want to you work the answers out yourselves as much as possible. Some of these excercises may be covered in tutorial. If you have questions about a particular excersice, try working it out with your fellow students. If that doesn't work, come to my office hours or ask your TA during the tutorial.

 

Past Exams

 

Practice exercises

1   Pixels & Histograms

  • Q1.1:  In class we discussed how to represent a color image by associating 3 bytes with each pixel, ie. one byte each for the R, G & B color components. Suggest two alternative techniques for representing a color image that use just ONE byte per pixel.

  •  
  • Q1.2:  Suppose you are given the R,G,B values of every pixel in the following photo & are asked to compute the alpha value of every pixel inside the circle.
    Can you do this? If yes, explain how; if not, explain what else you have to assume to do it.

  •  
  • Q1.3:  A TV camera is pointed at a news anchor man wearing a dark jacket and standing in front of a gray background. Sketch what the histogram of a digitized frame might look like if it were (a) properly digitized, (b) digitized with gain set too low, and (c) digitized with gain set too high. Make reasonable assumptions about the coloring of the man's hair and skin.
    (Note that the camera's gain control allows us to control the camera's response to a given light level: the higher the gain, the higher the intensities will be in the digitized image.)

  •  

2   Edge detection

  • Q2.1:  Compute the result of applying mask [-1 2 -1] to the following one-dimensional image:

  •  
  • Q2.2:  Consider the following image & mask, where black denotes number 0 & white denotes number 5:
    Suppose we apply mask M to image I, obtaining image I'. What is the maximum pixel value in I'? Give the (row,column) of the pixel(s) in I' where that value occurs. (Hint: you should be able to answer the question without having to compute the intensity of every pixel in I').

  •  

3   Edge detection & image smoothing

  • Q3.1:  What do (a) the gradient magnitude and (b) direction of the gradient correspond to in terms of image brightness values?

  •  
  • Q3.2:  Consider the following graph, corresponding to a 1D image:
    (a)Show the result of computing the 1st & 2nd image derivative in the interval [X1,X2]. Mark where the 3 dots correspond to in each case
    (b)Show where and how edges can be detected in the interval [X1,X2] based on the output of the two computations in (a).

  •  
  • Q3.3:  Suggest one way to enhance these corners in an image:

  •  
  • Q3.4:  Let corr(M,I) be the cross-correlation of mask M with image I. Prove that
    corr(M+M',I) = corr(M,I)+corr(M',I)

  •  
  • Q3.5:  Prove that the Laplacian of the 2D Gaussian function is given by Eq. (14) on page 464 of Castleman's textbook.

  •  
  • Q3.6:  Let sum(M) be the sum of elements of mask M.
    (a) Why should sum(M) be equal to 0 when M is an edge detection mask?
    (b) Why should sum(M) be equal to 1 when M is a smoothing mask?

  •  
  • Q3.7:  Suppose that the 9 intensities of a 3x3 image neighborhood are given by
    I(r,c)=pr+qc
    where p and q are constants. (a) Show that the 3x3 Laplacian mask
    has zero response on such a neighborhood. (b) Use the derivations in (a) to show that the Laplacian mask has zero response on constant regions as well as on constant-intensity ramps.

  •  

4   Hierarchical image representations

  • Q4.1:  What is the Quad-Tree representation of the image below?

  •  
  • Q4.2:  Explain how you would use the Laplacian image pyramid for image compression.

  •  
  • Q4.3:  Show 6 images from the 2D Haar wavelet basis described in the lecture slides (equivalent to the non-standard 2D wavelet basis discussed in the wavelets tutorial)

  •  
  • Q4.4:  Show the 2D Haar wavelet transform of the following 2D image, using the construction in the lecture slides (equivalent to the non-standard construction in the wavelets tutorial).

  •  

5   Texture Mapping

  • Q5.1:  What are the advantages of the MIP-mapping technique compared to "standard" texture mapping? Give one shortcoming of the method.

  •  
  • Q5.2:  Suppose you use the following images as "source textures" for the Efros & Leung texture synthesis algorithm. On which image(s) would you expect the algorithm to fail?

  •  

6   Line Drawing (not covered in this year's syllabus)

  • Q6.1:  How would you generalize the Bresenham line drawing algorithm to draw circles rather than lines? Assume that as input you get the integer coordinates of the circle's center and an integer radius.

  •  
  • Q6.2:  Extend Bresenham's algorithm so that it allows you to draw lines of any slope.

  •  

7   Fourier Transforms (not covered in this year's syllabus)

  • Q7.1:  Derive the continuous Fourier Transform of (a) the 1D Gaussian; (b) the 1D delta function; (c) a 'train' of delta functions separated by width w (a.k.a. the Shah function); (d) the function f(x)=cos(x); and (e) the function f(x)=sin(x).

  •  
  • Q7.2:  Suppose that the following image has resolution 100x200 and assume that the pixel intensity in the direction perpendicular to the "stripes" varies sinusoidally:
    Give the formula for the intensity of pixel (r,c) in the above image.

  •  
  • Q7.3:  Suppose we have a continuous 1D image whose intensities follow the following sinusoidal function:
    If we sample the function once every X units, which of the following values of X (if any) causes aliasing: (a) X=5; (b) X=15; (c) X=25; (d) X=35. Explain your reasoning.

  •  
  • Q7.4:  Explain why defocusing a camera's lens can reduce aliasing artifacts during image capture.

  •  

 
 

Site last modified on Wednesday, May 14, 2008
Send questions or comments about this page to kyros@cs.toronto.edu