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.
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
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
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
- In summary, the gflags parameters which can be changed are:
- 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/
- Write processed images to a specified directory "test":