Camera Model
Pinhole Camera Model

Let P=[xyz]T be a 3D point in camera coordinates. By similar triangles with focal length f:
P′=[x′y′]=[fzxfzy]
Paraxial Refraction Model

Refraction model with effective image distance z′:
P′=[z′zxz′zy]
Camera Matrix Model
Accounting for pixel scaling factors (α=fkx,β=fky) and principal point offset (cx,cy):
P′=[fkzx+cxflzy+cy]=[αzx+cxβzy+cy]
Since the perspective projection is non-linear, homogeneous coordinates are used hereafter to matrix-formulate the transformations.
P′=x′y′z′=α000β0cxcy1000xyz1=α000β0cxcy1[I0]P=K[I0]P=MP
Accounting for potential sensor skewness between image axes, the intrinsic matrix is generalized as:
K=α00−αcotθsinθβ0cxcy1
K has 5 degrees of freedom, which also known as intrinsic parameters.
Extrinsic Parameters
Transforming 3D points from World Frame Pw to Camera Frame Pc using rotation R∈SO(3) and translation T∈R3:
Pc=[R0T1]Pw
Full Camera Projection Pipeline:
P′=K[RT]Pw=MPw
3D Rotation & Quaternion
Rotates vector v around unit axis u (∥u∥=1) by angle θ:
v′=cosθv+(1−cosθ)(u⋅v)u+sinθ(u×v)
Quaternion
Definition
q=a+bi+cj+dk=[s,v](s=a∈R,v=[b,c,d]T∈R3)
Hamilton Fundamental Formula: i2=j2=k2=ijk=−1
| × | 1 | i | j | k |
|---|
| 1 | 1 | i | j | k |
| i | i | −1 | k | −j |
| j | j | −k | −1 | i |
| k | k | j | −i | −1 |
Operations
- Left Multiplication Matrix Operator [q1]L:
q1q2=abcd−bad−c−c−dab−dc−baefgh
- Vector Form Multiplication:
For q1=[s,v], q2=[t,u]:
q1q2=[st−v⋅u,su+tv+v×u]
- Conjugate & Inverse:
(q1q2)∗=q2∗q1∗where q∗=[s,−v]
q−1=∥q∥2q∗(if ∥q∥=1,q−1=q∗)
3D Rotation via Quaternion
Let pure quaternion v=[0,v] and unit quaternion q=[cos2θ,sin2θu]:
v′=qvq∗=qvq−1
Expanding v′=qvq∗ into 3×3 Rotation Matrix Rq (a=cos2θ,[b,c,d]T=sin2θu):
v′=Rqv=1−2c2−2d22bc+2ad2bd−2ac2bc−2ad1−2b2−2d22cd+2ab2bd+2ac2cd−2ab1−2b2−2c2v
References