Chapter 2 - Digital Image Fundamentals
Chapter 2 - Digital Image Fundamentals
Circle of
Confusion
Before After
Computer Vision 2-Image formation and representation
2-25
Scaling
Coordinates multiplied by the scaling factor:
• x’ = sx x
• y’ = sy y
Before After
Computer Vision 2-Image formation and representation
2-26
Scaling
Scaling is a matrix multiplication:
P’ = SP
x sx 0 x
y = 0
sy y
Before After
Computer Vision 2-Image formation and representation
2-28
Rotating in 2D, matrix notation
A rotation is a matrix multiplication:
P’=RP
x cosq − sin q x
y = sin q
cosq y
𝟏 𝟎 𝒕𝒙
𝑻= 𝟎 𝟏 𝒕𝒚
𝟎 𝟎 𝟏
Before P’ After
Computer Vision 2-Image formation and representation
2-34
2D scaling using Homogeneous Coordinates
𝒔𝒙 𝟎 𝟎
𝑺 = 𝟎 𝒔𝒚 𝟎
𝟎 𝟎 𝟏
Before After
Computer Vision 2-Image formation and representation
2-35
2D rotation using Homogeneous Coordinates
𝑥 cos 𝜃 − y sin 𝜃 𝑥
𝑃′ → 𝑥 sin 𝜃 + 𝑦 cos 𝜃 = ? ∙ 𝑦
1 1
𝑋 𝑋
= 𝑹′ 𝟎 ∙ 𝑌 = 𝑹 ∙ 𝑌
𝟎 1
1 1
cos 𝜽 −sin 𝜽 𝟎
𝑹 = sin 𝜽 cos 𝜽 𝟎
𝟎 𝟎 𝟏
Before After
Computer Vision 2-Image formation and representation
2-36
Rotation in 3D
Rotate around each coordinate axis:
u=x’, v=y’
Computer Vision 2-Image formation and representation
2-43
Image Coordinates to Pixel Coordinates
Image coordinates have their origin C’ at the image
center where the z axis of the camera reference system
intersects the image plane.
On the other hands, digital images have their origin at
the lower-left corner of the image.
◆ Thus, 2D points in the image plane and 2D points in a
digital image are equal up to an offset translation vector
[cx, cy], where C’’= [cx, cy] is the location of C’ in the digital
image.
◆ In order to accommodate this change of coordinate systems,
the mapping is now described by translating the image
plane by cx and cy in the x and y direction.
Hence,
Original RGB colour image (upper left), and its decomposition into the
three contributing channels: Red (upper right), Green (lower left), and Blue
(lower right). For example, red is shown with high intensity in the red
channel,but in low intensity in the green and blue channel