0% found this document useful (0 votes)
8 views

lecture19 Camera Model cont

The document explains the relationship between f-stop numbers, aperture size, and their effects on exposure and depth of field in photography. It also covers camera parameters such as focus, focal length, exposure time, ISO, and the mathematical modeling of projection from 3D space to 2D images using homogeneous coordinates and transformation matrices. Additionally, it discusses intrinsic and extrinsic camera parameters necessary for accurate image measurements and projections.

Uploaded by

kayakbackwards
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

lecture19 Camera Model cont

The document explains the relationship between f-stop numbers, aperture size, and their effects on exposure and depth of field in photography. It also covers camera parameters such as focus, focal length, exposure time, ISO, and the mathematical modeling of projection from 3D space to 2D images using homogeneous coordinates and transformation matrices. Additionally, it discusses intrinsic and extrinsic camera parameters necessary for accurate image measurements and projections.

Uploaded by

kayakbackwards
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

f-stop number control aperture size

• f-stop N = f / D where f is focal length and D is


diameter of the entrance pupil (pinhole)
• Example; f = 10 mm, D = 5 mm f-stop = 2
• When you increase the f-number the lens lets in
less light (the image is darker)
• But the depth of field is greater
• When you decrease the f-number the lens lets in
more light (the image is brighter)
• But the depth of field is smaller
• Aperture affects exposure time
• Larger aperture can be open for less time
• Smaller aperture needs to be open for more time
Aperture size
• Change aperture size =changes depth of field
• Blurriness of out of focus objects depends on the aperture size
• Larger aperture means smaller depth of field but it also lets in more
light – and opposite
Camera parameters
Focus – Shifts the depth that is in focus. Controlled by focus ring.
This is a ring on lens elements which moves the lens body.

Focal length – Adjusts the zoom, i.e., wide angle or telephoto lens.
Internally a mechanical assembly of lens elements. A fixed focal
length lens only has one lens element.

Aperture – Adjusts the depth of field and the amount of light let
into the sensor. Controlled by changing the f-stop.

Exposure time – How long an image is exposed. The longer an


image is exposed the more light, but could result in motion blur.

ISO – Adjusts the sensitivity of the “film”. Basically a gain function


for digital cameras. Increasing ISO also increases noise.
Modeling Projection
• How do points in 3D space (world) project to image
plane? If I know a point in 3D, can I compute to
which pixel it projects?
Modeling Projection
• We will use the pinhole model as an approximation.
Modeling Projection

• Since it is easier to think in a non-upsideown world, we will


work with the virtual image, and just call it the image plane.
Modeling Projection

• Optical or Principal axis is orthogonal to the image plane.


Funny things happen during
projection …
Lengths can’t be trusted...

A’
C’

B’

Figure by David Forsyth


Camera and world coordinate frame
Similar Triangles
Perspective Eqn. – Similar Triangles

f is the pinhole camera focal


length. Don’t mix it up with the
lens focal length.
Perspective Eqn. – Similar Triangles
Coordinate Transformation – 2D
Homogeneous Coordinates
2D Transformation with Homogeneous Coordinates
Homogeneous coordinates (In 2D)
Why use homogeneous coordinates
• We require a composition (sequence of) rotations,
translations and projections
• Even the projection is a matrix multiplication
• Each of these can be described by matrix operations using
homogeneous coordinates
• Composing them together, applying them one after the
other just matrix multiplication
• The final operation, which takes a 3d point and produces a
2d image is one big matrix multiplication
Translations with homogeneous coordinates
(2D)
Scaling with homogeneous coordinates
(2D)
Rotation with homogeneous coordinates
(2D)
3D Rotation about X-Axis
3D Rotation about Y-Axis
3D Rotation about Z-Axis
3D Rotation Matrix – Euler Angles
• Rotate around each coordinate axis:

Combine the three rotations: 𝑅 = 𝑅𝑥 𝑅𝑦 𝑅𝑧


• Can describe any 3D rotation by a sequence of rotations
about the three axis
• So 𝑅 = 𝑅𝑥 𝑅𝑦 𝑅𝑧 or, 𝑅𝑥 𝑅𝑧 𝑅𝑦 , or, 𝑅𝑦 𝑅𝑥 𝑅𝑧 or, 𝑅𝑦 𝑅𝑧 𝑅𝑥 or,
𝑅𝑧 𝑅𝑥 𝑅𝑦 or, 𝑅𝑧 𝑅𝑦 𝑅𝑥
3D Rotation Matrix
• When you specify the values for each axis you must also
specify order of operations
• Different orders have different angle values
• Succeeding rotations are about an already modified set of
three axis
• Remember matrix multiplication is not commutative so AB is
not same as BA
• A rotation matrix has 9 elements, but we need only three
numbers to specify a 3D rotation uniquely!
3D Rotation Matrix - Examples
Four Coordinate Frames
Perspective Projection
World and Camera Coordinate Frames

• World coordinate frame origin is some arbitrary


location and orientation in space
• Camera coordinate frame has origin at camera center
of projection
• X and Y axis are aligned with image plane
• Z axis is looking down the optical center, which is called
the principal axis
• Consider any point in 3D space that same point has
different coordinates in the two different coordinate
frames
• Let these be Pc and Pw (Vectors of the length 3)
Camera and world coordinate frame
World to Camera Transformation
World to Camera Transformation
World to Camera Coordinate Transform
Camera Coordinates to Image Coordinates
Image and Camera frames
• Now we look from the camera outward and image origin is
the top left pixel (0,0)
Put All Together – World to Pixel
Verification of matrix multiplications
Verification of matrix multiplications
Four Coordinate Frames -> three
transformations
Camera Calibration
Camera Parameters
• Extrinsic parameters define the location and
orientation of the world reference frame with respect
to the camera reference frame
• Depend on the external world, so they are extrinsic
• Intrinsic parameters link pixel coordinates in the image
with the corresponding coordinates in the camera
reference frame
• An intrinsic characteristic of the camera
• Image coordinates are in pixels
• Camera coordinates are in millimetres
• In formulas that do conversions the units must match!
Intrinsic Camera Parameters

K is a 3x3 upper triangular matrix, called the Camera Calibration Matrix.


Sometimes 𝑓/𝑆𝑥 is called 𝑓𝑥 and 𝑓/𝑆𝑦 is called 𝑓𝑦
There are five intrinsic parameters:
(a) The pixel sizes in x and y directions 𝑆𝑥 , 𝑆𝑦 in millimeters/pixel
(b) The focal length 𝑓 in millimeters
(c) The principal point (𝑜𝑥, 𝑜𝑦) in pixels, which is the point where the
optic axis intersects the image plane.
(d) The units of 𝑓/𝑆𝑥 and 𝑓/𝑆𝑦 are in pixels, why is this so?
Camera intrinsic parameters
• Can write three of these parameters differently by
letting 𝑓/𝑆𝑥 = 𝑓𝑥 𝑎𝑛𝑑 𝑓/𝑆𝑦 = 𝑓𝑦
• Then intrinsic parameters are 𝑜𝑥, 𝑜𝑦, 𝑓𝑥, 𝑓𝑦
• The units of these parameters are pixels!
• In practice pixels are square (𝑆𝑥 = 𝑆𝑦 ) so that means fx
should equal fy for most cameras
• However, every explicit camera calibration process (using
calibration objects) introduces some small errors
• These calibration errors make fx not exactly equal to fy
• So in OpenCV the intrinsic camera parameters are the
four following 𝑜𝑥, 𝑜𝑦, 𝑓𝑥, 𝑓𝑦
• However fx is usually very close to fy and if this is not the case
then there is a problem
Extrinsic Parameters and Proj. Matrix
Create a complete projection matrix

𝑜𝑥 = 320, 𝑜𝑦 = 240
Using the projection matrix - example
Do we need intrinsic camera params?
• If we are just labelling objects in images we do not
need to know intrinsic camera params
• Also true for other applications like panoramas.
• If we want to measure objects or navigate in an
environment we need camera params
• Also true for applications like stereo vision.
• For high accuracy need linear params (K) and non-linear
params to cancel Radial and tangential distortions.
• But can still get results with only K
• Can get an estimate of K from the image
• But for non-linear params need calibration

You might also like