本文是经典数字图像处理极线校正理论A compact algorithm for rectification of stereo pairs的中文翻译,由于没有看到中文版本,译者决定翻译一下,水平欠缺,敬请指正.
由于博客文档编辑原因,图片和公式无法正常显示,详细的内容请阅读相关下载中的word文档。
相关下载:http://download.csdn.net/detail/u011436359/9427663
联系方式:
email:pualstratoli@foxmail.com
qq:1348688041
MachineVision and Applications (2000) 12: 16–22
机器视觉与应用(2000)12:16-22
Machine Vision and Applications
©Springer-Verlag 2000
机器视觉与应用
©施普林格出版社2000
Andrea Fusiello1, Emanuele Trucco2, Alessandro Verri3
1 Dipartimento Scientifico eTecnologico, Universita di Verona, Ca’ Vignal 2, Strada Le Grazie, 37134Verona, Italy; e-mail: fusiello@sci.univr.it `
2 Heriot-Watt University,Department of Computing and Electrical Engineering, Edinburgh, UK
3 INFM, Dipartimento diInformatica e Scienze dell’Informazione, Universita di Genova, Genova, Italy
Received:25 February 1999 / Accepted: 2 March 2000
收稿日期:1999年2月25日/接受日期:2000年3月2日
Abstract. We present a linear rectification algorithm for general,unconstrained stereo rigs. The algorithm takes the two perspective projectionmatrices of the original cameras,and computes a pair of rectifying projectionmatrices. It is compact (22-line MATLAB code) andeasily reproducible.We report tests proving the correct behavior of ourmethod,as well as the negligible decrease of the accuracy of 3D reconstructionperformed from the rectified images directly.
摘要:我们在本篇文章中阐述一个用于通用的不加约束的立体视觉设备的线性修正算法。这个算法输入原始双目视觉 相机投影矩阵图像,计算出一对修正投影矩阵。它是压缩的(22行的MATLAB 代码)并且易于复现的。我们的报告中包含证实这个方法正确工作的测试,和通过直接修正后图像重构3D视觉造成的微小衰减的测试。
Key words: Rectification – Stereo – Epipolargeometry
关键字:校正 立体 极线几何 (译者注:极线几何校正)
1 Introduction and motivations
1简介和研究动机
Given a pair of stereo images, rectification determines a transformationof each image plane such that pairs of conjugate epipolar lines becomecollinear and parallel to one of the image axes (usually the horizontal one).The rectified images can be thought of as acquired by a new stereo rig,obtained by rotating the original cameras. The important advantage ofrectification is that computing stereo correspondences (Dhond and Aggarwal,1989) is made simpler,because search is done along the horizontal lines of therectified images.
对于一对双目视觉图像,校正被定义为每张图像平面的旋转变换以至于它们的共轭极线成为共线的并且平行于图像的某一个轴(通常是水平轴)。修正后的图像可以看成由原始摄像机旋转后新的双目摄像机拍摄得到的。修正的重要优势在于立体视觉的相关性(Dhond 和 Aggarwal, 1989)计算更为简单,因为搜索只在修正图像的水平线上进行。
Weassume that the stereo rig is calibrated, i.e., the cameras’ internalparameters, mutual position and orientation are known. This assumption is not strictlynecessary, but leads to a simpler technique. On the other hand, whenreconstructing 3D shape of objects from dense stereo, calibration is mandatoryin practice, and can be achieved in many situations and by several algorithms(Caprile and Torre, 1990;Robert, 1996)
我们假设立体摄像机是标准的,意即相机的内部参数、相互之间的位置和旋转角度是已知的。这个假定不是严格要求的,但是可以使技术实现更为简单。另一方面,实际当从密集立体图像中重构3D物体形状时,标准化的摄像机是强制的,而且可以通过在很多种情况中使用几种算法(Caprile 和 Torre, 1990;Robert, 1996)获得这些参数。
Correspondenceto: A.Fusiello
Rectificationis a classical problem of stereo vision; however, few methods are available inthe computer vision literature, to our knowledge. Ayache and Lustman (1991)introduced a rectification algorithm, in which a matrix satisfying a number ofconstraints is handcrafted. The distinction between necessary and arbitraryconstraints is unclear. Some authors report rectification under restrictiveassumptions; for instance, Papadimitriou and Dennis (1996) assume a veryrestrictive geometry (parallel vertical axes of the camera reference frames).Recently, Hartley and Gupta (1993), Robert et al. (1997) and Hartley (1999)have introduced algorithms which perform rectification given aweaklycalibrated stereo rig, i.e., a rig for which only points correspondencesbetween images are given.
修正是立体视觉中的经典问题,然而我们仅知道很少的几种实现方法。. Ayache and Lustman (1991)介绍了一种手工计算矩阵满足一系列约束的算法。必要的和随意的约束的区别并不明显。有一些学者提出约束假设下的修正方案,例如Papadimitriou 和Dennis (1996)提出一种十分约束的几何(平行于相机参考平面的垂直轴)。最近Hartley 和 Gupta (1993), Robert etal. (1997) 和 Hartley(1999)介绍了一种弱标准化立体摄像机即只给出一些点相关的图像的相机的修正方案。
Latestwork, published after the preparation of this manuscript includes Loop andZhang (1999), Isgro and Trucco `(1999) and Pollefeys et al. (1999). Some ofthis work also concentrates on the issue of minimizing the rectified image distortion.We do not address this problem, partially because distortion is less severethan in the weakly calibrated case.
最近的修正相关的工作,在整理了Loop 和 Zhang (1999), Isgro 和 Trucco `(1999) 和Pollefeys et al. (1999)的一些手稿后得以出版。这些工作中也有些关注最小化修正图像失真的问题。我们并不致力于这些问题,部分原因是标准设备失真没有弱约束中那么重要。
Thispaper presents a novel algorithm rectifying a calibrated stereo rig ofunconstrainedgeometry and mounting general cameras. Our work improves and extends Ayacheand Lustman (1991). We obtain basically the same results,but in a more compactand clear way. The algorithm is simple and detailed. Moreover, given theshortage of easily reproducible, easily accessible and clearly statedalgorithms,we have made the code available on the Web.
本篇论文陈述了一种通用的修正算法用来处理校正过的立体设备得到的未加约束的几何和校准通用相机。我们的工作提升和扩展了Ayache 和 Lustman (1991)的工作。我们基本上得到了相同的结果,但是使用了更为压缩和清晰的方法。给出的算法是简单和细致的。更为重要的是解决了原来算法缺乏复现性,易获取和清晰地陈述,代码可以在互联网上获取到。
2 Camera model and epipolar geometry
2 相机模型和极几何
This section recalls briefly the mathematical background on perspectiveprojections necessary for our purposes. For more details see Faugeras (1993).
这一段为我们的目的简单地回顾了透视几何中相关的数学背景知识,可以通过Faugeras (1993)的论文得到更多的细节。
2.1 Camera model
2.1相机模型
A pinhole camera is modeled by its optical center C and its retinalplane(or image plane) R. A 3D point W is projected into an image point M given by theintersection ofR with the line containing C and W. The line containingC and orthogonal toR is called the optical axis and itsintersection with R is the principal point. The distance betweenC and R is the focal length.
一个针孔相机可以由它的光学中心C和它的视网膜平面(或成像平面)R进行建模。一个3D点W成像在点M,点M由一条通过点C和点W的直线与R平面相交得到。包含点C并且垂直于R的直线叫做光轴,光轴与R平面的交点称为投影中心。点C与像平面R之间的距离称为焦距。
Let w = [x y z] T be the coordinates of Win the world reference frame (fixed arbitrarily) and m= [u v]T the coordinates of M in the image plane (pixels). Themapping from 3D coordinates to 2D coordinates is theperspective projection, which is represented bya linear transformation inhomogeneous coordinates. Let = [u v 1] and = [x y z1] be thehomogeneous coordinates of M and W, respectively; then, the perspectivetransformation is given by the matrix :
w = [x y z] T是点W在世界参考系(任意固定的)中的坐标且m = [u v]T 是点M在像平面(像素)中的坐标。从3D坐标向2D坐标的映射是一个可以用同一坐标系下线性变换表示的透视过程。假设= [u v1] 和= [x y z 1]是点 M和点 W各自相同的坐标,那么,透视变换可以由矩阵给出:
, (1)
where means equal up to a scale factor. The camera istherefore modeled by its perspective projection matrix(henceforth PPM) , which can bedecomposed, using the QR factorization, into the product:
这里意味着等于的情况取决于比例因子。因此相机可以由透视矩阵表示,而矩阵则可以通过QR因式分解为下面的形式:
= A[R | t]. (2)
The matrix A depends on the intrinsic parameters only, and hasthe following form:
矩阵A由固有参数决定,并有下面的形式:
, (3)
where = , are the focal lengths in horizontaland vertical pixels, respectively (fis the focal length in millimeters, and are the effective number of pixels permillimeter along theu and v axes), are the coordinates ofthe principal point, given by the intersection of the optical axis withthe retinal plane, andγ is the skew factor that modelsnon-orthogonal u − v axes.
这里= , 分别为水平方向和垂直方向上的焦距(f是用毫米表示的焦距,相关系数和分别为 u 和 v 轴上每毫米像素数),是中心点的坐标,中心点即是光轴与像平面的交点,γ是畸变因子用以表征u – v轴的非正交度。
The camera position and orientation (extrinsic parameters), are encodedby the 3× 3 rotation matrix Rand the translation vector t, representing the rigid transformationthat brings the camera reference frame onto the world reference frame.
Let us write the PPM as:
相机位置和方向(外部参数)通过3 × 3旋转矩阵R和转化向量t来表征的,表示把相机参考系转换到世界参考系的刚性变换。我们把PPM定义为:
. (4)
In Cartesian coordinates, the projection (Eq. 1) writes
在笛卡尔坐标系中,这个映射形式如下:
(5)
The focal plane is the plane parallel to the retinal plane that containsthe optical center C. The coordinatesc of C are given by
焦平面是平行于像平面并且包含光学中心C,点C的坐标c形式如下:
. (6)
Therefore, can be written:
因此,可以被写为:
= [Q| − QC]. (7)
The optical ray associated to an image point M is the line M C, i.e.,the set of 3D points. In parametric
form:
与点M相关的光线是直线MC即一系列满足3D点集合。参数形式如下:
, λ ∈ R . (8)
Fig. 1. Epipolar geometry. The epipole of thefirst camera E is the projection of the optical center C2 of the second camera (and vice versa)
图1 极线几何 第一相机E的核点事第二相机光学中心C2的映射(以此类推)
2.2 Epipolar geometry
2.2 极线几何
Let us consider a stereo rig composed by two pinhole cameras (Fig. 1). Let C1 and C2 be the optical centers of the left and right cameras, respectively.A 3D point W is projected onto both image planes, to points M1 and M2, which constitute a conjugate pair. Given a point M1 in the left image plane, itsconjugate point in the right image is constrained to lie on a line called theepipolarline (of M1). Since M1 may be the projection of an arbitrarypoint on its optical ray, the epipolar line is the projection through C2 of the optical
ray of M1. All the epipolar lines in one image plane pass througha common point (E1 and E2, respectively) called theepipole, whichis the projection of the optical center of the other camera.
考虑到由两个相机构成的立体仪器(图1)。C1 和 C2分别是是左右两个相机的光学中心。一个3D点W被投影到两个像平面上构成一对共轭点的M1 和 M2。左图像平面中任意点M1在右图像平面中的共轭点地位置被限制在一条被称为极线(M1的)的直线上。因为M1可以是任意一点在光轴上的投影,极线则是点M1光线过C2的投影。某一像平面中的所有极线都过一个共同点(分别为E1 和 E2),它们是另一个相机光学中心的投影。
When C1 is in the focal plane of the right camera, the right epipole is atinfinity, and the epipolar lines form a bundle of parallel lines in the rightimage. A very special case is when both epipoles are at infinity, that happenswhen the line C1C2 (thebaseline) is contained in both focal planes, i.e., theretinal planes are parallel to the baseline. Epipolar lines, then, form abundle of parallel lines in both images. Any pair of images can be transformedso that epipolar lines are parallel and horizontal in each image. This procedureis called rectification.
当C1在右相机的焦平面上时,右核点就在无穷处,一系列相平行的右极线在右图像中,一种非常特殊的情况是当线C1C2(基线)包含在两个相机的焦平面上时,即像平面平行于基线时,两个核点都在无穷远处。极线都是一系列焦平面上的平行线。任何一对图像都可以被转换成极线互相平行且在各自图像中水平的情况,这个过程就是修正。
3 Rectification of camera matrices
相机矩阵修正
We assume that the stereo rig is calibrated, i.e., the PPMs and are known. The ideabehind rectification is to define two newPPMs and obtained by rotating the old ones around their opticalcenters until focal planes becomes coplanar, thereby containing the baseline.This ensures that epipoles are at infinity; hence, epipolar lines are parallel.To have horizontal epipolar lines, the baseline must be parallel to thenew X axis of both cameras. In addition, to have a proper rectification,conjugate points must have
the samevertical coordinate. This is obtained by requiring that the new camerashave the same intrinsic parameters. Note that, being the focal length the same,retinal planes are coplanar too, as in Fig. 2.
我们假定立体设备是校准过的以及PPMs和 是已知的。修正的思想就是定义两个新的PMMs和 ,通过以光学中心为圆心旋转原来的PMMs使焦平面共面得到它们,因此焦平面是包含基线的。这保证了极点在无穷处的要求,因此极线平行。为了得到水平的极线,基线必须平行于两个相机的X轴。另外,为了得到正确的修正,共轭点必须有相同的垂直坐标。这就要求新的相机有相同的内部参数。这里是,焦距相同,像平面也共面,正如图2所示。
Fig. 2. Rectified cameras. Retinalplanes are coplanar and parallel to the baseline
图2 修正的相机 像平面共面并且平行于基线
Insummary: positions (i.e, optical centers) of the new PPMs are the same as theold cameras, whereas the new orientation (the same for both cameras) differsfrom the old ones by suitable rotations; intrinsic parameters are the same forboth cameras. Therefore, the two resulting PPMs will differ only in theiroptical centers, and they can be thought as a single camera translated alongthe X axis of its reference system. Let us write the new PPMs in terms of theirfactorization.From Eqs. 2 and 7:
总的来说:新的PPMs位置(意即光学中心)和旧的相机一样,然而新的角度(两个相机相同)通过适当的旋转不同于原来的相机,两个相机的固有参数是相同的。因此,得到的PPMs只在光学中心上不同,而且他们都可以看做独立相机绕着它们参考系的X轴旋转。根据2式和7式的因式分解可把PPMs写为:
= A[R | − R c1], = A[R | − R c2].(9)
The intrinsic parameters matrix A is the same for both PPMs, and can bechosen arbitrarily (see matlab code). The optical centersc1 and c2 are given by the old opticalcenters, computed with Eq. 6. The matrixR, which gives the camera’spose, is the same for both PPMs. It will be specified by means of its rowvectors
两个PPMs的固有参数矩阵A是相同的,同时也可被随意的选择(见matlab代码)。光学中心c1 和 c2由原有的光学中心通过6式计算得到。给出相机姿态的矩阵R对于两个PPMs是相同的。它们由行向量的平均值区别
.(10)
that are the X, Y, and Z axes, respectively, of the camera reference frame, expressedin world coordinates. According to the previous comments, we take:
这分别是相机平面在世界坐标系X,Y和Z轴的平均值。依据上述,我们取:
1. The new X axis parallel to the baseline: r1 = (c1−c2)/||c1 − c2||.
2. The new Y axis orthogonal to X (mandatory) and to k:r2 =k ∧ r1.
3. The new Z axis orthogonal to XY (mandatory) : r3 =r1∧ r2.
1.新的X轴平行于基线:r1 = (c1 −c2)/||c1− c2||。
2.新的Y轴垂直于X轴和k(强制的):r2 = k ∧ r1。
3.新的Z轴垂直于XY平面(强制的):r3 =r1 ∧ r2。
In point 2, k is an arbitrary unit vector, that fixes the position ofthe new Y axis in the plane orthogonal to X. We take it equal to the Z unitvector of the old left matrix, thereby constraining the new Y axis to beorthogonal to both the new X and the old left Z. This algorithm fails when the opticalaxis is parallel to the baseline, i.e., when there is a pure forward motion. InFusiello et al. (1998), we formalize analytically the rectificationrequirements, and we show that the algorithm given in the present sectionsatisfies those requirements.
在点2上,k任意单位向量,这修正了新的Y轴在垂直于X轴平面的位置。我们认为它平行旧的左矩阵的Z轴单位向量,
因此限制了新的Y轴既垂直于新的X轴由垂直于旧的Z轴。这个算法在光轴垂直基线的情况下即存在纯粹前向相机状态时不成立。在Fusiello et al. (1998)中,我们正式分析了修正要求,并且说明下面我们展示的算法片段符合这些要求。
4 The rectifying transformation
4修正转换
In order to rectify – let’s say – the left image, we need to compute thetransformation mapping the image plane of = [Qo1|] onto the image plane of = [Qn1|]. We will see that the sought transformationis the collinearity given by the 3 × 3 matrix. The same result applies to the rightimage.
为了修正所谓的左图,我们需要计算从图像平面 = [Qo1|]到 = [Qn1|]的映射变换。我们将会看到可行的变换是共线的由3× 3矩阵给出。对于右图像也有相同的结果。
For any 3D point w, we can write:
从任何3D点w,有:
(11)
According to Eq. 8, the equations of the optical rays are the following (sincerectification does not move the optical center):
根据等式8,光线等式如下(因为修正不改变光学中心):
(12)
hence,
因此,
(13)
The transformation T1 is thenapplied to the original left image to produce the rectified image, as in Fig.5. Note that the pixels (integer-coordinate positions) of the rectified imagecorrespond, in general, to non-integer positions on the original image plane.Therefore, the gray levels of the rectified image are computed by bilinearinterpolation.
如图5所示,旋转矩阵T1被应用于原始左图像来生成修正的图像。注意到,通常情况下修正的图像像素(整数坐标点)对应原始坐标非整数坐标点。因此双线性内插用来计算修正后的灰度值。
Reconstructionof 3D points by triangulation (Hartley and Sturm, 1997) be performed from therectified images directly, using Pn1,Pn2.
通过三角法(Hartley and Sturm, 1997)从修正的图像中使用Pn1,Pn2直接重构3D点。
5 Summary of the rectification algorithm
5修正算法总结
Given the high diffusion of stereo in research and applications, we haveendeavored to make our algorithm as easily reproducible and usable as possible.To this purpose, we give the working matlab code of thealgorithm; the code is simple and compact (22 lines), and the comments enclosedmake it understandable without knowledge of matlab. The usage of the rectify function(see matlab code) is the following.
在研究和应用中使用高分辨率的立体设备,我们尝试使我们的算法容易复现且可以使用。为了这个目的,我们给出算法的matlab代码,代码是简单紧凑的(22行),相关的注释让没有matlab相关知识的读者也可以理解程序。修正函数的用法(见matlab代码)如下:
– Given a stereo pair of images I1,I2 and PPMs Po1,Po2 (obtained bycalibration);
–给定立体图像I1,I2 和 PPMs Po1,Po2 (由标准设备获取);
– compute [T1,T2,Pn1,Pn2]=rectify(Po1,Po2);
– 计算 [T1,T2,Pn1,Pn2]=rectify(Po1,Po2);(rectify()是修正函数,2个带入参数,4个带出参数。译者注)
– rectify images by applying T1 and T2.
– 应用T1 和 T2修正图像。
Fig.3. Nearlyrectified synthetic stereo pair (top) and rectified pair (bottom).The figure shows the epipolar lines of the points marked with acircle inboth images
图3接近修正的合成立体图像对(上)和修正的图像对(下)。图像展示了两张图由一圈圆标记点的极线
Fig.4. Generalsynthetic stereo pair (top) and rectified pair (bottom). The figureshows the epipolar lines of the points marked with acircle in both images
图4一般情况下合成立体图像对(上)和修正的图像对(下)。图像展示了两张图由一圈圆标记点的极线
function[T1,T2,Pn1,Pn2] = rectify(Po1,Po2)
(matlab函数声明。译者注)
% RECTIFY: compute rectification matrices
%修正:计算修正矩阵
% factorize old PPMs
%因式分解原有PPMs
[A1,R1,t1] = art(Po1);
[A2,R2,t2] = art(Po2);
% optical centers (unchanged)
%光学中心(不变)
c1 = - inv(Po1(:,1:3))*Po1(:,4);
c2 = - inv(Po2(:,1:3))*Po2(:,4);
% new x axis (= direction of the baseline)
%新的x 轴(=基线方向)
v1 = (c1-c2);
% new y axes (orthogonal to new x and old z)
%新的y 轴(平行于新的x轴和原来的z轴)
v2 = cross(R1(3,:)’,v1);
% new z axes (orthogonal to baseline and y)
%新的z轴(垂直于基线和y轴)
v3 = cross(v1,v2);
% new extrinsic parameters
%新的外部参数
R = [v1’/norm(v1)
v2’/norm(v2)
v3’/norm(v3)];
% translation is left unchanged
%转换方式不变
% new intrinsic parameters (arbitrary)
%新的内部参数(任意的)
A = (A1 + A2)./2;
A(1,2)=0; % no skew
% new projection matrices
%新的投影矩阵
Pn1 = A * [R -R*c1 ];
Pn2 = A * [R -R*c2 ];
% rectifying image transformation
%修正矩阵变换
T1 = Pn1(1:3,1:3)* inv(Po1(1:3,1:3));
T2 = Pn2(1:3,1:3)* inv(Po2(1:3,1:3));
% ------------------------
%------------------------
function [A,R,t] = art(P)
% ART: factorize a PPM as P=A*[R;t]
%ART:因式分解一个PPM为P=A*[R;t]
Q = inv(P(1:3, 1:3));
[U,B] = qr(Q);
R = inv(U);
t = B*P(1:3,4);
A = inv(B);
A = A ./A(3,3);
A“rectification kit” including C and matlabimplementation of the algorithm, data sets and documentation can be found online1.
一个“修正套件”包含算法的C代码和matlab 工具,数据设置和文档可以在第1行找到
6 Experimental results
6实验结果
We ran tests to verify that the algorithm performed rectification correctly,and also to check that the accuracy of the 3D reconstruction did not decreasewhen performed from the rectified images directly.
我们运行的测试证实算法正确的修正,同时检查了从修正的图像中直接进行3D重构精度不降低。
Correctness. The tests used both synthetic and real data. Each set ofsynthetic data consisted of a cloud of 3D points and a pair of PPMs. For reasonsof space, we report only two examples. Figure 3 shows the original andrectified images with a nearly rectified stereo rig: the camera translation was−[100 2 3] mm and the rotation anglesroll=1.5o, pitch=2o, yaw=1o. Figure 4 shows the same with a more general geometry: the cameratranslation was −[100 20 30]mm and the rotation angles roll=19o pitch=32oand yaw=5o.
正确性。测试使用了综合的实际数据。每一组综合数据包含一簇3D点和一组PPMs。因为篇幅限制,我们报告中只包含两个例子。图像3展示了接近修正的立体图像原始数据和修正的数据:相机转换是−[100 2 3] mm 滚转角=1.5o, 仰角=2o, 偏转角=1o。图4 展示了同样的更加一般性的几何:相机转换−[100 20 30] mm 滚转角=19o仰角=32oand 偏转=5o。
Real-data experiments used calibrated stereo pairs, courtesy of INRIA-Syntim.We show the results obtained with a nearly rectified stereo rig (Fig. 5) andwith a more general stereo geometry (Fig. 6). The pixel coordinates of therectified images are not constrained to lie in any special part of the imageplane, and an arbitrary translation were applied to both images to bring themin a suitable region of the plane; then, the output images were cropped to thesize of the input images. In the case of the “Sport” stereo pair (image size
768 × 576), we started from the followingcamera matrices:
实际数据测试使用的立体图像来自辛勤INRIA-Syntim社区。我们展示了接近修正的立体图像(图5)和更为一般的图像对(图6)。修正后的像素坐标不被限制在图像平面的任何部分,一个任意的变换被应用在左右两个图像上把他们放到图像中合适的位置,然后输出图像被调整为输入图像的大小。对于“Sport”立体图像(图像大小768× 576),我们从相机矩阵开始:
1http://www.sci.univr.it/∼fusiello/rect.html
Fig.5. “Sport”stereo pair (top) and rectified pair (bottom). The right picturesplot the epipolar lines corresponding to the points marked in the left pictures
图5“Sport”立体图像(上)和修正后图像对(下)。右图像划得极线与左图像中标记点相关。
Fig.6. “Color”stereo pair (top) and rectified pair (bottom). The right picturesplot the epipolar lines corresponding to the points marked in the left pictures
图6“Color”立体图像(上)和修正后图像对(下)。右图像划得极线与左图像中标记点相关。
Fig.7. Reconstructionerror vs noise levels in the image coordinates (left) and calibrationparameters (right) for the general synthetic stereo pair.Crosses referto reconstruction from rectified images, circles to reconstruction fromunrectified images
图7一般合成立体图像对的图像坐标修正误差与噪音水平(左)和校正参数(右)。交叉引用修正图像的重构,以未修正图像重构为中心。
Fig.8. Reconstructionerror vs noise levels in the image coordinates (left) and calibrationparameters (right) for the nearly rectified synthetic stereo pair.Crossesrefer to reconstruction from rectified images, circles toreconstruction from unrectified images
图8接近修正的合成立体图像对的图像坐标修正误差与噪音水平(左)和校正参数(右)。交叉引用修正图像的重构,以未修正图像重构为中心。
,
After adding the statement A(1,3) = A(1,3) + 160 to the rectify program, to keepthe rectified image in the center of the 768× 576 window, we obtained the following rectified camera matrices:
把描述A(1,3) = A(1,3) + 160添加到修正程序后,在保证修正图像在768 × 576的中心,我们获得修正的相机矩阵:
,
Accuracy. In order to evaluate the errors introduced by rectificationon reconstruction, we compared the accuracy of 3D reconstruction computed fromoriginal and rectified images. We used synthetic, noisy images of random cloudsof 3D points. Imaging errors were simulated by perturbing the imagecoordinates, and calibration errors by perturbing the intrinsic and extrinsic parameters,both with additive, Gaussian noise. Reconstruction were performed using the linear-eigenmethod (Hartey and Sturm, 1997). Figures 7 and 8 show the average (over the setof points) relative error measured on 3D point position, plotted against noise.Figure 7 shows the results for the stereo rig used in Fig. 4, and Fig. 8 forthe one used in Fig. 3. Each point plotted is an average over 100 independenttrials. The abscissa is the standard deviation of the relative error oncoordinates of image point or calibration parameters.
精确度。为了评估修正重构引入的误差,我们比较原始图像和修正图像3D重构的精确度,我们使用随机3D点云的图像噪音。图像错误采用模拟图像坐标扰动,校正误差采用模拟内部参数和外部参数扰动,两者都采用加成高斯噪声。重构方式采用线性本征方法(Hartey 和 Sturm, 1997)。图7和图8 展示了3D点位置平均(所有的点)相对误差,和噪声绘制在同一个图上。图7 展示了使用图4中的立体图像,图8对应图3。每个点都是经过100次试验的均值。横坐标是图像坐标或校正参数相对误差的标准偏差。
7 Conclusion
7结论
Dense stereo matching is greatly simplified if images are rectified. We havedeveloped a simple algorithm, easy to understand and to use. Its correctnesshas been demonstrated analytically and by experiments. Our tests show thatreconstructing from the rectified image does not introduce appreciable errorscompared with reconstructing from the original images. We believe that ageneral rectification algorithm, together with the material we have madeavailable online, can prove a useful resource for the research and application communitiesalike.
图像修正可以让压缩立体匹配被极大的简化。我们写出了简单的算法易于理解和使用。它的正确性被试验分析证明。我们的测试证实了修正图像重构相对于原始图像不会引入明显的误差。我们相信通用修正算法和我们在线提供的材料,可以为研究机构和应用社区提供有用的资源。