Lecture8-2
Lecture8-2
Source: S. Lazebnik
Reading
• Szeliski 2.1.3-2.1.6
Image formation
Camera
Lighting
Computer
Scene
Scene Interpretation
Pinhole and the Perspective Projection
(x,y)
screen
scene
image plane
r = ( x, y, z )
y
Real
object
f = Focal length
c = Optical center of the camera
• By symmetric
! !! $ $!
"
= #
and "
= #
i.e.,
% %
𝑥 𝑦
%
𝑃 = (𝑥 , 𝑦 ) = (𝑓 , 𝑓 )
𝑧 𝑧
• Simplest form of perspective projection
Camera parameters
• How can we model the geometry of a camera?
v
y
COP
u
Camera
o x
Two important coordinate systems:
1. World coordinate system z “The World”
2. Camera coordinate system
Camera parameters
• To project a point (x,y,z) in world coordinates
into a camera
• First transform (x,y,z) into camera coordinates
• Need to know
– Camera position (in world coordinates)
– Camera orientation (in world coordinates)
• The formation of image frame
– Need to know camera intrinsics
Intrinsic Parameters
• In the image frame, denote location of
𝑐 (𝑝𝑟𝑖𝑛𝑐𝑖𝑝𝑙𝑒 𝑝𝑜𝑖𝑛𝑡) image plane as 𝑐" and 𝑐#
• Image principle point:
Intersection between the camera optical axis
and image plane
• Then
% % %
𝑥 𝑦
𝑃 = (𝑥 , 𝑦 ) = (𝑓 + 𝑐! , 𝑓 + 𝑐$ )
𝑧 𝑧
Intrinsic Parameters
• Points in digital image are expressed as in pixels
• Points in image plane are represented in physical
measurement (e.g., centimeter)
• The mapping between digital image and image plan can be
!"#$%&
something like '(
• We can use two parameters, k and l, to describe the mapping.
If 𝑘 = 𝑙, then the camera has “square pixels”.
• The equation now becomes:
% % % ! $
𝑃 = (𝑥 , 𝑦 ) = (𝑓𝑘 + 𝑐! , 𝑓𝑙 + 𝑐$ )
" "
! $
= (α + 𝑐! , 𝛽 +𝑐$ )
" "
Modeling projection
𝛼 0 𝑐#
𝑃) = 𝑀𝑃 = 0 𝛽 𝑐* 𝐼 0𝑃=𝐾 𝐼 0𝑃
0 0 1
𝑅 𝑇
𝑃= 𝑃+
0 1
𝑃) = 𝐾 𝑅 𝑇 𝑃+ = 𝑀𝑃+
intrinsic parameters
• K changes as the type of camera changes
• Extrinsic parameters are independent of camera
Where does all this lead?
• Given an arbitrary camera, we may not have
access to intrinsic parameters
• The problem of estimating intrinsic and
extrinsic parameters is known as camera
calibration
18
A pinhole camera has focal length 5mm. Each pixel is 0.02mm×0.02mm
and the image principle point is at pixel (500,500). Pixel coordinate start at
(0,0) in the upper-left corner of the image.
(a) Show the 3×3 camera matrix for this camera.
(b) Assume the world coordinate system is aligned with camera coordinate
system (i.e., their origins are the same and their axes are aligned), and
the origins are at the camera’s pinhole, show the 3×4 projection
matrix.
(c) What is the projection of a 3D scene point (100, 150, 800) into image
coordinates?
19