Search
[ K, R, C ] = Q2KRC( Q )
K, R, C = hw03.Q2KRC( Q )
Create a function Q2KRC for decomposing a non-zero scale of the image projection matrix Q (3×4) into into the camera projection center C (3×1), rotation matrix R (3×3) and upper triangular matrix K (3×3) such that
Q2KRC
Q
C
R
K
Q = λ ( K R | - K R C )
where K(3,3) = 1, K(1,1) > 0, and det(R) = 1.
Create a function 'plot_csystem' for drawing a coordinate system with base Base located in the origin b with a given name and color. The base and origin are expressed in the world coordinate system $\delta$. The base consists of a two or three three-dimensional column vectors of coordinates. E.g.
Base
b
name
color
plot_csystem(eye(3),zeros(3,1),'k','\\delta');
hw03.plot_csystem(np.eye(3),np.zeros([3,1]),'k','d')
should plot the $\delta$ system. The function should label each base vector (e.g. $\delta_x$, $\delta_y$, $\delta_z$). The automatic evaluation just verifies if the function with this name is present in your code.
f
Pb
Alpha
Beta
Gamma
Delta
Epsilon
Kappa
Nu
a
g
d
e
k
n
03_bases.mat
03_figure1.pdf
03_figure2.pdf
03_figure3.pdf
save( '03_bases.mat', 'Pb', 'f', …
'Alpha', 'a', …
'Beta', 'b',…
'Gamma', 'g', …
'Delta', 'd', …
'Epsilon', 'e',…
'Kappa', 'k', …
'Nu', 'n' );
sio.savemat( '03_bases.mat', { 'Pb':Pb, 'f':f,
'Alpha':Alpha, 'a':a,
'Beta':Beta, 'b':b,
'Gamma':Gamma, 'g':g,
'Delta':Delta, 'd':d,
'Epsilon':Epsilon, 'e':e,
'Kappa':Kappa, 'k':k,
'Nu':Nu, 'n':n } )
Upload an archive containing the following files:
Q2KRC.m
plot_csystem.m
hw03.m
hw03.py
The input entry point script hw03 should make all required figures, output files and prints without manual intervention.
hw03
Note: The required files must be in the root directory of the archive.