Search
u1
u2
vp1
vp2
07_vp1.pdf
07_vp2.pdf
07_vp1_zoom.pdf
07_vp2_zoom.pdf
K
angle
C1
C2
R1
R2
07_box_wire1.pdf
07_box_wire2.pdf
07_box_wire3.pdf
07_seq_wire.avi
07_box_tx.png
07_seq_tx.avi
07_data.mat
K(3,3)=1
Let <latex>R_1</latex>, <latex>C_1</latex> is the first camera pose and <latex>R_2</latex>, <latex>C_2</latex> is the second camera pose. Let <latex>\lambda</latex> be the interpolation parameter taking value from 0 (meaning the first camera) to 1 (meaning the second camera). Then use following
<latex> C = (1-\lambda) C_1 + \lambda C_2 </latex>
<latex> R = (R_2 R_1^\top)^\lambda R_1 </latex>
Note that we are using matrix power here. Due to numeric accuracy, it is necessary to take only the real part of the result computed in matlab.
Homography from the cube face, projected in the image, to the texture image must be established. The problem concerning if the pixels are inside or outside the face is easily solved in the coordinate system of the texture.
Also visibility must be solved here. The easiest way is to consider each face's normal vector, computed from the sides using the vector product (take care with the sign). Also the direction vector from the camera to some point of the face must be computed. The the face is visible only if the normal vector form an acute angle with the direction vector, i.e. it's cosine (i.e. it's dot product) is positive.
See the help section. If able, please try to compress your sequence by some 'normal' codec (divx, xvid, …) after creating the raw avi from matlab.
Upload an archive consisting of:
hw07.m
any other files required by hw07.m (including data and files from the repository).