Spring 2004 - CS477/577 - An Introduction to Computer Vision

Assignment Three

Due: Thursday, February 26, 2004, in class

Credit (U-grad): Approximately 4 points (Relative, and very rough absolute weighting)
Credit (Grad): Approximately 4 points (Relative, and very rough absolute weighting)

Note: In assignments I will ask some rhetorical or optional questions. While they are optional, I often use such questions as a source of exam questions. Hence, even if you do not do them, it is a good idea to think how you might go about answering them.

This is mostly a written assignment. You can submit electronically using PDF, or using hardcopy. If you choose to physically write it, please try to provide a legible result. For some of the questions you may want to use Matlab as a matrix calculator. Explain what you did, and report the answer. Printing or cutting and pasting the relevant portion of the Matlab session may prove helpful.

Make sure that you show enough work that the TA believes that you really understand what is going on. Answers without sufficient work shown will lead to lost marks. In some cases, merely having the right answer will not earn any points at all.

It is not necessary to do the entire assignment for full credit. The marks allotted to each question are indicated. If you exceed 100%, then you will get some extra credit, but not necessarily at the same rate of points earned on assignment to points earned towards grade. The total number of points is 24. It will be marked out of 20 for grads and 16 for undergrads.

It may help you to know that I similarly prefer to give you some flexibility regarding which questions you do on the exams as well, rather than identifying which question I would want to have as optional for undergrads and grads respectively. Note that this does not mean that there will necessarily be such such questions.

  1. Suppose that in the previous assignment the material Scott used to construct the grid was Lambertian, and that it was illuminated by a sufficiently distant point source. Further suppose that the camera was black and white. You then used the mouse to select one point from each of the three walls of the inner corner, finding that the values were:
        100 (upper left wall, i.e., the XZ plane). 
        200 (upper right wall, i.e., the YZ plane). 
         50 (bottom surface, i.e., the XY plane). 
    

    (a) Ignoring inter-reflections between the walls and noise in the image, what is the range of values that you expect for the other points on each of the three walls? (2 marks)

    (b) What is the direction of the light source? (2 marks)

    (c) Now suppose that are significant inter-reflections. Does this affect the accuracy of your estimate of the direction of the light source? If you think inter-reflections add error, can you say which way the result is biased? (2 marks)

  2. Suppose that you have a Lambertian sphere with some points marked. Suppose for those points you know the surface normal with respect to a coordinate system. In particular, for each point in turn you have:
        0.9466    0.3205    0.0352
        0.7560    0.1715    0.6317
        0.1179    0.4048    0.9068
        0.3029    0.5183    0.7998
        0.8332    0.2789    0.4775
        0.0213    0.4289    0.9031
    

    Now suppose that your job is to estimate the direction of a point source illuminating the sphere. You find the following gray values (the camera is black and white) corresponding in sequence to the above normals:

       245.5622
       207.8070
       161.2500
       228.3713
       246.0258
       153.8002
    
    (a) Compute an estimate of the light source direction (2 marks)

    (b) Estimate the error in your estimate (2 marks).

    (c) What are the assumptions about the camera response to light implicit in the process you used to estimate the light source direction? Explain. (2 marks)

  3. How many steradians are there in a hemi-sphere? (2 marks)

  4. Consider a spherical light bulb of radius r with power W at a distance R from you. The bulb emits light uniformly in all directions. The space between you and the bulb can be considered non-absorbing, and there are no other light sources around. Suppose you are at the origin, and that the bulb is at (R,R,R)/sqrt(3). Identify the "ground" plane with XY and straight up with (0,0,1). If it helps, you can assume that r is small compared with R.

    Note that you can answer (c), (d), (f), (g) and (i) without doing (b),(e) and (h).

    (a) What is the radiance due to the light bulb in the direction (0,0,1) where you are (at the origin)? (1 mark)

    (b) Derive that the radiance due to the light bulb in the direction (R,R,R) is W/(4*pi^2*r^2) (2 marks)

    Hint: This problem is perhaps a little tricky because the right value for dP in the radiance equation is not that obvious. I can suggest two ways to think about this. You can appeal to other reasoning that the radiance of each piece of the bulb as seen by you is the same, and thus you can get the power per steradian by doing it for the entire bulb. The subtly is that if you consider the entire bulb, you can get the power easily--not so easy if you consider only a patch. The second way to think about it is to argue that you do not need to consider your position, and then proceed to think about a patch of the bulb emitting light in every direction equally. You can easily compute the power of the patch over all directions, but when computing the per direction amount, foreshortening means that you need to do an integral in polar coordinates. You can get full marks if you simply write down the correct integral, and declare that its value is "pi" if the rest of the solution is correct. If you further demonstrate that you can do the integral, you will get 1/2 point extra.

    (c) Explain the dependency on r in the formula in (b) intuitively (1 mark).

    (d) Explain the lack of dependency on R in the formula in (b) intuitively (1 mark).

    (e) Derive that the irradiance onto the ground plane at the origin due to the entire light bulb as (1/sqrt(3))*W/(4*pi*R^2) (1 marks).

    (f) Explain the lack of dependency on r in the formula in (e) intuitively (1 mark).

    (g) Explain the dependency on R intuitively in the formula in (e) (1 mark).

    (h) Suppose that the light bulb occupies much more than w steradians of your field of view. Derive that the irradiance onto the ground plane where you are in the direction of the light bulb due to w steradians is (1/sqrt(3))*W*w/(4*pi^2*r^2) (1 mark)

    (i) Now the irradiance depends on r, and not on R. Explain intuitively. (1 mark)