📚
DLIP
  • Introduction
  • Prerequisite
  • Image Processing Basics
    • Notes
      • Thresholding
      • Spatial Filtering
      • Masking with Bitwise Operation
      • Model n Calibration
    • Tutorial
      • Tutorial: Install OpenCV C++
      • Tutorial: Create OpenCV Project
      • Tutorial: C++ basics
      • Tutorial: OpenCV Basics
      • Tutorial: Image Watch for Debugging
      • Tutorial: Spatial Filter
      • Tutorial: Thresholding and Morphology
      • Tutorial: Camera Calibration
      • Tutorial: Color Image Processing
      • Tutorial: Edge Line Circle Detection
      • Tutorial: Corner Detection and Optical Flow
      • Tutorial: OpenCV C++ Cheatsheet
      • Tutorial: Installation for Py OpenCV
      • Tutorial: OpenCv (Python) Basics
    • LAB
      • Lab Report Template
      • Lab Report Grading Criteria
      • LAB Report Instruction
      • LAB: Grayscale Image Segmentation
        • LAB: Grayscale Image Segmentation -Gear
        • LAB: Grayscale Image Segmentation - Bolt and Nut
      • LAB: Color Image Segmentation
        • LAB: Facial Temperature Measurement with IR images
        • LAB: Magic Cloak
      • LAB: Straight Lane Detection and Departure Warning
      • LAB: Dimension Measurement with 2D camera
      • LAB: Tension Detection of Rolling Metal Sheet
  • Deep Learning for Perception
    • Notes
      • Lane Detection with Deep Learning
      • Overview of Deep Learning
        • Object Detection
        • Deep Learning Basics: Introduction
        • Deep Learning State of the Art
        • CNN, Object Detection
      • Perceptron
      • Activation Function
      • Optimization
      • Convolution
      • CNN Overview
      • Evaluation Metric
      • LossFunction Regularization
      • Bias vs Variance
      • BottleNeck Unit
      • Object Detection
      • DL Techniques
        • Technical Strategy by A.Ng
    • Tutorial - PyTorch
      • Tutorial: Install PyTorch
      • Tutorial: Python Numpy
      • Tutorial: PyTorch Tutorial List
      • Tutorial: PyTorch Example Code
      • Tutorial: Tensorboard in Pytorch
      • Tutorial: YOLO in PyTorch
        • Tutorial: Yolov8 in PyTorch
        • Tutorial: Train Yolo v8 with custom dataset
          • Tutorial: Train Yolo v5 with custom dataset
        • Tutorial: Yolov5 in Pytorch (VS code)
        • Tutorial: Yolov3 in Keras
    • LAB
      • Assignment: CNN Classification
      • Assignment: Object Detection
      • LAB: CNN Object Detection 1
      • LAB: CNN Object Detection 2
      • LAB Grading Criteria
    • Tutorial- Keras
      • Train Dataset
      • Train custom dataset
      • Test model
      • LeNet-5 Tutorial
      • AlexNet Tutorial
      • VGG Tutorial
      • ResNet Tutorial
    • Resource
      • Online Lecture
      • Programming tutorial
      • Books
      • Hardware
      • Dataset
      • Useful sites
  • Must Read Papers
    • AlexNet
    • VGG
    • ResNet
    • R-CNN, Fast-RCNN, Faster-RCNN
    • YOLOv1-3
    • Inception
    • MobileNet
    • SSD
    • ShuffleNet
    • Recent Methods
  • DLIP Project
    • Report Template
    • DLIP 2021 Projects
      • Digital Door Lock Control with Face Recognition
      • People Counting with YOLOv4 and DeepSORT
      • Eye Blinking Detection Alarm
      • Helmet-Detection Using YOLO-V5
      • Mask Detection using YOLOv5
      • Parking Space Management
      • Vehicle, Pedestrian Detection with IR Image
      • Drum Playing Detection
      • Turtle neck measurement program using OpenPose
    • DLIP 2022 Projects
      • BakeryCashier
      • Virtual Mouse
      • Sudoku Program with Hand gesture
      • Exercise Posture Assistance System
      • People Counting Embedded System
      • Turtle neck measurement program using OpenPose
    • DLIP Past Projects
  • Installation Guide
    • Installation Guide for Pytorch
      • Installation Guide 2021
    • Anaconda
    • CUDA cuDNN
      • CUDA 10.2
    • OpenCV
      • OpenCV Install and Setup
        • OpenCV 3.4.13 with VS2019
        • OpenCV3.4.7 VS2017
        • MacOS OpenCV C++ in XCode
      • Python OpenCV
      • MATLAB-OpenCV
    • Framework
      • Keras
      • TensorFlow
        • Cheat Sheet
        • Tutorial
      • PyTorch
    • IDE
      • Visual Studio Community
      • Google Codelab
      • Visual Studio Code
        • Python with VS Code
        • Notebook with VS Code
        • C++ with VS Code
      • Jupyter Notebook
        • Install
        • How to use
    • Ubuntu
      • Ubuntu 18.04 Installation
      • Ubuntu Installation using Docker in Win10
      • Ubuntu Troubleshooting
    • ROS
  • Programming
    • Python_Numpy
      • Python Tutorial - Tips
      • Python Tutorial - For Loop
      • Python Tutorial - List Tuple, Dic, Set
    • Markdown
      • Example: API documentation
    • Github
      • Create account
      • Tutorial: Github basic
      • Tutorial: Github Desktop
    • Keras
      • Tutorial Keras
      • Cheat Sheet
    • PyTorch
      • Cheat Sheet
      • Autograd in PyTorch
      • Simple ConvNet
      • MNIST using LeNet
      • Train ConvNet using CIFAR10
  • Resources
    • Useful Resources
    • Github
Powered by GitBook
On this page
  • General camera model
  • Extrinsic Matrix
  • Intrinsic Matrix
  • Camera Calibration
  • Intrinsic Calibration
  • Zhang calibration method
  • Appendix

Was this helpful?

  1. Image Processing Basics
  2. Notes

Model n Calibration

PreviousMasking with Bitwise OperationNextTutorial

Last updated 3 years ago

Was this helpful?

General camera model

There are 3 Coordinate Frames

  • World {O}, Camera frame {C}, Image plane{Im}

The transformation between coordinate frames are

  • Euclidean: {O} -> {C}, Mext : the camera extrinsic matrix

  • Perspective Projection: {C}-> {Im}, Mint : the camera intrinsic matrix

x: Image Coordinates: (u,v,1)

K: Intrinsic Matrix (3x3)

R: Rotation (3x3)

t: Translation (3x1)

X: World Coordinates: (X,Y,Z,1)

Extrinsic Matrix

Finding the camera external matrix of Mext, which is the transformation from {O} to {C}: Xc=[R | T] Xo

Here, R, T are from frame {C} to {O}. Depending on the notation, it can be the pose of {O} w.r.t {C}

Intrinsic Matrix

Perspective projection in {C}: From {C} (3D) to {C} (2D)

p is NOT in pixel unit. It is in (mm) at distance 'f' from the {C} center point.

The relationship between P and p are based on the similar triangle such as

Unit Conversion from {C} 2D (mm) to {Im} 2D

On the same image plane, the unit is changed from (mm) to (px). This depends on the mm-px scale unit, which is the image sensor pixel size.

Here, we assume that there is NO skew and lens distortion

Intrinsic camera matrix, Mint

Putting the above two equations, the matrix Mint is the transformation between the camera frame {C} 3D(mm) and the image plane frame {Im} 2D(px)

The scale factor cZ is not known from one frame of image. It is the actual distance of the object from the projection center.

Thus, from the image acquisition, we express the object position in px without knowing the exact scale as

Camera Calibration

It is determining (1) Extrinsic Matrix (2) Intrinsic Matrix including lens distortion

  • Intrinsic Calibration

    • Lens distortion

    • Camera internal parameters

  • Extrinsic Calibration

    • 6-DOF relative pose between the camera frame (3-D) and the world coordinate frame (3-D)

    • R, T are from {O} to {C}

Intrinsic Calibration

Camera parameters

  • focal length (mm)

  • image center (px)

  • effective pixel size (px/mm)

Lens Distortion

  • Chromatic aberration

    • Index of refraction for glass varies as a function of wavelength.

    • Different color rays have different refraction

  • Spherical aberration

    • Real lenses are not thin and suffers from geometric aberration

  • Radial Distortion

    • Distortion at the periphery of the image

Xp: points’ location when lens is perfectly undistorted

Xd: points’ location when lens is distorted

Use a set of many points to find the distortion parameters such as corner points of a chess board.

Zhang calibration method

Zhang, Zhengyou. "A flexible new technique for camera calibration." IEEE Transactions on pattern analysis and machine intelligence 22.11 (2000): 1330-1334.

Read here for detailed explanation

Appendix

Q What are affine, projection, projective, perspective, homography?

  • Projection is mapping 3D to 2D

    • orthography, perspective(pinhole camera) and more

  • Transformation: 2D-2D or 3D-3D

    • Euclidean, affine, similarity, projective

    • Projective Transformation is also known as perspective transformation or homography

    ****

Transformation: 2D-2D or 3D-3D (in the same dimension)

  • projective: parallel lines converge to vanishing point

Transformation Types

  • Euclidean: preserves lengths and angles(isometry)

  • Similarity: isotropic scaling preserves angle, shape, ratios of length, areas, angles

  • Affine: non-singular transformation preserves parallelism A: n by n non-singular matrix (3x3 for 3D point)

  • Projective: linear transformation on homogeneous n-vector (3D point: 4 x1 vector)

    • Perspective projection(3D-2D) is a subclass of projective transformation

    • P: non-singular nxn (4x4 for 3D point)

http://staff.fh-hagenberg.at/burger/publications/reports/2016Calibration/Burger-CameraCalibration-20160516.pdfstaff.fh-hagenberg.at