Git Product home page Git Product logo

calibration-toolbox's Introduction

Camera Calibration & Undistortion Toolbox

This repository is for scripts and executables that we can use to calibrate and undistort images from different cameras. Until our long-term needs are further clarified, it is not yet a unified process, so please refer to this README for specific instructions.

Build and install

First, you'll need OpenCV. (TODO in future: Add to repo as a static lib.) https://linuxize.com/post/how-to-install-opencv-on-ubuntu-20-04/

Then, in the repository directory,

mkdir build && cd build
cmake ..
cmake --build .

To generate a calibration profile

Given a directory with chessboard images, this program will calculate and save calibration and undistortion parameters to a .yaml file.

./generate_calibration --inputDir ~/your/input/imgs --outputDir ~/your/output/txt --cameraType type --chessboardW width --chessboardH height

Where type can be:

  • mdc3_120
  • mdc3_60
  • kowa3_5mm
  • TODO? Smount
  • TODO? 6mm_1_8

The output .yaml file will include: camera matrix, distortion coefficients, undistortion map1, undistortion map2

Example:

./generate_calibration --inputDir /home/avelasco/CalibFiles/mdc3_60/original --outputDir /home/avelasco/CalibFiles/mdc3_60/ --cameraType mdc3_60 --chessboardW 5 --chessboardH 8

To undistort a list of images

undistort_images uses a set of pre-computed calibrations and applies an undistortion to the images in the given directory.

./undistort_images --inputDir home/calibration/distorted_images/ --outputDir home/calibration/undistorted_images/  --cameraType type

Where type can be:

  • mdc3_120
  • mdc3_60
  • kowa3_5mm
  • TODO? Smount
  • TODO? 6mm_1_8

Example:

.undistort_images --inputDir /home/avelasco/CalibFiles/mdc3_60/original/ --outputDir /home/avelasco/CalibFiles/mdc3_60/undistorted/ --cameraType mdc3_60

calibration-toolbox's People

Contributors

a-velasco avatar

Watchers

 avatar

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.