Creating matrices for fast rectification of stereo images
Purpose:
This script creates bilinear parameters for fast stereo image rectification and determines the calibration data
with several stereo checkerboard image pairs in an easy way.
The parameters are reduced to get the largest rectangular image pairs with only valid pixel values
and are sorted in the way images are read in (First pixels of first row, then pixels of 2nd row etc.).
The bilinear parameters are placed in matrices. The rectification of distorted images is done
by simple matrix multiplications and additions.
This results in much faster image rectification.
Requirements:
The script works only in conjunction with the Matlab Computer Vision System Toolbox.
Tested with Matlab R2016a.
Procedure:
0.) Take approx. 15 stereo pictures from a checker board.
Name left and right images similar (e.g. left01.tif, right01.tif)
Place the left in an empty folder. Place right images into another folder.
Hint: Put '_Xmm' at the end of the folder name. X is the square size in mm.
e.g.: LeftImages_10.5mm
Not mandatory, helps to fill out GUI.
Run GUIrectParameters.m
Follow the steps 1.) to 3.) in the GUI.
4.) In step 4.): Select the desired precision for the bilinear parameters.
Double is recommended for use in Matlab only.
Uint8 is suitable for most cases, especially with FPGA.
Uint8 produces a few intensity errors of +- 1.
Uint16 is like uint8, but with even less intensity errors.
Nearest neighbor has many intensity errors, is very fast for rectifying.
5a.) OR 5b.) Run and follow instructions in message box.
6.) Compares the rectification speeds.
7.) Compares the intensity errors according to 4.)
Output:
Outputs of this script are matrices with bilinear parameters for the largest image rectangle
which contains only image pixels.
You find the matrices in in the folder 'Parameters'. E.g. the mat-file for double precision is
'StereoParameterNiDouble.mat'.
Process to rectify images:
You will find all examples in 'compareRectificationSpeed.m'.
Demo:
Select folders 1.) LeftImages and 2.) RightImages
Click on 5b.)
Acknowledge:
Some files out of "Camera Calibration Toolbox for Matlab" by Jean-Yves Bouguet
(http://www.vision.caltech.edu/bouguetj/calib_doc/) are implemented and altered slightly.
/FindLargestRectangles.m)
引用格式
Peter Seibold (2024). Creating matrices for fast rectification of stereo images (https://www.mathworks.com/matlabcentral/fileexchange/62827-creating-matrices-for-fast-rectification-of-stereo-images), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- Image Processing and Computer Vision > Computer Vision Toolbox > Point Cloud Processing > Display Point Clouds >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!