OpenCV and MatLab Camera Calibration Toolboxes Enhancement
Downloads
Introduction
Camera calibration is an essential preliminary step of solving different tasks of 3D
computer vision. An easy way of accurate camera calibration makes the life of
researchers and engineers much easier.
Zhang's method [1], using a simple planar pattern has provided the
research community with both easy-to-use and accurate algorithm for obtaining both
intinsic and extrisic camera parameters. This algorithm was implemented
in Matlab Camera Calibration Toolbox [2] by Jean-Yves Bouguet and C++ in Intel OpenCV library [3].
These two libraries are probably the most widely used tools for camera calibration
nowadays.
Being both convinient and accurate, they still pocess some disadvantages.
Motivation
Process of calibrating camera(s) with these toolkits can be roughly broken down into three steps:
- Acquiring several images of the planar calibration pattern (see fig)
- Exctraction of calibration pattern corners in each image
- Computation of intrinsic and extrinsic camera parameters
While the first step should not be a problem for person who is doing computer
vision research and the third step is excellently solved by both toolboxes - step
two is the part that can really make a man suffer.
MatLab Calibration toolbox requires much manual labour at the stage of corner
extraction, that becomes more tedious as the image number grows. OpenCV provides
means for automatic corner extraction, but it has several problems:
- OpenCV detection procedure has a 180 degrees ambuguity - it does not discriminate
between object and the same object turned upside-down. This results in wrong extrinsic
camera parameters for certain views.
- OpenCV detection fails rather often, if many other objects except the calibration
pattern are present in the image.
Goal
The was goal is to enhance the existing algorithms of corner detection, implemented in these popular toolboxes.
Results
First - an enhanced algorithm for corner detection for OpenCV is proposed.
It works only for non-symmetric calibration objects (one of the sides should be
even, other should be odd) and:
- is able to determine the origin point among calibration pattern corners without ambiguity;
- is more robust (I hope) to cluttered background, illumination and checkerboard-like objects in sight;
Second - the MatLab Camera calibration toolbox was augmented with an automatic function of
corner extraction. It is based on the usage of C-code through the
MEX-funcions instrument. It is first tries to detect an objec automatically, and
falls back to original manual mode in case of failure.
Contacts
Please mail all comments, suggestions, problems and contributions to
Vezhnevets Vladimir
<vvp @ graphics.cs.msu.ru>
(remove spaces from the address before sending).
References
[1] Z. Zhang,
A flexible new technique for camera calibration,
IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11):1330-1334, 2000.
[2] Jean-Yves Bouguet, Camera Calibration Toolbox for Matlab
®,
http://www.vision.caltech.edu/bouguetj/calib_doc/.
[3] Intel OpenCV Computer Vision Library (C++),
http://www.intel.com/research/mrl/research/opencv/.