1.[ToDo (c)] What does vector s reflected about t mean?
Answer: See slide 10 for photostereo. Note that s is R and t is N. You need to calculate L as your output.
2. [ToDo (f)] What items do go into the M matrix and the v vector for computing the Depths?
Answer:
Let me give you an example.
You want to use the following two equations to get z(i+1,j) z(i,j) z(i,j+1)
given nx,ny and nz.
![]()
![]()
We'd like to get z by solving Mz=v
Here are the corresponding M, z and v for the above two equations.
z=[z(i+1,j)
z(i,j)
z(i,j+1)]
M=[nz -nz 0
0 -nz nz]
v=[-nx
-ny]
3. [ToDo (f)] How do M matrix and the v vector for
computing the Depths?
n=0;
For j=0 to height
For i=0 to width
If (pixel(i,j) is valid) {
If (pixel (i+1,j) is valid) {
//add horizontal normal constraint
//M(n,zind.Pixel(i,j,0))=?
//M(n,zind.Pixel(i+1,j,0)=?
n++;
}
If (pixel (i,j+1) is valid) {
//add vertical normal constraint
//M(n,zind.Pixel(i,j,0))=?
//M(n,zind.Pixel(i,j+1,0)=?
n++;
}
}
In makeMmatrix and makeVvector, we examine pixels in row-major order.
For example, (0,0),(0,1),...,(0,w),…,(h,w) where h and w are the height and width of an image.
We use pixvalid(zind,i,j) to check if pixel (i,j) is valid where i is the column and j is the row for this pixel.
Given a pixel (i,j) which is valid, we first add horizontal normal constraint if pixel (i+1,j) is valid.
M(n,zind.Pixel(i,j,0))=?;
M(n,zind.Pixel(i+1,j,0))=?
n++;
Then, you consider to add vertical normal constraint if pixel (i,j+1) is valid.
M(n,zind.Pixel(i,j,0))=?;
M(n,zind.Pixel(i,j+1,0))=?
n++;