main-someexamreviewqs

Questions from students (mainly on homeworks)

1.@ On homework 1, part E, what does reflection really do?

Reflection literally “reflects” the signal, as if it were in a mirror.

so if the signal was: … 1 6 2 5 3 4 3 reflection makes it: … 1 6 2 5 3 4 3 3 4 3 5 2 6 1 … note: this is quite different than “replication” which would do: … 1 6 2 5 3 4 3 3 3 3 3 3 …

Reflection can be better than replication as it preserves the frequency content of the original signal.

2.@ How does a 1D kernel turn into a seperable 2D kernel?

Basically, you convolve the “X” direction with the “Y” direction. So (for example to use HW1 4B)

If the 1D kernel is: 1/16 1 4 6 4 1

We treat it as 2 2D kernels:

      0 0 0 0 0              0 0 1 0 0
      0 0 0 0 0              0 0 4 0 0
1/16  1 4 6 4 1   and   1/16 0 0 6 0 0
      0 0 0 0 0              0 0 4 0 0
      0 0 0 0 0              0 0 1 0 0

One trick: we can multiply the scalars in front independently (since scalar multiplication commutes and associates, which gives:

       1  4  6  4  1
       4 16 24 16  4
1/256  6 24 36 24  6
       4 16 24 16  4
       1  4  6  4  1

One thing that might have thrown people off: for the kernels, we assume that values outside the range are 0 (unless we say otherwise). This makes sure they all add up to the appropriate values. For the signals that these kernels are applied to, we sometime use other edge treatments (see the first answer).

3.@ What are the right equations for OVER and ATOP

I initially had atop wrong in my notes, but this has been fixed.

  • A over B = Aa Acolor + (1-Aa) Ba Bcolor or 1 Ac + (1-Aa) Bc (if Ac,Bc are premultiplied)
  • A atop B = Aa Ba Acolor + (1-Aa) Ba Bcolor or Ba Ac + (1-Aa) Bc (if Ac,Bc are premultiplied)

One thing to remember (that might be the cause of the “black haze” many people had in their projects) is that the results of the compositing operators are pre-multiplied. (you don’t need to premultiply them again.

4.@ Why do you translate before you rotate in HW, problem 6?

Remember, that we’re in post-multiply convention, so that the first we do in the program is the last thing we do geometrically (the point moves from right to left if you right out the matrices).

Alternatively, view the commands as moving the coordinate system (in which case you can keep the forward direction).

Page last modified on October 24, 2007, at 10:36 AM