Giter Site home page Giter Site logo

omni_cam's Introduction

omni_cam

C++ implementation of the polynomial omnidirectional camera model by Davide Scaramuzza. The implementation works with the output of the OCamCalib toolbox.

In this code, the projection and backprojection functions are implemented. The Jacobian for the projection (i.e., image coordinates w.r.t. 3D point) is implemented as well.

Note that the visibility check in this implementation only checks the boundary of the image. Since images from fisheye and catadioptric cameras usually occupy only part of the image rectangle (e.g., a circle in the center), you probably want to add a mask when using this implementation in your project.

How to Install

We provide the implementation as a ROS package. The dependencies are:

Clone the packages into your workspace, then clone this repository and compile.

The second and the third are just catkin wrappers for eigen and glog. If you do not use catkin, it should be easy to adapt the code to work with the plain packages.

Polynomial Camera Model

The camera model uses polynomials to calculate the projection and backprojection functions. It is able to deal with fisheye cameras and catadioptric cameras within one framework.

In this implementation, we use 5 parameters for the backprojection and 12 parameters for the projection. For more details, please refer to the page of the Matlab toolbox.

Coordinate System Definition

We use the column major convention for the image coordinate system: x coordinate is the column index and y coordinate the row index. The x y axes of the camera coordinate system are aligned with the image coordinate system , and the z axis is defined so that it is a right hand system.

Note that the Matlab toolbox uses a row-major convention, which is different from this implementation.

How to use the OCam class

We provide a simple function to load parameter:

ocam_ = omni_cam::OCam::loadOCam(ocam_param);

You will need a calibration file ocam_param to create the camera model. You can find the usage of the class in more details from the unit tests.

Convert Matlab toolbox output to Calibration File

Use the script scripts/matlab_to_cpp.py

./matlab_to_cpp.py input_file output_file

omni_cam's People

Contributors

zhangzichao avatar

Watchers

James Cloos 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.