Professional Documents
Culture Documents
Chapter 9. Camera Calibration and 3D Reconstruction
Chapter 9. Camera Calibration and 3D Reconstruction
Hà Nội, 2021 1
Chapter 9. Camera Calibration and 3D Reconstruction
1. Camera calibration
3. Pose estimation
4. Stereo vision
2
Chapter 9. Camera Calibration and 3D Reconstruction
1. Camera calibration
3. Pose estimation
4. Stereo vision
3
Camera calibration
4
Camera calibration
5
Camera calibration
6
Camera calibration
❖ After you calibrate a camera, to evaluate the accuracy of the estimated parameters,
you can:
➢ Plot the relative locations of the camera and the calibration pattern
➢ Calculate the reprojection errors
➢ Calculate the parameter estimation errors.
7
Camera calibration
8
Camera calibration
9
Camera calibration
11
Camera calibration
12
Camera calibration
❖ Extrinsic Parameters
➢ The extrinsic parameters consist of a rotation, R, and a translation, t. The origin of the
camera’s coordinate system is at its optical center and its x- and y-axis define the image plane.
13
Camera calibration
❖ Intrinsic Parameters
➢ The intrinsic parameters include the focal length, the optical center, also known as the
principal point, and the skew coefficient. The camera intrinsic matrix, K, is defined as:
14
Camera calibration
❖ Intrinsic Parameters
15
Camera calibration
16
Camera calibration
❖ Radial Distortion
➢ Radial distortion occurs when light rays bend more near the edges of a lens than they do at its
optical center. The smaller the lens, the greater the distortion.
17
Camera calibration
❖ Radial Distortion
➢ The radial distortion coefficients model this type of distortion. The distorted points are
denoted as (xdistorted, ydistorted):
•x, y — Undistorted pixel locations. x and y are in normalized image coordinates. Normalized
image coordinates are calculated from pixel coordinates by translating to the optical center and
dividing by the focal length in pixels. Thus, x and y are dimensionless.
•k1, k2, and k3 — Radial distortion coefficients of the lens.
•r2: x2 + y2
18
Camera calibration
❖ Tangential Distortion
➢ Tangential distortion occurs when the lens and the image plane are not parallel. The
tangential distortion coefficients model this type of distortion.
19
Camera calibration
❖ Tangential Distortion
➢ The distorted points are denoted as (xdistorted, ydistorted):
•x, y — Undistorted pixel locations. x and y are in normalized image coordinates. Normalized
image coordinates are calculated from pixel coordinates by translating to the optical center and
dividing by the focal length in pixels. Thus, x and y are dimensionless.
•p1 and p2 — Tangential distortion coefficients of the lens.
•r2: x2 + y2
20
Camera calibration
Image plane
21
Camera Calibration with OpenCV
22
Chapter 9. Camera Calibration and 3D Reconstruction
1. Camera calibration
3. Pose estimation
4. Stereo vision
23
Robot Camera Calibration
Eye To Hand Eye In Hand
A1 B1 A1
B1
B2
B2
A2 A2
Ai: transformation from Base → Gripper Ai: transformation from Base → Gripper
Bi: transformation from Target → Cam Bi: transformation from Cam → Target
X: transformation from Gripper → Target??? X: transformation from Gripper → Cam???
25
Robot Camera Calibration
Eye To Hand
A1 B1 A1XB1 = A2XB2
A2-1A1XB1B1-1 = A2-1A2XB2B1-1
A2-1A1X = XB2B1-1
AX = XB
A = A2-1A1
B2
B = B2B1-1
A2
➢ https://github.com/jhu-lcsr/handeye_calib_camodocal
➢ https://github.com/hengli/camodocal
➢ https://visp-doc.inria.fr/doxygen/visp-daily/classvpHandEyeCalibration.html#a68ab673312cc098bf8ed4f22b2d04d16
➢ https://github.com/zhixy/SolveAXXB
28
Chapter 9. Camera Calibration and 3D Reconstruction
1. Camera calibration
3. Pose estimation
4. Stereo vision
29
Camera Pose Estimation
30
Camera Pose Estimation
❖ Algorithm
➢ The algorithm for determining pose estimation is based on the Iterative Closest Point
algorithm. The main idea is to determine the correspondences between 2D image features and
points on the 3D model curve.
31
Camera Pose Estimation with OpenCV
32
Chapter 9. Camera Calibration and 3D Reconstruction
1. Camera calibration
3. Pose estimation
4. Stereo vision
33
Stereo Vision
34
Stereo Vision
Left Right
images images
35
Stereo Vision
36
Stereo Vision
37
Stereo Vision
Epipolar lines
Epipolar lines
38
Stereo Vision
39
Stereo Vision
40
Stereo Vision
41
Stereo Vision
42
Stereo Vision
43
Stereo Vision
44
Stereo Vision
45