Giter Site home page Giter Site logo

fisheye-stereo-calibration's Introduction

OpenCV C++ Stereo Fisheye Calibration

Note: I don't actively maintain this repository anymore. PRs are more than welcome to help improve it.

This contains a source file to calibrate a stereo system comprising of fisheye lenses. It calibrates the extrinsics and the intrinsics of the cameras without any initial guesses. If you are looking for stereo calibration with lenses which follow the pinhole model check here.

Dependencies

  • OpenCV
  • popt

Compilation

Compile all the files using the following commands.

mkdir build && cd build
cmake ..
make

Make sure your are in the build folder to run the executables.

Data

Some sample calibration images are stored in the imgs folder.

Running calibration

Run the executable with the following command

./calibrate -w [board_width] -h [board_height] -s [square_size] -n [num_imgs] -d [img_dir] -l [left_img_prefix] -r [right_img_prefix] -o [calib_file]

For example if you use the images in the imgs folder run the following command

./calibrate -w 9 -h 6 -s 0.02423 -n 29 -d ../imgs/ -l left -r right -o cam_stereo.yml

fisheye-stereo-calibration's People

Contributors

sourishg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fisheye-stereo-calibration's Issues

Accuracy and Usage

Thanks for the code. Helped me too much. I am trying to get disparity images from fisheye stereo pair. I calibrated and got rectification parameters thanks to you. Thing is when I try to rectification it gives wrong images.
As first, you can find the code here:
https://github.com/aliyasineser/FisheyeStereoDepth/blob/master/undistortion.cpp

Just ignore the disparity image, it is bad already. Rectification is number one problem. The original images:
left_0
right_0

Rectification(!) and disparity images:
screenshot from 2018-09-18 17-30-46

Thanks for helping.

fisheye monocular

Hey do you have any code on monocular fisheye calibration? Would really appreciate the help.

Fisheye example for single cameras?

I realize that this is a repo for stereo calibration, and I understand if you want to close this issue for that reason. I'm unable to find a single camera example of fisheye calibration and, all of the single-camera pinhole camera calibration tools I try to adapt to fisheye, result in failures that I'm too new to C++ (and OpenCV) to understand completely.

I haven't tried this yet with your code. If you're bored and want to make a single-camera fisheye calibration example, I would greatly appreciate that. I expect I'm about to fail in my own attempt.

Again, close this issue if you don't want to add this, or if you just want to keep this for stereo fisheye only. I won't mind.

code crashes with opencv 4.5.5

i tried your example, but it crashes at cv::fisheye:stereoCalibrate
i get the following error:
OpenCV(4.5.5) Error: Assertion failed (abs_max < threshold) in cv::fisheye::stereoCalibrate, file ...\opencv-4.5.5\modules\calib3d\src\fisheye.cpp, line 1051
could you please help me with that?

Question about your stereo calibration method

Hi Sourish,

I am working with your code and I was wondering why in this code comparing to standard stereo calibration (your other repository about stereo calibration for narrow_stereo model) you do not use K1, D1, K2, D2 from previous config file. Do you proceed to stereo calibration without the monocular camera being calibrated before ?

Also how do you evaluate your stereo calibration method. I mean myself I ouput the rms returned by stereoCalibrate. However in your monoCalibration method you use recomputereprojectionErrors() function. Is it possible to do it in stereo vision ?
I ask this question because I use this function in order to delete images that are toxic to my calibration by using the criteria of perViewErrors.

I am very thankful however for your hard work and your code is really easy to understand/modify.
Best regards,
FERAY Lucas.

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.