Binocular Vision Algorithm Learning (a): Binocular calibration

Source: Internet
Author: User

Boss New task, need to implement binocular algorithm on FPGA, so recently began to learn this piece, binocular algorithm is divided into 3 parts: calibration, correction, matching. In fact, the calibration is the most basic part, for the subsequent program to provide the initial data, this piece of data mainly refer to the image acquisition and Monocular calibration and camera calibrations and stereo calibration, this article is mainly my binocular calibration step and I understand this.

One, fixed camera

Camera this piece I use is two Logitech's ordinary USB camera, generally as long as the use of cvcreatecameracapture () function in OpenCV can capture the image is good. Then fix the two cameras in parallel, and my camera ends up as follows:


Second, use the camera to capture the calibration plate image in different directions

Once the camera is secured, the image is started, and the calibration board (my A4 Calibration board) is used to calibrate the next use of the MATLAB calibration Toolbox (click the Open link). When getting the image, it is necessary to pay attention to the need for two cameras to synchronize the acquisition, so that the calibration results will be correct. The idea of this algorithm can be referred to: simultaneous acquisition of images


Third, using MATLAB calibration Toolbox measurement Data

After the previous step, we get the image of the calibration board in many different positions on the left and right two cameras, and put the images in the Matlab Toolbox folder for processing. The processing method can be referred to: using the MATLAB Toolbox for calibration. Note that when extracting the first picture, the command line window may prompt you to enter the size of the grid, this must be based on the size of your calibration paper, if this error, the calibration of the data is problematic, I use the size of the calibration paper box is 15mm. Other follow the steps to do just fine, after the stereoscopic calibration, it is best to check the show extrinsics of stereo rig to see if two cameras are parallel, and finally get the following results:


The above is the camera parameter information, and then package the data into XML format, easy to use when correcting. The data used for the correction include the following: the reference data (focal length and origin coordinates), distortion, rotation matrix om and shift vector t.

For example: the camera reference Information format is as follows (left):

<?xml version= "1.0"? ><opencv_storage><cam_m2 type_id= "Opencv-matrix" >  <rows>3</ rows>  <cols>3</cols>  <dt>d</dt>  <data>   357.49543  0. 182.35795   0.  365.72798  193.12148   0.  0.  1.</data></cam_m2></opencv_storage>



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Binocular Vision Algorithm Learning (a): Binocular calibration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.