0% found this document useful (0 votes)
11 views20 pages

Camera Calibration

The document provides an introduction to camera calibration in computer vision, detailing the pinhole camera model, projection geometry, and the effects of distortion. It discusses the mathematical relationships involved in projecting real-world points onto an image plane, including focal length, pixel scaling, and the intrinsic camera matrix. Additionally, it covers methods for 2D calibration and the types of lens distortions that can affect image quality.
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)
11 views20 pages

Camera Calibration

The document provides an introduction to camera calibration in computer vision, detailing the pinhole camera model, projection geometry, and the effects of distortion. It discusses the mathematical relationships involved in projecting real-world points onto an image plane, including focal length, pixel scaling, and the intrinsic camera matrix. Additionally, it covers methods for 2D calibration and the types of lens distortions that can affect image quality.
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/ 20

Introduction to Computer Vision

(ME-4201)

Camera Calibration
Phung Thanh Huy
Department of Mechatronics
Ho Chi Minh City University of Technology
Vietnam National University Ho Chi Minh City
Ver2024.1

Ho Chi Minh City– 2024


Camera Calibration

- Distance/ Position

- Distortion

- Color Color checker

Camera Calibration|2
Camera Calibration
Where to pick and place?

Camera Calibration|3
Camera Model
Pin hole model
• Camera obscura
Small hole in the wall of a dark room projects the outside world top-down

Camera Calibration|4
Camera Model
Pin hole model
• Light is envisioned as entering from the scene or a distant object
• A single ray enters the pinhole from any particular point in that scene
• The point is “projected” onto an imaging surface (image plane).
• For the idealized pinhole camera, the distance from the pinhole aperture to
the screen is precisely the focal length

𝑋
𝑥 = −𝑓 ∙
𝑍
𝑓: focal length.
Z: distance from the camera to the object.
X: object’s height.

Camera Calibration|5
Camera Model
Projection
• Swap the pinhole and the image plane.
• The point in the pinhole is reinterpreted as the center of projection.
• The point at the intersection of the image plane and the optical axis is
referred to as the principal point
• For a point 𝑄 𝑋, 𝑌, 𝑍 , the projected point on the image plane 𝑞(𝑥,
Ԧ 𝑦, 𝑓)

𝑋
𝑥 = −𝑓 ∙
𝑍

Camera Calibration|6
Camera Model
Projection
• If the projection axis is not identical to the imaging axis, 𝑐𝑥 and 𝑐𝑦 are used to
model a possible displacement (away from the optic axis) of the center of
coordinates on the projection screen.
• The projection of the real-world point 𝑄 𝑋, 𝑌, 𝑍 on the image screen is
𝑥𝑠𝑐𝑟𝑒𝑒𝑛 , 𝑦𝑠𝑐𝑟𝑒𝑒𝑛

𝑐𝑥 , 𝑐𝑦

Image coordinate origin

Camera Calibration|7
Camera Model
Projection
• 𝑓 is focal length. In real world, 𝑓 is measured by mm, cm,…, denoted by F.
• In image, the points distance are pixels.
• The scale of 𝑥 direction and 𝑦 direction might be different. We use a notation:
𝑓𝑥 = 𝐹 ∙ 𝑠𝑥 , 𝑓𝑦 = 𝐹 ∙ 𝑠𝑦

𝑠𝑥 : pixel/mm by 𝑥 direction
𝑠𝑦 : pixel/mm by 𝑦 direction

𝑐𝑥 , 𝑐𝑦

Image coordinate origin

Camera Calibration|8
Camera Model
Projective Geometry
• The points 𝑄𝑖 𝑋𝑖 , 𝑌𝑖 , 𝑍𝑖 are snapped to the image, represented by 𝑞Ԧ𝑖 𝑥, 𝑦 on
the image.

• However, image frame may not be exactly rectangular due to sensor


manufacturing errors

𝑋 𝑌
𝑥 = 𝑓𝑥 − 𝑓𝑥 cot 𝜃 + 𝑐𝑥
𝑍 𝑍
𝑓𝑦 𝑌
𝑦= + 𝑐𝑦
𝑠𝑖𝑛𝜃 𝑍

θ: skew angle between x- and y-axis

Camera Calibration|9
Camera Model
Projective Geometry
• To consider skewness

𝑓𝑥 𝑠 𝑐𝑥
𝑀→𝐾= 0 𝑓𝑦∗ 𝑐𝑦
0 0 1

𝑓𝑦
𝑓𝑦∗ =
sin 𝜃

𝐾 is intrinsic matrix of a camera:


1) Translate to image center
2) Scale to pixel size
3) Perspective Projection

Camera Calibration|10
Camera Model
Rotation and Translation of Cameras

𝑞Ԧ = 𝑀𝑄
𝑀=𝐾 𝑅𝑡

Camera Calibration|11
Camera Model
Rotation and Translation of Cameras

Camera Calibration|12
2D Calibration
2D camera calibration

Camera Calibration|13
2D Calibration
2D camera calibration

Multi plane
3D calibration tool

Camera Calibration|14
2D Calibration
Calculate K

Choose a reference Position: Calculate R and t

Camera Calibration|15
2D Calibration
Calculate K

Camera Calibration|16
2D Calibration
2D camera calibration

Camera Calibration|17
2D Calibration
2D camera calibration
Get (x, y) in Image, what is X, Y in real world?

Camera Calibration|18
Distortion and undistortion
Lens distortion (Radial Distortion)

Camera Calibration|19
Distortion and undistortion
Tangential Distortion

Camera Calibration|20

You might also like