Skip to content

This project uses the Ceres and OpenCV libraries to estimate a camera's intrinsics

Notifications You must be signed in to change notification settings

Keyran-H/camera-calibration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ceres & OpenCV bundle adjustment solution

This project presents a Ceres based solution for estimating a camera's intrinsics. The equations and theory used in code is heavily based on OpenCV: Camera Calibration and 3D Reconstruction.

The image on the left shows an example of a raw image used for estimating the camera intrinsics. The right shows the redrawn board points which was computed based on the optimized camera intrinsics.

       

The image below is a snippet of terminal output. The snippet shows that it took 7 iterations to converge at the final estimate for the camera intrinsics.

Running the code

Installing Dependencies

Globablly installed Ceres and OpenCV libraries are used in this project. Specify the PATH variable in CMakeLists.txt if a local version is desired to be used. The software versions used are:

  • OS: Ubuntu 18.04
  • CERES: 2.1.0
  • OpenCV: 3.2.0

Building & Compiling

Generate the build files by running the top level CMakeList.txt within the build directory: cd build && cmake ..

Compile the executable within the build directory: make

Running

Execute the generated executable: ./nlo-camera-calibration

The executable uses gflags.

  • Documentation can be found using the command: ./nlo-camera-calibration --help
    • In summary, the gflags parameters which can be changed are:
      • Initial estimates
      • Calibration board parameters
      • Read/Write disk options
  • gflag defaults are set to use my images to demonstrate out of box functionality.
  • gflag example:
    • Write processed images to a specified directory "test": ./nlo-camera-calibration -write_directory=test/

About

This project uses the Ceres and OpenCV libraries to estimate a camera's intrinsics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published