Giter Club home page Giter Club logo

camera_model's Introduction

camera_model

相机内参标定和双目标定

支持多种相机模型:

  • pinhole model
  • kannala-brandt model
  • mei model
  • scaramuzza model

支持多种标定板

  • chessboard
  • circles grid
  • asymmetric circles grid
  • aruco makers
  • charuco makrers

编译 & 安装

依赖项

  • OpenCV (with opencv_contrib)
  • Ceres Solver
  • boost
cd camera_model
mkdir build
cd build
cmake ..
make
sudo make install

调用

编译安装之后, camera_model会作为共享库被安装在系统目录, 使用时无需添加源码,只添加依赖关系即可

cmake_minimum_required(VERSION 3.0)
project(camera_model_example)

add_executable(example example.cc)
target_link_libraries(example camera_model)

参考 & 感谢

part of camodocal

感谢原作者 Lionel Heng

感谢 YZF 整理camera_model

感谢 Tianbo 添加Scaramuzza模型实现

用法

相机内参标定 intrinsic_calib

Use intrinsic_calib.cc to calibrate your camera.

双目标定 stereo_calib

Use stereo_calib.cc to calibrate your camera.

Undistortion:

See Camera.h for general interface:

  • liftProjective: Lift points from the image plane to the projective space.
  • spaceToPlane: Projects 3D points to the image plane (Pi function)

案例

相机内参标定 intrinsic calib

mei model

./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model mei --camera-name fisheye_mei -v

pinhole model

./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model pinhole --camera-name fisheye_pinhole -v

kannala-brandt

./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model kannala-brandt --camera-name fisheye_kannala-brandt -v

scaramuzza

./intrinsic_calib -w 9 -h 6 -i ../data/fisheye -p left -e jpg --camera-model scaramuzza --camera-name fisheye_scaramuzza -v --view-results

asymmetric cirlces grid

./intrinsic_calib -w 4 -h 11 -i ../data/asymmetric_circles_grid -p asymmetric_circles_grid -e jpg --pattern asymmetric_circles_grid --camera-model pinhole --camera-name webcam -v --view-results

注意,这里一定要4x11, 设置为11x4就不行

circles grid

./intrinsic_calib -w 9 -h 6 -i ../data/circles_grid -p circles_grid -e jpg --pattern circles_grid --camera-model pinhole --camera-name circles_grid_cam -v --view-results

charuco marker

./intrinsic_calib -w 4 -h 6 -s 0.04 --marker-size 0.024 -i ../data/charuco -p charuco -e jpg --pattern charuco --dp ../data/pattern/detector_params.yml -d 10 --camera-model pinhole --camera-name charuco_cam -v --view-results
./intrinsic_calib -w 4 -h 6 -s 0.04 --marker-size 0.024 -i ../data/charuco -p charuco -e jpg --pattern charuco --dp ../data/pattern/detector_params.yml -d 10 --camera-model kannala-brandt --camera-name charuco_cam -v --view-results

stereo calibration

./stereo_calib -i ../data/stereo_images/ -e jpg --prefix-l left --prefix-r right --camera-model mei -v --view-results

stereo calibration circles (virtual test with mono image)

./stereo_calib -i ../data/circles_grid --pattern circles_grid -e jpg --prefix-l circles_grid --prefix-r circles_grid --camera-model mei -v --view-results

TODO

  • add aruco marker

camera_model's People

Contributors

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