For decades, the checkerboard pattern has been the go-to method for camera calibration, providing only pixel-level precision. But what if we could improve accuracy even further? This paper reveals the power of the circular pattern: a game-changer offering subpixel precision to meet challenges even from unconventional visual sensors.
[Paper][Video][OpenCV Webinar][BibTex]
- 24.07.19. 🎉 This work is invited to OpenCV Webinar
- 24.06.17. 📍Add a description of how to undisort images using our method.
- 24.04.17. 📍We update circular pattern detector! Now, you don't need to tune hyperparameters for detections
- 24.04.05. 🎉 Discocal is selected for highlight poster. (11.9% of accepted papers, 2.8% of total submissions.)
Sub-pixel accuracy and detection robustness are virtues of the conic features. But why do we use a checkerboard, not a circular pattern?
😢 Conic is not conic anymore under distortion!!
As shown below, the circle center is not projected to the centroid of the distorted ellipse under perspective transformation and distortion.
Without considering geometery of the distorted ellipse, existing circular pattern-based calibration methods are biased, which leads low calibration accuracy than a checkerboard pattern.
📌 Our unbiased estimator completes the missing piece in the conic-based calibration pipeline
We assume pinhole camera model with radial distortion.
Calibration results:
Our model is compatible to OpenCV pin-hole camera model. Set p1 and p2 as zero.
distcoeff=(cv::Mat1d(1, 5) << k_1, k_2, 0., 0., k_3);
cv::initUndistortRectifyMap(camera_matrix, distcoeff, cv::Mat(), camera_matrix, imageSize, CV_32FC1, mapx, mapy);
cv::remap(image,undist_image, mapx, mapy, cv::INTER_LINEAR);
We provide a class that has an "undistort" function. This class can deal with n_d>3 cases. Please refer to the “CImagehander.cpp” files for details.
Imagehandler imagehandler(width, height, total_params, n_d);
cv::Mat undist_image = imagehandler.undist(image);
Our method needs a planer white board on which black circle grid patterns are printed. You can easily design these patterns in this site.
Previous methods prefer to reduce the size of the circles to minimize bias, but our method is not limited to this. In fact, the larger the circles, the more accurate the measurements.
Q. How to decide the number of cicles and the radius size? The larger the radius of the circle, the more accurate the observations become. The greater the number of circles, the more observations you have, leading to increased robustness. Since these two values are in a trade-off relationship within a limited area, adjust them appropriately. It is recommended that every circle contains more than 400 pixels in images and not to exceed 7x5 circles.
- Ceres-Solver
- Eigen3
- opencv4
(Recommended) Build a docker image using the dockerfile.
docker build -t chaehyeonsong/discocal . -f dockerfile
(Only for Ubuntu) or use official docker image.
docker pull chaehyeonsong/discocal:latest
## Build
cd [your path]/discocal
mkdir build
cd build
cmake ..
make
## Run
./main.out [n_x] [n_y] [n_d] [img_dir_path] [radius(m)] [distance(m)]
(ex) ./main.out 4 3 3 ../sample_imgs/rgb12/ 0.035 0.09
(ex) ./main.out 4 3 4 ../sample_imgs/tir12/ 0.03 0.09
To get high-quality results, plz check all pixels in the circle are correctly detected like this.
If you don’t want to check images, turn off the “check_detection_results” option in "main.cpp".
Parameters(for experts):
- fullfill_threshold: the difference between real area and estimated area resulting from ellipse fitting
- eccentricity_threshold: the length ratio between a blob's major and minor axis. You can refine these parameters in the TargetDetector class.
We can leverage the detection robustness of the circular patterns, particularly for unconventional cameras, such as thermal cameras.
@INPROCEEDINGS{chsong-2024-cvpr,
author = {Song, Chaehyeon and Shin, Jaeho and Jeon, Myung-Hwan and Lim, Jongwoo and Kim, Ayoung},
title = {Unbiased Estimator for Distorted Conics in Camera Calibration},
booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2024},
pages = {373-381}
}
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
- This work is protected by a patent.
- All codes on this page are copyrighted by Seoul National University published under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License. You must attribute the work in the manner specified by the author. You may not use the work for commercial purposes, and you may only distribute the resulting work under the same license if you alter, transform, or create the work.
- For commercial purposes, please contact to [email protected]