Search
[ K R C ] = Q2KRC( Q );
Create a function Q2KRC for decomposing a camera matrix Q (3×4) into into the projection centre 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.
K(3,3) = 1
K(1,1) > 0
det(R) = 1
plot_csystem( Base, b, color, name );
Create a function for drawing a coordinate system base Base located in the system origin b. The base and origin is expressed in the world coordinate system δ. The base consists of a three or two three-dimensional column vectors. E.g.
Base
b
plot_csystem( eye(3), zeros(3,1), 'k', '\\delta'' )
text
text( x, y, z, [ name '_x' ], 'color', color )
(here x,y,z are coordinates of the end of the first base vector (base x-axis), name and color are the input arguments). Note that Matlab can plot greek numbers using TeX sequences ( '\\alpha', '\\beta', etc.).
x
y
z
name
color
'\\alpha
'\\beta
f
Pb
Alpha
Beta
Gamma
Delta
Epsilon
Kappa
Nu
a
g
d
e
k
n
03_bases.mat
save( 'bases.mat', 'Pb', 'f', 'Alpha', 'a', 'Beta', 'b', 'Gamma', 'g', ... 'Delta', 'd', 'Epsilon', 'e', 'Kappa', 'k', 'Nu', 'n', '-v6' );
03_figure1.pdf
03_figure2.pdf
03_figure3.pdf
Upload an archive containing the following files:
Q2KRC.m
plot_csystem.m
hw03.m
Note: The required files must be in the root directory of the archive.