CS代写 CS 5187 Vision and Image

CS 5187 Vision and Image
Source: S. Lazebnik

Reading • Szeliski 2.1.3-2.1.6

Copyright By PowCoder代写 加微信 powcoder

Image formation
• Let’s design a camera
– Idea 1: put a piece of film in front of an object – Do we get a reasonable image?

Pinhole camera
• Add a barrier to block off most of the rays – This reduces blurring
– The opening known as the aperture
– How does this transform the image?
– The image is upside-down

Components of a Computer Vision System
Scene Interpretation

Pinhole and the Perspective Projection
image plane
r=(x, y,z)
optical axis
effective focal length, f’
r’=(x’, y’, f ‘)
r’ = r x’ = x y’ = y f’z f’zf’z

Pinhole camera model
Figure from Forsyth
f = Focal length
c = Optical center of the camera
Real object

Pinhole camera model
• 3D point 𝑃 = (𝑥, 𝑦, 𝑧) projects to 2D image
point 𝑃′ = (𝑥′, 𝑦′) • By symmetric
𝑥=𝑥′ and 𝑦=𝑦′ 𝑧𝑓 𝑧𝑓
𝑃′ = (𝑥′,𝑦′) = (𝑓𝑥,𝑓𝑦) 𝑧𝑧
• Simplest form of perspective projection

Camera parameters
• How can we model the geometry of a camera?
Two important coordinate systems: 1. World coordinate system
2. Camera coordinate system
“The World”

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 𝑐𝑦 • Imageprinciplepoint:
Intersection between the camera optical axis and image plane
𝑃′ =(𝑥′,𝑦′)=(𝑓𝑥+𝑐𝑥,𝑓𝑦+𝑐𝑦) 𝑧𝑧

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 Homogeneous coordinates to the rescue!
homogeneous image homogeneous scene coordinates coordinates
Converting from homogeneous coordinates

Intrinsic Parameters In matrix form: 𝑥
𝛼 0 𝑐𝑥 0 𝑦 𝑃′=0𝛽𝑐𝑦 0𝑧=𝑀𝑃
𝛼 0 𝑐𝑥 𝑃′=𝑀𝑃=0𝛽𝑐𝑦 𝐼0𝑃=𝐾𝐼0𝑃
K: Camera matrix (or calibration matrix)
𝑃′ =(𝑥′,𝑦′)=(α𝑥+𝑐𝑥,𝛽𝑦+𝑐𝑦) 𝑧𝑧

Which of the following intrinsic parameters will be changed if an image is down-sampled by a factor of 4?
a) 𝑐𝑥 and 𝑐𝑦
b) Focal length
c) None will be changed

Extrinsic Parameters
• What if the information about the 3D world is available in a different coordinate system?
• We need to relate the points from world reference system to the camera reference system
• Given a point in world reference system 𝑃 , the camera 𝑤
coordinate is computed as 𝑃=𝑅𝑇𝑃
World coordinate
3D->2D Extrinsic Parameters Intrinsic Parameters
Camera coordinate
Pixel coordinate

Projection Matrix
• Combining intrinsic and extrinsic parameters, we have extrinsic parameters
𝑃′=𝐾𝑅 𝑇𝑃 =𝑀𝑃 𝑤𝑤
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

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?

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com