Giter Site home page Giter Site logo

camera-calibration's Introduction

Camera-Calibration

Preface

In this repository, we do camera calibration from scratch. For convenience, we will use some opencv libraries when it is nothing to do with camera calibration(e.g. reading images or finding chessboard corners). The purpose of this repository is to know camera calibration better.

The way to find the chessboard corners is not the key part in this repository, so we utilized the function in OpenCV directly.

NOTE: We follow the algorithms and the notations written in chapter 4 in reference [2]. It doesn't optimize the code(may be slow) but keep the order the same as in reference [2].

Support Models

Camera Number: Monocular only
Camera(Projection) Model: pinhole
Distortion Model: radial distortion

Terms In Code

In this repository, we follow the list of symbols and notation defined in table 1 in reference [2] and always use terms 'model points' and 'sensor points'.
Some other common terms refer to the same things are defined as follows:

  1. Points in 3D world coordinate: model points, target points, object points
  2. Points in 2D image(sensor) coordinate: image points, sensor points

Result

Focal Length Principal Point Skew Distortion Reprojection Error(avg.)
(534.744914, 534.993645) (342.223774, 232.569257) 0.598208 (-0.298821, 0.138997) 0.143098

NOTE: The result will a litte different because of the result of LM algorithm may be different.

Future

If someone wants to improve the result more, the following reference may help:

  1. Liu, Zhen, et al. "High-accuracy calibration of low-cost camera using image disturbance factor." Optics Express 24.21 (2016): 24321-24336.
  2. Datta, Ankur, Jun-Sik Kim, and Takeo Kanade. "Accurate camera calibration using iterative refinement of control points." 2009 IEEE 12th International Conference on Computer Vision Workshops, ICCV Workshops. IEEE, 2009.

Reference

Theory

  1. Zhang, Zhengyou. "A flexible new technique for camera calibration." IEEE Transactions on pattern analysis and machine intelligence 22.11 (2000): 1330-1334.
  2. Burger, Wilhelm. "Zhang’s camera calibration algorithm: in-depth tutorial and implementation." HGB16-05 (2016): 1-6.
  3. How SVD solve the direct linear transformation(DLT) problem for estimating the homography in step 1?
  4. Basic concepts of the homography explained with code - OpenCV
  5. CSE/EE486 Computer Vision I, Robert Collins

Implementation

  1. Find chessboard corners
  2. Camera Calibration From Scratch - Python

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.