This program is based on the Toolbox written by Christopher Mei and the files related to calibration with C.Mei model stay under his own right, the rest of the program is under the GPL license version 2, please read GPL.txt for more information.
more details from here
The Non-central Catadioptric Camera Toolbox for matlab allows the user to calibrate not only any central omnidirectioanal camera (any panoramic camera having a single effective viewpoint) but also non-central camera due to the misalignment between the reflective mirror and the camera. The Toolbox implements the procedure described in the paper which proposed a novel model for non-central catadioptric cameras and give out a method for calibration. The Toolbox permits easy and practical calibration of the omnidirectional camera through two steps. At first, it requires the user to take a few pictures of a checkerboard shown at different position and orientations. Then, the user is asked to click manually on the corner points. After these two steps, calibration is completely automatically performed. After calibration, the Toolbox provides the relation between a given pixel point and 3D vector emanating from the single effective view point. This relation clearly depends on the mirror shape and on the intrinsic parameters of the camera.The novel aspects of the Non-central Catadioptric Camera Toolbox with aspect to other implementations are following:
The calibration performed by the Non-central Catadioptric Camera Toolbox can lead to an equally simple calibration for both central and non-central systems. In fact, the Toolbox is able to provide an optimal solution even when the misalignment between the reflective and the camera is severe.
The calibration will estimate:
The Non-central Catadioptric Camera Toolbox for Matlab has been successfully tested under Matlab, version 2009b and 2010b for Windows. The Calibration Refinement routine requires the Matlab Optimization Toolbox, in particular the function lsqnonlin, which you should have by default.
You can download the Non-central Catadioptric Camera Toolbox from here: ToolBox Unzip the file, run Matlab (it’s better to add the path of this Toolbox to matlab’s set path), and type ocam_calib_gui
Please edit the ‘SETTINGS.m’ file first. Start the toolbox in Matlab:
omni_calib_gui
This step is only to constrain the minimization in the parabolic case (xi=1) and to avoid trying to extract the mirror border in the dioptric.
“Load images” will ask you for the base name of the images in the current directory and their format
By pressing on Estimate camera intri
, we will calculate an estimate of the intrinsic parameter of the underlying camera (generalized focal length and center). In the case of a catadioptric sensor, the user is asked to click on the center of the mirror
When then estimate the generalized focal length from points on a line image
We are now ready to extract the grid corners which will be used during the minimization, press on Extract grid corners1
Sub-pixel extraction in the catadioptric case is less tolerant and we should try and keep the window size down.
This extraction is semiautomatic written by C.Mei. It works well under slight misalignment. But under severe misalignment, it work not so good. That why we need manual extraction as is showed in 9.
Generally you can use the grid corners extracted automatically in Step 8.But when the misalignment between the reflective mirror and the camera is severe; there is much error in the extraction. So this function allows you to extract the corners manually. Press on Extracting grid corners manually
You need to manually extract every grid corners of the images which you are asked to choose in Step 8. This task may be a little bit time-consuming and boring, so you should be more patient and careful.
We now have two sets of coordinates of grid corners. By pressing on Change_corners
, we can use the grid corners which are extracted automatically or manually for further optimization. In order to verify the type of the grid corners, we set a variable “manual” in the “gridInfo” struct. It means the grid corners is extracted manually when “manual” is 1 and automatically when “manual” is 0.
After extracting the corner grids, it is better to obtain an initial estimate for the extrinsic parameters to further stabilize the optimization. The initialization of R and T are both stored in ‘paramEst.Qw_est{i}’, ‘paramEst.Tw_est{i}’ and ‘paramEst3D_Qw_est{i}’, ‘paramEst.Tw_est{i}’.
Pressing on AssignRTest
will assign the initialization of extrinsic parameters which are initialized in Step 11 to ‘paramEst.Qw’ and ‘paramEst.Tw’ and we now have the initial values of the optimization.
Pressing on Calibration of two methods
will start the minimization with two models, one is C.mei’s model and the other is our improved model.
To further verify the performance of our model quantitatively, we employed a trithedral object composed of three orthogonal planes and the angles between the planes are calculated from the calibrated extrinsic parameters RwQw.
References