Giter Site home page Giter Site logo

binbin-xu / yac Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chutsu/yac

0.0 0.0 0.0 18.95 MB

YAC - Yet Another Calibrator

License: MIT License

Shell 0.64% CMake 3.71% C++ 83.48% Python 11.90% Makefile 0.17% Dockerfile 0.03% MATLAB 0.07%

yac's Introduction

YAC - Yet Another Calibrator

Yet Another Calibrator (YAC) is a calibration tool for calibrating RGB cameras. Specifically:

  • Camera intrinsics
  • Stereo camera intrinsics and extrinsics
  • Mocap-marker to camera extrinsics

Supported projection-distortion models:

  • pinhole-radtan4
  • pinhole-equi4

Dependencies

# Ubuntu packages
libyaml-cpp-dev
libeigen3-dev
libceres-dev
libopencv-dev
libomp-dev (optional)

# Custom (see deps dir)
Modified apriltag3 (https://github.com/AprilRobotics/apriltag)
Modified apriltags (https://github.com/chutsu/apriltags)

Build

For the lazy :

# The following assumes you have a catkin workspace at $HOME/catkin_ws
# If not edit the CATKIN_WS variable in the Makefile

git clone https://github.com/chutsu/yac
cd yac
make deps
make release

Or standard approach:

# Clone repo to your catkin workspace
cd <your catkin workspace>/src
git clone https://github.com/chutsu/yac

# Install dependencies
cd yac && make deps

# Build yac
catkin build -DCMAKE_BUILD_TYPE=Release yac yac_ros
# Note: Optimization will be very slow if not built in RELEASE mode.

Calibration Target

yac uses a grid of AprilTags, a.k.a an AprilGrid, as a calibration target.

AprilGrid

Click here to download and print the AprilGrid. During data collection make sure the calibration target is as flat as possible.

Calibrate Camera Intrinsics or Stereo Intrinsics and Extrinsics

First inorder to calibrate a monocular camera or stereo camera pair we need to create the calibration configuration file. For example calib_intel_d435i.yaml configuration file:

ros:
  bag: "/data/intel_d435i/imucam-1.bag"
  cam0_topic: "/stereo/camera0/image"

calib_target:
  target_type: 'aprilgrid'  # Target type
  tag_rows: 6               # Number of rows
  tag_cols: 6               # Number of cols
  tag_size: 0.088           # Size of apriltag, edge to edge [m]
  tag_spacing: 0.3          # Ratio of space between tags to tagSize
                            # Example: tag_size=2m, spacing=0.5m
                            #          --> tag_spacing=0.25[-]

cam0:
  proj_model: "pinhole"
  dist_model: "radtan4"
  lens_hfov: 69.4
  lens_vfov: 42.5
  resolution: [640.0, 480.0]
  rate: 30.0

cam1:
  proj_model: "pinhole"
  dist_model: "radtan4"
  lens_hfov: 69.4
  lens_vfov: 42.5
  resolution: [640.0, 480.0]
  rate: 30.0

The above tells yac where to find the rosbag containing the calibration data, the calibration target and camera details. Now, we need to pass that to a yac calibrator via the roslaunch file calib_mono.launch or calib_stereo.launch:

# To calibrate cam0 intrinsics only
roslaunch yac calib_mono.launch config_file:=<path to calib_intel_d435i.yaml>

# To calibrate stereo camera pair intrinsics and extrinsics
roslaunch yac calib_stereo.launch config_file:=<path to calib_intel_d435i.yaml>

LICENCE

MIT

yac's People

Contributors

chutsu 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.