CN105869157A - Multi-lens stereoscopic vision parallax calculating method - Google Patents
Multi-lens stereoscopic vision parallax calculating method Download PDFInfo
- Publication number
- CN105869157A CN105869157A CN201610177856.5A CN201610177856A CN105869157A CN 105869157 A CN105869157 A CN 105869157A CN 201610177856 A CN201610177856 A CN 201610177856A CN 105869157 A CN105869157 A CN 105869157A
- Authority
- CN
- China
- Prior art keywords
- camera
- lenses
- lens
- found range
- camera lens
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000004438 eyesight Effects 0.000 title claims abstract description 105
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000004364 calculation method Methods 0.000 claims abstract description 88
- 238000005259 measurement Methods 0.000 claims abstract description 51
- 238000003384 imaging method Methods 0.000 claims abstract description 36
- 230000003287 optical effect Effects 0.000 claims description 42
- 238000000205 computational method Methods 0.000 claims 17
- 239000004744 fabric Substances 0.000 claims 15
- 239000007787 solid Substances 0.000 claims 3
- 238000011144 upstream manufacturing Methods 0.000 claims 1
- 230000000007 visual effect Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 12
- 238000011179 visual inspection Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000008447 perception Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000035479 physiological effects, processes and functions Effects 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20228—Disparity calculation for image-based rendering
Landscapes
- Measurement Of Optical Distance (AREA)
Abstract
多镜头立体视觉视差的计算方法,属于计算机视觉领域。由初始化步骤、获取所有双目视差测距步骤、获取多镜头视差测距步骤、结束步骤组成。其中在计算最终视差时采用了加权平均的方法,可以更好地消除测距误差。从多个视点观察同一景物,以获取在不同视角下的感知图像,通过三角测量原理计算图像像素间的位置偏差来获取景物的三维信息。在基于立体平行视觉模型的基础上,给出多镜头立体视觉视差计算方法。利用立体平行视觉模型的视差计算方法,对多镜头相互之间进行视差计算,获得更为精确的成像视差,使三维重建中物体点深度信息更精确。每种布放方式中的多镜头可按照相对距离不变的比例围绕圆心旋转或按平面上一条直线为轴翻转布放镜头。
The invention relates to a method for calculating the parallax of multi-lens stereo vision, which belongs to the field of computer vision. It consists of an initialization step, a step of obtaining all binocular parallax distance measurement steps, a step of obtaining multi-lens parallax distance measurement steps, and an end step. Among them, the weighted average method is adopted in the calculation of the final parallax, which can better eliminate the ranging error. Observe the same scene from multiple viewpoints to obtain perceptual images under different viewing angles, and calculate the position deviation between image pixels through the principle of triangulation to obtain the three-dimensional information of the scene. On the basis of stereo parallel vision model, a calculation method of multi-lens stereo vision parallax is given. Using the parallax calculation method of the stereoscopic parallel vision model, the parallax calculation is performed between multiple lenses to obtain more accurate imaging parallax and make the depth information of object points in 3D reconstruction more accurate. The multi-lens in each layout method can be rotated around the center of the circle according to the ratio of constant relative distance or rotated according to a straight line on the plane.
Description
技术领域technical field
本发明属于计算机视觉领域,尤其是涉及一种多镜头立体视觉视差的计算方法。The invention belongs to the field of computer vision, and in particular relates to a method for calculating the parallax of multi-lens stereo vision.
背景技术Background technique
立体视觉是计算机视觉中的一个重要分支,立体视觉是计算机被动测距方法中最重要的距离感知技术,它直接模拟了人类视觉处理景物的方式,可以在多种条件下灵活地测量景物的立体信息,其作用是其它计算机视觉方法所不能取代的。对它的研究,无论是从视觉生理的角度还是在工程应用中都具有十分重要的意义。立体视觉的基本原理是从两个(或多个)视点观察同一景物,以获取在不同视角下的感知图像,通过三角测量原理计算图像像素间的位置偏差(即视差)来获取景物的三维信息,这一过程与人类视觉的立体感知过程是类似的。Stereo vision is an important branch of computer vision. Stereo vision is the most important distance perception technology in computer passive ranging methods. It directly simulates the way human vision processes scenes, and can flexibly measure the stereo of scenes under various conditions. Information, its role cannot be replaced by other computer vision methods. The research on it is of great significance both from the perspective of visual physiology and in engineering applications. The basic principle of stereo vision is to observe the same scene from two (or more) viewpoints to obtain perceptual images under different viewing angles, and to obtain the three-dimensional information of the scene by calculating the position deviation between image pixels (that is, parallax) through the principle of triangulation. , this process is similar to the stereoscopic perception process of human vision.
基于图像二维视觉检测技术已应用在生产线上产品的视觉检测、自动监控过程中,但二维视觉检测只能对目标的相对位置、形态、标记等二维投影特征进行判别和检测,是有限的局部的单视点投影视觉检测,无法对目标物体的三维特征和表面参数进行高精度的测量和三维形态识别,因此二维视觉检测技术还远远不能满足现代工业生产发展过程中数字制造与智能制造和检测的需要。Image-based two-dimensional visual inspection technology has been applied in the visual inspection and automatic monitoring process of products on the production line, but the two-dimensional visual inspection can only distinguish and detect the relative position, shape, mark and other two-dimensional projection features of the target, which is limited. The local single-viewpoint projection visual inspection cannot perform high-precision measurement and three-dimensional shape recognition on the three-dimensional features and surface parameters of the target object. manufacturing and testing needs.
基于计算机视觉的三维重建技术,是指由两幅或多幅二维图像来恢复出空间物体的几何信息。于是基于双目立体视觉的三维重建系统的研究得以发展,立体视觉系统一般分为立体平行视觉系统和立体汇聚视觉系统。如果两部摄像机的光轴平行排列,称为立体平行视觉系统;若两光轴相交,汇聚于空间目标上,称为立体汇聚视觉系统。一个完整的立体视觉系统可以分为图像获取、图像预处理、摄像机标定、立体匹配和三维重建五个步骤。The three-dimensional reconstruction technology based on computer vision refers to recovering the geometric information of space objects from two or more two-dimensional images. Therefore, the research on the 3D reconstruction system based on binocular stereo vision has been developed. The stereo vision system is generally divided into stereo parallel vision system and stereo convergence vision system. If the optical axes of the two cameras are arranged in parallel, it is called a stereo parallel vision system; if the two optical axes intersect and converge on the spatial target, it is called a stereo convergent vision system. A complete stereo vision system can be divided into five steps: image acquisition, image preprocessing, camera calibration, stereo matching and 3D reconstruction.
本申请发明人雷蕴奇等(雷蕴奇,宋晓冰,袁美玲,等.双目视觉中的一种人脸立体匹配及视差计算方法[J].厦门大学学报:自然科学版,2009,48(1):36-41)报道了双目视觉中的一种人脸立体匹配及视差计算方法。Inventors of the present application, Lei Yunqi et al. (Lei Yunqi, Song Xiaobing, Yuan Meiling, et al. A face stereo matching and disparity calculation method in binocular vision [J]. Journal of Xiamen University: Natural Science Edition, 2009,48 (1):36-41) reported a face stereo matching and disparity calculation method in binocular vision.
发明内容Contents of the invention
本发明的目的在于针对现有的立体视觉系统中的图像获取及视差计算中存在的不足,提供一种多镜头立体视觉视差的计算方法。The object of the present invention is to provide a multi-lens stereo vision disparity calculation method for the deficiencies in the image acquisition and disparity calculation in the existing stereo vision system.
本发明包括:The present invention includes:
一个初始化的步骤;an initialization step;
一个获取所有双目视差测距的步骤;A step to obtain all binocular parallax distance measurements;
一个获取多镜头视差测距的步骤;A step of obtaining multi-lens parallax ranging;
一个结束步骤。an end step.
所述多镜头为3镜头、4镜头、5镜头、6镜头、7镜头、8镜头、9镜头以及10~2500镜头。The multiple lenses are 3 lenses, 4 lenses, 5 lenses, 6 lenses, 7 lenses, 8 lenses, 9 lenses and 10-2500 lenses.
所述3镜头立体视觉视差计算方法包括以下步骤:The 3-camera stereoscopic parallax calculation method comprises the following steps:
1、初始化步骤1. Initialization steps
1.13镜头布放方式1.13 Lens placement method
3镜头布放方式包括等边三角形、等腰三角形、任意三角形或在同一直线上等距布放;3 Lens placement methods include equilateral triangle, isosceles triangle, arbitrary triangle or equidistant arrangement on the same straight line;
1.2初始化所有参数变量1.2 Initialize all parameter variables
令同一平面上的三个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,三个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l1–l3,它表示了P在每两个摄像机所成图像中成像点的位置差异;设d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S1与S3所测距离为d13;Let every two cameras of the three cameras on the same plane capture the object P to obtain a two-dimensional image, according to the stereoscopic parallel camera system visual model and its calculation method, there is an object P between two of the three lenses on the two image planes The parallax above is recorded as l 1 –l 2 , l 2 –l 3 , l 1 –l 3 , which represent the position difference of the imaging point of P in the image formed by each two cameras; let d represent the object P distance The distance between S 1 and S 2 is d 12 , the distance between S 2 and S 3 is d 23 , and the distance between S 1 and S 3 is d 13 ;
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2)d 12 =(L 12 *f)/(l 1 -l 2 )
d23=(L23*f)/(l2-l3)d 23 =(L 23 *f)/(l 2 -l 3 )
d13=(L13*f)/(l1-l3)d 13 =(L 13 *f)/(l 1 -l 3 )
3、获取3镜头视差测距步骤3. Steps to obtain 3-lens parallax distance measurement
3.1对于等边三角形,L12=L23=L13,则最终测距d为:3.1 For an equilateral triangle, L 12 =L 23 =L 13 , then the final distance measurement d is:
d=(d12+d23+d13)/3d=(d 12 +d 23 +d 13 )/3
3.2对于等腰三角形,则最终测距d为:3.2 For an isosceles triangle, Then the final ranging d is:
3.3对于任意三角形,L23≠L12≠L13,则最终测距d为:3.3 For any triangle, L 23 ≠L 12 ≠L 13 , then the final distance measurement d is:
d=(d12+d23+d13)/3d=(d 12 +d 23 +d 13 )/3
3.4对于在同一直线上等距布放,2L23=2L12=L13,则最终测距d为:3.4 For equidistant deployment on the same straight line, 2L 23 =2L 12 =L 13 , then the final distance measurement d is:
4、结束步骤4. End step
依据如上公式计算出3镜头视差测距结果,将结果输出。Calculate the 3-lens parallax distance measurement result according to the above formula, and output the result.
所述4镜头立体视觉视差计算方法包括以下步骤:The 4-camera stereoscopic parallax calculation method comprises the following steps:
1、初始化步骤1. Initialization steps
1.14镜头布放方式。4镜头布放方式包括正方形;长方形;3个镜头组成等边三角形,位于同一圆上,另一个镜头在圆心;在圆上任意布放;3个镜头组成等边三角形,位于同一圆上,另一个镜头在等边三角形下边2个镜头连线的中间;在同一直线上等距布放;1.14 Lens placement method. 4 Lens placement methods include square; rectangle; 3 lenses form an equilateral triangle, located on the same circle, and the other lens is in the center of the circle; any arrangement on the circle; 3 lenses form an equilateral triangle, located on the same circle, and the other One lens is in the middle of the line connecting the two lenses under the equilateral triangle; equidistantly arranged on the same straight line;
1.2初始化所有参数变量1.2 Initialize all parameter variables
S1,S2,S3,S4分别表示四个摄像机的光学中心位置,L13,L12,L23,L14,L24,L34分别表示每对摄像头光学中心之间的距离,四个摄像机的焦距均为f,令同一平面上的四个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,四个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l1–l3,l1–l4,l2–l4,l3–l4,它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S1与S3所测距离为d13,S1与S4所测距离为d14,S2与S4所测距离为d24,S3与S4所测距离为d34。S 1 , S 2 , S 3 , and S 4 respectively represent the optical center positions of the four cameras, L 13 , L 12 , L 23 , L 14 , L 24 , and L 34 represent the distance between the optical centers of each pair of cameras, The focal lengths of the four cameras are all f, so that every two cameras of the four cameras on the same plane capture the object P to obtain a two-dimensional image. According to the visual model of the stereo parallel camera system and its calculation method, the pairwise There exists the parallax of the object P on the two image planes, which are recorded as l 1 –l 2 , l 2 –l 3 , l 1 –l 3 , l 1 –l 4 , l 2 –l 4 , l 3 –l 4 , which represents the position difference of the imaging point of P in the image formed by each two cameras. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 1 and S 3 is d 13 , and the distance measured by S 1 and S 3 is d 13 . The distance measured by 4 is d 14 , the distance measured by S 2 and S 4 is d 24 , and the distance measured by S 3 and S 4 is d 34 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d13=(L13*f)/(l1-l3)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 13 =(L 13 *f)/(l 1 - l 3 )
d14=(L14*f)/(l1-l4);d24=(L24*f)/(l2-l4);d34=(L34*f)/(l3-l4)d 14 =(L 14 *f)/(l 1 -l 4 ); d 24 =(L 24 *f)/(l 2 -l 4 ); d 34 =(L 34 *f)/(l 3 - l 4 )
3、获取4镜头视差测距步骤3. Steps to obtain 4-lens parallax distance measurement
3.1对于正方形,L12=L23=L34=L14,则最终测距d为:3.1 For a square, L 12 =L 23 =L 34 =L 14 , then the final distance measurement d is:
3.2对于长方形,则最终测距d为:3.2 For rectangles, Then the final ranging d is:
3.3对于3个镜头组成等边三角形,位于同一圆上,另一个镜头在圆心,L23=L12=L13,则最终测距d为:3.3 For three lenses forming an equilateral triangle, located on the same circle, and the other lens is at the center of the circle, L 23 =L 12 =L 13 , then the final distance measurement d is:
3.4对于在圆上任意布放,镜头两两之间距离不同,则最终测距d为:3.4 For any arrangement on the circle, the distance between the lenses is different, then the final distance measurement d is:
d=(d12+d23+d13+d14+d24+d34)/6d=(d 12 +d 23 +d 13 +d 14 +d 24 +d 34 )/6
3.5对于3个镜头组成等边三角形,位于同一圆上,另一个镜头在等边三角形下边2个镜头连线的中间;或在同一直线上等距布放;先求出各对镜头间距离之和:L=L13+L12+L23+L14+L24+L34,则最终测距d为加权平均求和:3.5 For three lenses forming an equilateral triangle, located on the same circle, the other lens is in the middle of the line connecting the two lenses under the equilateral triangle; or arranged equidistantly on the same straight line; Sum: L=L 13 +L 12 +L 23 +L 14 +L 24 +L 34 , then the final distance measurement d is the weighted average sum:
其中i从1到3,j从2到4,且i大于j。Where i is from 1 to 3, j is from 2 to 4, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
所述5镜头立体视觉视差计算方法包括以下步骤:The 5-camera stereoscopic parallax calculation method comprises the following steps:
1、初始化步骤1. Initialization steps
1.15镜头布放方式1.15 Lens arrangement
5镜头的布放方式包括:4个镜头组成正方形,位于同一圆上,另一个镜头在圆外并与正方形一边的2个镜头组成等腰三角形;4个镜头组成正方形,位于同一圆上,另一个镜头布放在圆心;正五边形;在同一直线上等距布放;4个镜头组成正方形,位于同一圆上,另一个镜头在正方形下边2个镜头连线的中间;4个镜头组成长方形,另一个镜头在长方形下边2个镜头连线的中间;镜头分2排布放,相邻的镜头均组成等边三角形;The layout of the 5 lenses includes: 4 lenses form a square and are located on the same circle, and the other lens is outside the circle and forms an isosceles triangle with the 2 lenses on one side of the square; 4 lenses form a square and are located on the same circle. One lens is arranged in the center of the circle; it is a regular pentagon; it is arranged equidistantly on the same straight line; 4 lenses form a square and are located on the same circle, and the other lens is in the middle of the line connecting the 2 lenses below the square; 4 lenses form Rectangle, the other lens is in the middle of the line connecting the two lenses below the rectangle; the lenses are arranged in two rows, and the adjacent lenses form an equilateral triangle;
1.2初始化所有参数变量1.2 Initialize all parameter variables
S1,S2,S3,S4,S5分别表示五个摄像机的光学中心位置,L12,L23,L34,L45,L15,L13,L14,L24,L25,L35分别表示每对摄像机光学中心之间的距离,五个摄像机的焦距均为f。令同一平面上的五个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,五个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l1–l5,l1–l3,l1–l4,l2–l4,l2–l5,l3–l5它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S1与S5所测距离为d15,S1与S3所测距离为d13,S1与S4所测距离为d14,S2与S4所测距离为d24,S2与S5所测距离为d25,S3与S5所测距离为d35。S 1 , S 2 , S 3 , S 4 , S 5 represent the optical center positions of the five cameras respectively, L 12 , L 23 , L 34 , L 45 , L 15 , L 13 , L 14 , L 24 , L 25 , L 35 respectively represent the distance between the optical centers of each pair of cameras, and the focal lengths of the five cameras are all f. Let every two of the five cameras on the same plane capture the object P to obtain a two-dimensional image. According to the stereoscopic parallel camera system visual model and its calculation method, there is an object P on the two image planes between the five lenses. The parallax on is denoted as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 1 –l 5 , l 1 –l 3 , l 1 –l 4 , l 2 –l 4 , l 2 –l 5 , l 3 –l 5 It represents the position difference of the imaging point of P in the image formed by every two cameras. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 3 and S 4 is d 34 , and the distance measured by S 4 and S The distance measured by 5 is d 45 , the distance measured by S 1 and S 5 is d 15 , the distance measured by S 1 and S 3 is d 13 , the distance measured by S 1 and S 4 is d 14 , and the distance measured by S 2 and S 4 is d 15 . The measured distance is d 24 , the measured distance between S 2 and S 5 is d 25 , and the measured distance between S 3 and S 5 is d 35 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d15=(L15*f)/(l1-l5);d13=(L13*f)/(L1-l3)d 45 =(L 45 *f)/(l 4 -l 5 ); d 15 =(L 15 *f)/(l 1 -l 5 ); d 13 =(L 13 *f)/(L 1 - l 3 )
d14=(L14*f)/(l1-l4);d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5)d 14 =(L 14 *f)/(l 1 -l 4 ); d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 - l 5 )
d35=(L35*f)/(l3-l5)d 35 =(L 35 *f)/(l 3 -l 5 )
3、获取5镜头视差测距步骤3. Steps to obtain 5-lens parallax distance measurement
3.1对于4个镜头组成正方形,位于同一圆上,另一个镜头在圆外并与正方形一边的2个镜头组成等腰三角形,L12=L23=L34=L14,则最终测距d为:3.1 For 4 lenses forming a square, located on the same circle, the other lens is outside the circle and forming an isosceles triangle with the 2 lenses on one side of the square, L 12 = L 23 = L 34 = L 14 , Then the final ranging d is:
3.2对于4个镜头组成正方形,位于同一圆上,另一个镜头布放在圆心,L12=L34=L14=L23,则最终测距d为:3.2 For 4 lenses forming a square, located on the same circle, and another lens placed in the center of the circle, L 12 =L 34 =L 14 =L 23 , then the final distance measurement d is:
3.3对于正五边形,L12=L23=L34=L45=L15,则最终测距d为:3.3 For the regular pentagon, L 12 =L 23 =L 34 =L 45 =L 15 , then the final distance d is:
其中,a表示d13、d14、d24、d25、d35的双目测距结果在所有两镜头双目测距结果总和的比例,取0.6到2.4之间的任一数值(一般而言,取值大于等于1),可取增量步长为0.1。Among them, a represents the ratio of the binocular ranging results of d 13 , d 14 , d 24 , d 25 , and d 35 to the sum of the binocular ranging results of all two lenses, and takes any value between 0.6 and 2.4 (generally In other words, the value is greater than or equal to 1), and the incremental step size is 0.1.
3.4对于在同一直线上等距布放;或4个镜头组成正方形,位于同一圆上,另一个镜头在正方形下边2个镜头连线的中间;或4个镜头组成长方形,另一个镜头在长方形下边2个镜头连线的中间;或镜头分2排布放,相邻镜头均组成等边三角形;先求出各对镜头间距离之和:L=L12+L23+L34+L45+L15+L13+L14+L24+L25+L35,则最终测距d为加权平均求和:3.4 For equidistant arrangement on the same straight line; or 4 lenses form a square, located on the same circle, and the other lens is in the middle of the line connecting the 2 lenses under the square; or 4 lenses form a rectangle, and the other lens is under the rectangle In the middle of the line connecting two lenses; or the lenses are arranged in two rows, and the adjacent lenses form an equilateral triangle; first find the sum of the distances between each pair of lenses: L=L 12 +L 23 +L 34 +L 45 + L 15 +L 13 +L 14 +L 24 +L 25 +L 35 , then the final distance d is the weighted average sum:
其中i从1到4,j从2到5,且i大于j。Where i is from 1 to 4, j is from 2 to 5, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出5镜头视差测距结果,将结果输出。Calculate the 5-lens parallax ranging result according to the above formula, and output the result.
所述6镜头立体视觉视差计算方法包括以下步骤:The 6-camera stereoscopic parallax calculation method comprises the following steps:
1、初始化步骤1. Initialization steps
1.16镜头布放方式1.16 Lens placement method
6镜头的布放方式包括:4个镜头组成正方形,位于同一圆上,另2个镜头在圆外并分别与正方形两边相邻的2个镜头及圆心各组成2个正方形;4个镜头组成正方形,位于同一圆上,一个镜头布放在圆心,另一个镜头在圆外并与其下面的正方形一边的2个镜头组成等腰三角形;5个镜头组成正五边形,位于同一圆上,另1个镜头布放在圆心;等边六边形,位于同一圆上;在同一直线上等距布放;4个镜头组成正方形,位于同一圆上,另2个镜头各在正方形上下边2个镜头连线的中间;6个镜头长方形;3个镜头组成一个外边大等边三角形,另3个布放在大等边三角形每条边的中间,组成倒立的小等边三角形;分2排布放,相邻的镜头均组成等边三角形。The layout of the 6 lenses includes: 4 lenses form a square, located on the same circle, and the other 2 lenses are outside the circle and respectively form 2 squares with the 2 adjacent lenses on both sides of the square and the center of the circle; 4 lenses form a square , located on the same circle, one lens is arranged in the center of the circle, the other lens is outside the circle and forms an isosceles triangle with the two lenses on one side of the square below; five lenses form a regular pentagon, located on the same circle, and the other one The first lens is arranged in the center of the circle; the equilateral hexagon is located on the same circle; the equidistant arrangement is arranged on the same straight line; 4 lenses form a square and are located on the same circle, and the other 2 lenses are 2 lenses on the upper and lower sides of the square. In the middle of the connecting line; 6 lenses are rectangular; 3 lenses form a large equilateral triangle on the outside, and the other 3 lenses are arranged in the middle of each side of the large equilateral triangle to form an inverted small equilateral triangle; arranged in 2 rows , adjacent lenses form an equilateral triangle.
1.2初始化所有参数变量1.2 Initialize all parameter variables
S1,S2,S3,S4,S5,S6分别表示六个摄像机的光学中心位置,L12,L23,L34,L45,L56,L16,L13,L14,L15,L24,L25,L26,L35,L36,L46分别表示六个摄像机光学中心之间的距离,六个摄像机的焦距均为f。令同一平面上的六个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,六个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l1–l6,l1–l3,l1–l4,l1–l5,l2–l4,l2–l5,l2–l6,l3–l5,l3–l6,l4–l6它表示了P在每两个摄像机所成图像中成像点的位置差异;d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S1与S6所测距离为d16,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S3与S5所测距离为d35,S3与S6所测距离为d36,S4与S6所测距离为d46;S 1 , S 2 , S 3 , S 4 , S 5 , S 6 represent the optical center positions of the six cameras, respectively, L 12 , L 23 , L 34 , L 45 , L 56 , L 16 , L 13 , L 14 , L 15 , L 24 , L 25 , L 26 , L 35 , L 36 , and L 46 represent the distances between the optical centers of the six cameras respectively, and the focal lengths of the six cameras are all f. Let every two cameras of the six cameras on the same plane capture the object P to obtain a two-dimensional image. According to the stereoscopic parallel camera system visual model and its calculation method, there is an object P on the two image planes between the six lenses. The parallax on is denoted as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 1 –l 6 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 2 –l 4 , l 2 –l 5 , l 2 –l 6 , l 3 –l 5 , l 3 –l 6 , l 4 –l 6 The position difference of the imaging point in the image formed by each two cameras; d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , and S The measured distance between 3 and S 4 is d 34 , the measured distance between S 4 and S 5 is d 45 , the measured distance between S 5 and S 6 is d 56 , the measured distance between S 1 and S 6 is d 16 , and the measured distance between S 1 and S 6 is d 16 . The distance measured by S 3 is d 13 , the distance measured by S 1 and S 4 is d 14 , the distance measured by S 1 and S 5 is d 15 , the distance measured by S 2 and S 4 is d 24 , and the distance measured by S 2 and S 5 is d 14 The measured distance is d 25 , the measured distance between S 2 and S 6 is d 26 , the measured distance between S 3 and S 5 is d 35 , the measured distance between S 3 and S 6 is d 36 , and the measured distance between S 4 and S 6 The distance is d 46 ;
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d16==(L16*f)/(l1-l6)d 45 =(L 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 16 ==(L 16 *f)/(l 1 -l 6 )
d13=(L13*f)/(l1-l3);d14=(L14*f)/(l1-l4);d15=(L15*f)/(l1-l5)d 13 =(L 13 *f)/(l 1 -l 3 ); d 14 =(L 14 *f)/(l 1 -l 4 ); d 15 =(L 15 *f)/(l 1 - l 5 )
d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5);d26=(L26*f)/(l2-l6)d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 -l 5 ); d 26 =(L 26 *f)/(l 2 - l 6 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d46=(L46*f)/(l4-l6)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 46 =(L 46 *f)/(l 4 - l 6 )
3、获取6镜头视差测距步骤3. Steps to obtain 6-lens parallax distance measurement
根据6镜头的不同布放方式,先求出各对镜头间距离之和:L=L12+L23+L34+L45+L56+L16+L13+L14+L15+L24+L25+L26+L35+L36+L46,则最终测距d为加权平均求和:According to the different layout methods of the 6 lenses, first calculate the sum of the distances between each pair of lenses: L=L 12 +L 23 +L 34 +L 45 +L 56 +L 16 +L 13 +L 14 +L 15 +L 24 +L 25 +L 26 +L 35 +L 36 +L 46 , then the final distance d is the weighted average sum:
其中i从1到5,j从2到6,且i大于j。Where i is from 1 to 5, j is from 2 to 6, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
所述7镜头立体视觉视差计算方法包括以下步骤:The 7-camera stereoscopic parallax calculation method comprises the following steps:
1、初始化步骤1. Initialization steps
1.1 7镜头布放方式1.1 7 Lens placement methods
7镜头的顶点布放方式包括:4个镜头组成正方形,位于同一圆上,另3个镜头在圆外并与其相邻正方形边上的2个镜头及圆心各组成3个正方形;4个镜头组成正方形,位于同一圆上,一个镜头布放在圆心,另2个在圆外并与其相邻正方形边上的2个镜头及圆心各组成2个正方形;4个镜头组成正方形,位于同一圆上,一个镜头布放在圆心,另2个在圆外并与其相邻正方形边上的2个镜头各组成2个等腰三角形;6个镜头组成等边六边形,位于同一圆上,一个镜头布放在圆心;组成等边七边形,位于同一圆上;在同一直线上等距布放;4个镜头组成正方形,位于同一圆上,另2个镜头各在正方形上下边2个镜头连线的中间,1个镜头在右边且与其相邻的2个镜头组成等边或等腰三角形;4个镜头组成正方形,位于同一圆上,另2个镜头各在正方形上下边2个镜头连线的中间,另1个镜头在上边且与左上角和右上角的2个镜头组成等边或等腰三角形;分3排布放且相邻的镜头均组成等边三角形;分2排布放且相邻的镜头均组成等边三角形;The vertex layout of the 7 lenses includes: 4 lenses form a square, located on the same circle, and the other 3 lenses are outside the circle and form 3 squares with the 2 lenses on the side of the adjacent square and the center of the circle; 4 lenses form Square, located on the same circle, one lens is placed in the center of the circle, and the other two are outside the circle and form two squares with the two lenses on the side of the adjacent square and the center of the circle; four lenses form a square, located on the same circle, One lens is arranged in the center of the circle, and the other two are outside the circle and form two isosceles triangles with the two lenses on the side of the adjacent square; six lenses form an equilateral hexagon, located on the same circle, and one lens is arranged Placed in the center of the circle; form an equilateral heptagon, located on the same circle; equidistantly arranged on the same straight line; 4 lenses form a square, located on the same circle, and the other 2 lenses are connected on the upper and lower sides of the square. In the middle of the center, one lens is on the right and the two adjacent lenses form an equilateral or isosceles triangle; four lenses form a square and are located on the same circle, and the other two lenses are on the line connecting the two lenses on the upper and lower sides of the square. In the middle, the other lens is on the top and forms an equilateral or isosceles triangle with the 2 lenses in the upper left and upper right corners; it is arranged in 3 rows and the adjacent lenses form an equilateral triangle; it is arranged in 2 rows and adjacent Adjacent lenses form an equilateral triangle;
1.2初始化所有参数变量1.2 Initialize all parameter variables
S1,S2,S3,S4,S5,S6,S7分别表示七个摄像机的光学中心位置,L12,L23,L34,L45,L56,L67,L17,L13,L14,L15,L16,L24,L25,L26,L27,L35,L36,L37,L46,L47,L57分别表示每对摄像机光学中心之间的距离,七个摄像机的焦距均为f,令同一平面上的七个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,七个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l6–l7,l1–l7,l1–l3,l1–l4,l1–l5,l1–l6,l2–l4,l2–l5,l2–l6,l2–l7,l3–l5,l3–l6,l3–l7,l4–l6,l4–l7,l5–l7,它表示了P在每两个摄像机所成图像中成像点的位置差异;d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S6与S7所测距离为d67,S1与S7所测距离为d17,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S1与S6所测距离为d16,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S2与S7所测距离为d27,S3与S5所测距离为d35,S3与S6所测距离为d36,S3与S7所测距离为d37,S4与S6所测距离为d46,S4与S7所测距离为d47,S5与S7所测距离为d57;S 1 , S 2 , S 3 , S 4 , S 5 , S 6 , S 7 represent the optical center positions of the seven cameras respectively, L 12 , L 23 , L 34 , L 45 , L 56 , L 67 , L 17 , L 13 , L 14 , L 15 , L 16 , L 24 , L 25 , L 26 , L 27 , L 35 , L 36 , L 37 , L 46 , L 47 , L 57 represent the distance between the optical centers of each pair of cameras The distance between them, the focal lengths of the seven cameras are all f, so that every two cameras in the seven cameras on the same plane capture the object P to obtain a two-dimensional image, according to the visual model of the stereo parallel camera system and its calculation method, seven There is a parallax of the object P on the two image planes between the lenses, which are respectively recorded as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 6 –l 7 , l 1 –l 7 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 1 –l 6 , l 2 –l 4 , l 2 –l 5 , l 2 –l 6 , l 2 –l 7 , l 3 –l 5 , l 3 –l 6 , l 3 –l 7 , l 4 –l 6 , l 4 –l 7 , l 5 –l 7 , which represent the P The position difference of the imaging point in the image formed by each two cameras; d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , and S The measured distance between 3 and S 4 is d 34 , the measured distance between S 4 and S 5 is d 45 , the measured distance between S 5 and S 6 is d 56 , the measured distance between S 6 and S 7 is d 67 , and the measured distance between S 1 and S 7 is d 67 . The distance measured by S 7 is d 17 , the distance measured by S 1 and S 3 is d 13 , the distance measured by S 1 and S 4 is d 14 , the distance measured by S 1 and S 5 is d 15 , and the distance measured by S 1 and S 6 is d 15 The measured distance is d 16 , the measured distance between S 2 and S 4 is d 24 , the measured distance between S 2 and S 5 is d 25 , the measured distance between S 2 and S 6 is d 26 , and the measured distance between S 2 and S 7 The distance between S 3 and S 5 is d 27 , the distance between S 3 and S 5 is d 35 , the distance between S 3 and S 6 is d 36 , the distance between S 3 and S 7 is d 37 , and the distance between S 4 and S 6 is d 46 , the measured distance between S 4 and S 7 is d 47 , the measured distance between S 5 and S 7 is d 57 ;
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d67=(L67*f)/(l6-l7)d 45 =(L 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 67 =(L 67 *f)/(l 6 - l 7 )
d17=(L17*f)/(l1-l7):d13=(L13*f)/(l1-l3);d14=(L14*f)/(l1-l4)d 17 =(L 17 *f)/(l 1 -l 7 ):d 13 =(L 13 *f)/(l 1 -l 3 ); d 14 =(L 14 *f)/(l 1 - l 4 )
d15=(L15*f)/(l1-l5);d16=(L16*f)/(l1-l6);d24=(L24*f)/(l2-L4)d 15 =(L 15 *f)/(l 1 -l 5 ); d 16 =(L 16 *f)/(l 1 -l 6 ); d 24 =(L 24 *f)/(l 2 - L 4 )
d25=(L25*f)/(l2-l5);d26=(L26*f)/(l2-l6);d27=(L27*f)/(l2-l7)d 25 =(L 25 *f)/(l 2 -l 5 ); d 26 =(L 26 *f)/(l 2 -l 6 ); d 27 =(L 27 *f)/(l 2 - l 7 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d37=(L37*f)/(l3-l7)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 37 =(L 37 *f)/(l 3 - l 7 )
d46=(L46*f)/(l4-l6);d47=(L47*f)/(l4-l7);d57=(L57*f)/(l5-l7)d 46 =(L 46 *f)/(l 4 -l 6 ); d 47 =(L 47 *f)/(l 4 -l 7 ); d 57 =(L 57 *f)/(l 5 - l 7 )
3、获取7镜头视差测距步骤3. Steps to obtain 7-lens parallax distance measurement
根据7镜头的不同布放方式,先求出各对镜头间距离之和:L=L12+L23+L34+L45+L56+L67+L17+L13+L14+L15+L16+L24+L25+L26+L27+L35+L36+L37+L46+L47+L57,则最终测距d为加权平均求和:According to the different layout methods of the 7 lenses, first calculate the sum of the distances between each pair of lenses: L=L 12 +L 23 +L 34 +L 45 +L 56 +L 67 +L 17 +L 13 +L 14 +L 15 +L 16 +L 24 +L 25 +L 26 +L 27 +L 35 +L 36 +L 37 +L 46 +L 47 +L 57 , then the final distance measurement d is the weighted average sum:
其中i从1到6,j从2到7,且i大于j。Where i is from 1 to 6, j is from 2 to 7, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
所述8镜头立体视觉视差计算方法包括以下步骤:The 8-camera stereoscopic parallax calculation method comprises the following steps:
1、初始化步骤1. Initialization steps
1.18镜头布放方式1.18 Lens placement method
8镜头的布放方式包括:4个镜头组成正方形,位于同一圆上,另3个镜头在圆外并与其相邻正方形边上的2个镜头及圆心各组成3个正方形,另1个镜头在最左边对称布放;4个镜头组成正方形,位于同一圆上,另3个镜头在圆外并与其相邻正方形边上的2个镜头及圆心各组成3个正方形,另1个镜头布放在圆心;7个镜头组成等边七边形,位于同一圆上,另一个镜头布放在圆心;8个镜头组成等边八边形,位于同一圆上;在同一直线上等距布放;分2排布放且相邻的镜头均组成等边三角形;分2排布放且相邻的镜头均组成正方形;分3排布放且相邻的镜头均组成正方形;分3排布放且相邻的镜头均组成等边三角形;The layout of the 8 lenses includes: 4 lenses form a square and are located on the same circle, the other 3 lenses are outside the circle and form 3 squares with the 2 lenses on the side of the adjacent square and the center of the circle, and the other 1 lens is on the The far left is arranged symmetrically; 4 lenses form a square and are located on the same circle, and the other 3 lenses are outside the circle and form 3 squares with the 2 lenses on the side of the adjacent square and the center of the circle, and the other 1 lens is placed on the The center of the circle; 7 lenses form an equilateral heptagon and are located on the same circle, and the other lens is arranged on the center of the circle; 8 lenses form an equilateral octagon and are located on the same circle; they are arranged equidistantly on the same straight line; Arranged in 2 rows and adjacent lenses form an equilateral triangle; arranged in 2 rows and adjacent lenses form a square; arranged in 3 rows and adjacent lenses form a square; arranged in 3 rows and adjacent Adjacent lenses form an equilateral triangle;
1.2初始化所有参数变量1.2 Initialize all parameter variables
S1,S2,S3,S4,S5,S6,S7,S8分别表示八个摄像机的光学中心位置,用Lij分别表示每对摄像机光学中心之间的距离(其中i从1到7,j从2到8,且i大于j),八个摄像机的焦距均为f,令同一平面上的八个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,八个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l6–l7,l7–l8,l1–l8,l1–l3,l1–l4,l1–l5,l1–l6,l1–l7,l2–l4,l2–l5,l2–l6,l2–l7,l2–l8,l3–l5,l3–l6,l3–l7,l3–l8,l4–l6,l4–l7,l4–l8,l5–l7,l5–l8,l6–l8,它表示了P在每两个摄像机所成图像中成像点的位置差异;d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S6与S7所测距离为d67,S7与S8所测距离为d78,S1与S8所测距离为d18,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S1与S6所测距离为d16,S1与S7所测距离为d17,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S2与S7所测距离为d27,S2与S8所测距离为d28,S3与S5所测距离为d35,S3与S6所测距离为d36,S3与S7所测距离为d37,S3与S8所测距离为d38,S4与S6所测距离为d46,S4与S7所测距离为d47,S4与S8所测距离为d48,S5与S7所测距离为d57,S5与S8所测距离为d58,S6与S8所测距离为d68;S 1 , S 2 , S 3 , S 4 , S 5 , S 6 , S 7 , and S 8 represent the optical centers of the eight cameras respectively, and Lij represents the distance between the optical centers of each pair of cameras (where i starts from 1 to 7, j is from 2 to 8, and i is greater than j), the focal lengths of the eight cameras are all f, so that every two cameras in the eight cameras on the same plane capture the object P to obtain a two-dimensional image, according to the stereo The visual model of the parallel camera system and its calculation method, there is a parallax of the object P on the two image planes between the eight lenses, which are respectively recorded as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 6 –l 7 , l 7 –l 8 , l 1 –l 8 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 1 –l 6 , l 1 –l 7 , l 2 –l 4 , l 2 –l 5 , l 2 –l 6 , l 2 –l 7 , l 2 –l 8 , l 3 –l 5 , l 3 –l 6 , l 3 –l 7 , l 3 –l 8 , l 4 –l 6 , l 4 –l 7 , l 4 –l 8 , l 5 –l 7 , l 5 –l 8 , l 6 –l 8 , It represents the position difference of the imaging point of P in the image formed by each two cameras; d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , and the distance measured by S 2 and S 3 is d 23 , the measured distance between S 3 and S 4 is d 34 , the measured distance between S 4 and S 5 is d 45 , the measured distance between S 5 and S 6 is d 56 , the measured distance between S 6 and S 7 is d 67 , the distance measured by S 7 and S 8 is d 78 , the distance measured by S 1 and S 8 is d 18 , the distance measured by S 1 and S 3 is d 13 , the distance measured by S 1 and S 4 is d 14 , and S The measured distance between 1 and S 5 is d 15 , the measured distance between S 1 and S 6 is d 16 , the measured distance between S 1 and S 7 is d 17 , the measured distance between S 2 and S 4 is d 24 , and the measured distance between S 2 and S 4 is d 16 . The distance measured by S 5 is d 25 , the distance measured by S 2 and S 6 is d 26 , the distance measured by S 2 and S 7 is d 27 , the distance measured by S 2 and S 8 is d 28 , and the distance measured by S 3 and S 5 The measured distance is d 35 , the measured distance between S 3 and S 6 is d 36 , the measured distance between S 3 and S 7 is d 37 , the measured distance between S 3 and S 8 is d 38 , and the measured distance between S 4 and S 6 The distance is d 46 , the distance measured by S 4 and S 7 is d 47 , the distance measured by S 4 and S 8 is d 48 , the distance measured by S 5 and S 7 is d 57 , the distance measured by S 5 and S 8 is d 58 , The distance measured by S 6 and S 8 is d 68 ;
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d67=(L67*f)/(l6-l7)d 45 =(L 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 67 =(L 67 *f)/(l 6 - l 7 )
d78=(L78*f)/(l7-l8);d18=(L18*f)/(l1-l8);d13=(L13*f)/(l1-l3)d 78 =(L 78 *f)/(l 7 -l 8 ); d 18 =(L 18 *f)/(l 1 -l 8 ); d 13 =(L 13 *f)/(l 1 - l 3 )
d14=(L14*f)/(l1-l4);d15=(L15*f)/(l1-l5);d16=(L16*f)/(l1-l6)d 14 =(L 14 *f)/(l 1 -l 4 ); d 15 =(L 15 *f)/(l 1 -l 5 ); d 16 =(L 16 *f)/(l 1 - l 6 )
d17=(L17*f)/(l1-l7);d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5)d 17 =(L 17 *f)/(l 1 -l 7 ); d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 - l 5 )
d26=(L26*f)/(l2-l6);d27=(L27*f)/(l2-l7);d28=(L28*f)/(l2-l8)d 26 =(L 26 *f)/(l 2 -l 6 ); d 27 =(L 27 *f)/(l 2 -l 7 ); d 28 =(L 28 *f)/(l 2 - l 8 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d37=(L37*f)/(l3-l7)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 37 =(L 37 *f)/(l 3 - l 7 )
d38=(L38*f)/(l3-l8);d46=(L46*f)/(l4-l6);d47=(L47*f)/(l4-l7)d 38 =(L 38 *f)/(l 3 -l 8 ); d 46 =(L 46 *f)/(l 4 -l 6 ); d 47 =(L 47 *f)/(l 4 - l 7 )
d48=(L48*f)/(l4-l8);d57=(L57*f)/(l5-l7);d58=(L58*f)/(l5-l8)d 48 =(L 48 *f)/(l 4 -l 8 ); d 57 =(L 57 *f)/(l 5 -l 7 ); d 58 =(L 58 *f)/(l 5 - l 8 )
d68=(L68*f)/(l6-l8)d 68 =(L 68 *f)/(l 6 -l 8 )
3、获取8镜头视差测距步骤3. Obtain 8-lens parallax ranging steps
根据8镜头的不同布放方式,先求出各对镜头间距离之和:L=∑Lij,则最终测距d为加权平均求和:According to the different layout methods of the 8 lenses, first calculate the sum of the distances between each pair of lenses: L=∑Lij, then the final distance measurement d is the weighted average sum:
其中i从1到7,j从2到8,且i大于j。Where i is from 1 to 7, j is from 2 to 8, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
所述9镜头立体视觉视差计算方法包括以下步骤:The 9-camera stereoscopic parallax calculation method comprises the following steps:
1、初始化步骤1. Initialization steps
1.19镜头布放方式1.19 Lens placement method
9镜头的布放方式包括:4个镜头组成正方形,位于同一圆上,另3个镜头在圆外并与其相邻正方形边上的2个镜头及圆心各组成3个正方形,1个镜头在最左边对称布放,1个镜头布放在圆心;8个镜头组成等边八边形,1个镜头布放在圆心;分3排等间距布放,相邻的镜头均组成正方形;8个镜头分2排等间距布放,均组成正方形,另1个镜头在右边且与其相邻的2个镜头组成等边或等腰三角形;分3排布放且相邻的镜头均组成等边三角形;分2排布放且相邻的镜头均组成等边三角形;在同一直线上等距布放;9 The layout of the lens includes: 4 lenses form a square and are located on the same circle, the other 3 lenses are outside the circle and form 3 squares with the 2 lenses on the side of the adjacent square and the center of the circle, and 1 lens is in the outermost circle. Arranged symmetrically on the left, 1 lens is arranged in the center of the circle; 8 lenses form an equilateral octagon, and 1 lens is arranged in the center of the circle; it is arranged in 3 rows at equal intervals, and the adjacent lenses form a square; 8 lenses Arranged in 2 rows at equal intervals, both of which form a square, the other lens is on the right and forms an equilateral or isosceles triangle with the 2 adjacent lenses; arranged in 3 rows, and the adjacent lenses form an equilateral triangle; Arranged in 2 rows and adjacent lenses form an equilateral triangle; equidistantly arranged on the same straight line;
1.2初始化所有参数变量1.2 Initialize all parameter variables
S1,S2,S3,S4,S5,S6,S7,S8,S9分别表示九个摄像机的光学中心位置,用Lij分别表示每对摄像机光学中心之间的距离(其中i从1到8,j从2到9,且i大于j),九个摄像机的焦距均为f,令同一平面上的九个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,九个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l6–l7,l7–l8,l8–l9,l1–l9,l1–l3,l1–l4,l1–l5,l1–l6,l1–l7,l1–l8,l2–l4,l2–l5,l2–l6,l2–l7,l2–l8,l2–l9,l3–l5,l3–l6,l3–l7,l3–l8,l3–l9,l4–l6,l4–l7,l4–l8,l4–l9,l5–l7,l5–l8,l5–l9,l6–l8,l6–l9,l7–l9它表示了P在每两个摄像机所成图像中成像点的位置差异;d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S6与S7所测距离为d67,S7与S8所测距离为d78,S8与S9所测距离为d89,S1与S9所测距离为d19,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S1与S6所测距离为d16,S1与S7所测距离为d17,S1与S8所测距离为d18,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S2与S7所测距离为d27,S2与S8所测距离为d28,S2与S9所测距离为d29,S3与S5所测距离为d35,S3与S6所测距离为d36,S3与S7所测距离为d37,S3与S8所测距离为d38,S3与S9所测距离为d39,S4与S6所测距离为d46,S4与S7所测距离为d47,S4与S8所测距离为d48,S4与S9所测距离为d49,S5与S7所测距离为d57,S5与S8所测距离为d58,S5与S9所测距离为d59,S6与S8所测距离为d68,S6与S9所测距离为d69,S7与S9所测距离为d79;S1, S2, S3, S4, S5, S6, S7, S8, and S9 represent the optical center positions of nine cameras respectively, and Lij represents the distance between the optical centers of each pair of cameras (where i is from 1 to 8, and j is from 2 to 9, and i is greater than j), the focal lengths of the nine cameras are all f, so that every two cameras in the nine cameras on the same plane capture the object P to obtain a two-dimensional image, according to the visual model of the stereo parallel camera system and Its calculation method, there is a parallax of the object P on the two image planes between the nine lenses, which are respectively recorded as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 6 –l 7 , l 7 –l 8 , l 8 –l 9 , l 1 –l 9 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 1 –l 6 , l 1 –l 7 , l 1 –l 8 , l 2 –l 4 , l 2 –l 5 , l 2 –l 6 , l 2 –l 7 , l 2 –l 8 , l 2 –l 9 , l 3 –l 5 , l 3 –l 6 , l 3 –l 7 , l 3 –l 8 , l 3 –l 9 , l 4 –l 6 , l 4 –l 7 , l 4 –l 8 , l 4 –l 9 , l 5 –l 7 , l 5 –l 8 , l 5 –l 9 , l 6 –l 8 , l 6 –l 9 , l 7 –l 9 The position difference of the imaging point in the resulting image; d represents the distance between the object P and the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , and the distance measured by S 3 and S 4 is d 23 . The measured distance is d 34 , the measured distance between S 4 and S 5 is d 45 , the measured distance between S 5 and S 6 is d 56 , the measured distance between S 6 and S 7 is d 67 , and the measured distance between S 7 and S 8 The distance measured by S 8 and S 9 is d 89 , the distance measured by S 1 and S 9 is d 19 , the distance measured by S 1 and S 3 is d 13 , the distance measured by S 1 and S 4 is d 14 , the distance measured by S 1 and S 5 is d 15 , the distance measured by S 1 and S 6 is d 16 , the distance measured by S 1 and S 7 is d 17 , the distance measured by S 1 and S 8 is d 18 , The measured distance between S 2 and S 4 is d 24 , the measured distance between S 2 and S 5 is d 25 , the measured distance between S 2 and S 6 is d 26 , the measured distance between S 2 and S 7 is d 27 , and S 2 The measured distance between S 8 and S 8 is d 28 , the measured distance between S 2 and S 9 is d 29 , the measured distance between S 3 and S 5 is d 35 , the measured distance between S 3 and S 6 is d 36 , and the measured distance between S 3 and S 6 is d 36 . The distance measured by 7 is d 37 , the distance measured by S 3 and S 8 is d 38 , the distance measured by S 3 and S 9 is d 39 , the distance measured by S 4 and S 6 is d 46 , and the distance measured by S 4 and S 7 is d 38 . The measured distance is d 47 , the measured distance between S 4 and S 8 is d 48 , the measured distance between S 4 and S 9 is d 49 , the measured distance between S 5 and S 7 is d 57 , and the measured distance between S 5 and S 8 is d 58 , the distance measured by S 5 and S 9 is d 59 , the distance measured by S 6 and S 8 is d 68 , the distance measured by S 6 and S 9 is d 69 , the distance measured by S 7 and S 9 is d 79 ;
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d67=(L67*f)/(l6-l7)d 45 =(L 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 67 =(L 67 *f)/(l 6 - l 7 )
d78=(L78*f)/(l7-l8);d89=(L89*f)/(l8-l9);d19=(L19*f)/(l1-l9)d 78 =(L 78 *f)/(l 7 -l 8 ); d 89 =(L 89 *f)/(l 8 -l 9 ); d 19 =(L 19 *f)/(l 1 - l 9 )
d13=(L13*f)/(l1-l3);d14=(L14*f)/(l1-l4);d15=(L15*f)/(l1-l5)d 13 =(L 13 *f)/(l 1 -l 3 ); d 14 =(L 14 *f)/(l 1 -l 4 ); d 15 =(L 15 *f)/(l 1 - l 5 )
d16=(L16*f)/(l1-l6);d17=(L17*f)/(l1-l7);d18=(L18*f)/(l1-l8)d 16 =(L 16 *f)/(l 1 -l 6 ); d 17 =(L 17 *f)/(l 1 -l 7 ); d 18 =(L 18 *f)/(l 1 - l 8 )
d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5);d26=(L26*f)/(l2-l6)d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 -l 5 ); d 26 =(L 26 *f)/(l 2 - l 6 )
d27=(L27*f)/(l2-l7);d28=(L28*f)/(l2-l8);d29=(L29*f)/(l2-l9)d 27 =(L 27 *f)/(l 2 -l 7 ); d 28 =(L 28 *f)/(l 2 -l 8 ); d 29 =(L 29 *f)/(l 2 - l 9 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d37=(L37*f)/(l3-l7)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 37 =(L 37 *f)/(l 3 - l 7 )
d38=(L38*f)/(l3-l8);d39=(L39*f)/(l3-l9);d46=(L46*f)/(l4-l6)d 38 =(L 38 *f)/(l 3 -l 8 ); d 39 =(L 39 *f)/(l 3 -l 9 ); d 46 =(L 46 *f)/(l 4 - l 6 )
d47=(L47*f)/(l4-l7);d48=(L48*f)/(l4-l8);d49=(L49*f)/(l4-l9)d 47 =(L 47 *f)/(l 4 -l 7 ); d 48 =(L 48 *f)/(l 4 -l 8 ); d 49 =(L 49 *f)/(l 4 - l 9 )
d57=(L57*f)/(l5-l7);d58=(L58*f)/(l5-l8);d59=(L59*f)/(l5-l9)d 57 =(L 57 *f)/(l 5 -l 7 ); d 58 =(L 58 *f)/(l 5 -l 8 ); d 59 =(L 59 *f)/(l 5 - l 9 )
d68=(L68*f)/(l6-l8);d69=(L69*f)/(l6-l9);d79=(L79*f)/(l7-l9)d 68 =(L 68 *f)/(l 6 -l 8 ); d 69 =(L 69 *f)/(l 6 -l 9 ); d 79 =(L 79 *f)/(l 7 - l 9 )
3、获取9镜头视差测距步骤3. Obtain 9-lens parallax ranging steps
根据9镜头的不同布放方式,先求出各对镜头间距离之和:L=∑Lij,则最终测距d为加权平均求和:According to the different layout methods of the 9 lenses, first calculate the sum of the distances between each pair of lenses: L=∑Lij, then the final distance measurement d is the weighted average sum:
其中i从1~8,j从2~9,且i大于j。Where i ranges from 1 to 8, j ranges from 2 to 9, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
所述10~2500镜头立体视觉视差计算方法包括以下步骤:The method for calculating the stereoscopic parallax of 10-2500 lenses comprises the following steps:
1、初始化步骤1. Initialization steps
1.1镜头布放方式1.1 Lens placement method
10~2500镜头的排布方式按以下方法得到:The arrangement of 10-2500 lenses is obtained by the following method:
1)记镜头数为N,10≤N≤2500;1) Record the number of shots as N, 10≤N≤2500;
2)计算排布最大行数M:M2≤N<(M+1)2,M为对应N而确定的一个整数且3≤M≤50;2) Calculate the maximum number of rows M: M 2 ≤N<(M+1) 2 , M is an integer determined corresponding to N and 3≤M≤50;
3)选定具体要排布的行数H,1≤H≤M;3) Select the specific row number H to be arranged, 1≤H≤M;
3.1)如果H=1,则各镜头构成一条直线且等距离排布;3.1) If H=1, each lens forms a straight line and is arranged equidistantly;
3.2)如果H=2,在下面方式中选择其一:3.2) If H=2, choose one of the following ways:
3.2.1上下2行平行,相邻最近的每4个镜头构成正方形;3.2.1 The upper and lower rows are parallel, and every 4 adjacent lenses form a square;
3.2.2上下2行平行,相邻最近的每3个镜头构成等边三角形;3.2.2 The upper and lower rows are parallel, and every three adjacent lenses form an equilateral triangle;
3.2.3如果N为奇数,则最后一个镜头与上下2行最右边的2个镜头构成等边三角形,或者直接等距离布放在上行或下行;3.2.3 If N is an odd number, the last lens and the rightmost 2 lenses in the upper and lower rows form an equilateral triangle, or they are placed equidistantly in the upper or lower rows;
3.3)如果H≥3,各行之间平行且等距离:3.3) If H≥3, the rows are parallel and equidistant:
3.3.1根据H,确定每行布放的最少镜头数I:H×I≤N<H×(I+1);3.3.1 According to H, determine the minimum number of lenses I placed in each row: H×I≤N<H×(I+1);
3.3.2每个上下2行相邻的行中,相邻最近的每4个镜头构成正方形,或者采取3.3.3方式布放;3.3.2 In each of the upper and lower 2 adjacent rows, every 4 adjacent and closest lenses form a square, or adopt the arrangement in 3.3.3;
3.3.3每个上下2行相邻的行中,相邻最近的每3个镜头构成等边三角形;3.3.3 In each of the upper and lower 2 adjacent rows, every 3 adjacent lenses form an equilateral triangle;
3.3.4多出的K个镜头(1≤K<H),则每行一个将它们布放在第一行到第K行中间的延长线上,且与其上下2行最右边的2个镜头构成等边三角形;或者每行一个将它们等距离布放在第一行到第K行的延长线上,与其相邻的4个镜头构成正方形。3.3.4 For extra K lenses (1≤K<H), place them on the extension line between the first row and the Kth row, one for each row, and the rightmost two lenses in the upper and lower rows Form an equilateral triangle; or arrange them equidistantly on the extension line from the first row to the Kth row one by one in each row, and the 4 adjacent lenses form a square.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在10~2500镜头的布放方式下,Si(i从1到N)表示各摄像机的光学中心位置,用Lij分别表示每对摄像机光学中心之间的距离(其中i从1到N-1,j从2到N,且i大于j),各个摄像机的焦距均为f,令同一平面上的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,镜头i和镜头j两两之间存在物体P在两个图像面上的视差,记作(li–lj),它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则Si与Sj所测距离为dij。In the arrangement of 10-2500 lenses, Si (i from 1 to N) represents the optical center position of each camera, and Lij represents the distance between the optical centers of each pair of cameras (where i is from 1 to N-1, j ranges from 2 to N, and i is greater than j), the focal length of each camera is f, so that every two cameras on the same plane capture the object P to obtain a two-dimensional image, according to the visual model of the stereo parallel camera system and its calculation method, There is a parallax of the object P on the two image planes between lens i and lens j, which is denoted as (li–lj), which represents the position difference of the imaging point of P in the images formed by each two cameras. d represents the distance between the object P and the plane, then the distance measured by Si and Sj is dij.
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头Si和镜头Sj之间的双目视差测距计算结果为:The binocular parallax ranging calculation result between every two lenses Si and Sj is:
dij=(Lij*f)/(li-lj)d ij =(L ij *f)/(l i -l j )
其中i从1到N-1,j从2到N,且i大于j。Where i is from 1 to N-1, j is from 2 to N, and i is greater than j.
3、获取10~2500镜头视差测距步骤3. Steps to get the parallax ranging from 10 to 2500 lenses
根据10~2500镜头各个不同布放方式,先求出各对镜头间距离之和:L=∑Lij,则最终测距d为加权平均求和:According to the different layout methods of 10-2500 lenses, first calculate the sum of the distances between each pair of lenses: L=∑Lij, then the final distance measurement d is the weighted average sum:
其中i从1到N-1,j从2到N,且i大于j。Where i is from 1 to N-1, j is from 2 to N, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出10~2500镜头视差测距结果,将结果输出。According to the above formula, calculate the parallax ranging result of 10-2500 lenses, and output the result.
本发明从多个视点观察同一景物,以获取在不同视角下的感知图像,通过三角测量原理计算图像像素间的位置偏差(即视差)来获取景物的三维信息。在基于立体平行视觉模型的基础上,给出多镜头立体视觉摄像及其视差的计算方法。在多镜头成像的环境下利用立体平行视觉模型的视差计算方法,对多镜头相互之间进行视差计算,获得更为精确的成像视差,使得三维重建中物体点深度信息更为精确。The present invention observes the same scene from multiple viewpoints to obtain perceptual images under different viewing angles, and calculates the positional deviation (that is, parallax) between image pixels through the principle of triangulation to obtain three-dimensional information of the scene. Based on the stereo parallel vision model, the calculation method of multi-lens stereo vision camera and its parallax is given. In the multi-lens imaging environment, the disparity calculation method of the stereo parallel vision model is used to calculate the disparity between the multiple lenses to obtain more accurate imaging disparity, which makes the depth information of object points more accurate in 3D reconstruction.
附图说明Description of drawings
图1为立体平行摄像系统视觉模型示意图。Figure 1 is a schematic diagram of the visual model of the stereo parallel camera system.
图2为3镜头布放方式(3镜头-1)。Figure 2 shows the arrangement of 3 lenses (3 lenses-1).
图3为3镜头布放方式(3镜头-2)。Figure 3 shows the arrangement of 3 lenses (3 lenses-2).
图4为3镜头布放方式(3镜头-3)。Figure 4 shows the arrangement of 3 lenses (3 lenses-3).
图5为3镜头布放方式(3镜头-4)。Figure 5 shows the arrangement of 3 lenses (3 lenses-4).
图6为4镜头布放方式(4镜头-1)。Figure 6 shows the arrangement of 4 lenses (4 lenses-1).
图7为4镜头布放方式(4镜头-2)。Figure 7 shows the arrangement of 4 lenses (4 lenses-2).
图8为4镜头布放方式(4镜头-3)。Figure 8 shows the arrangement of 4 lenses (4 lenses-3).
图9为4镜头布放方式(4镜头-4)。Figure 9 shows the arrangement of 4 lenses (4 lenses-4).
图10为4镜头布放方式(4镜头-5)。Figure 10 shows the arrangement of 4 lenses (4 lenses-5).
图11为4镜头布放方式(4镜头-6)。Figure 11 shows the arrangement of 4 lenses (4 lenses-6).
图12为5镜头布放方式(5镜头-1)。Figure 12 shows the arrangement of 5 lenses (5 lenses-1).
图13为5镜头布放方式(5镜头-2)。Figure 13 shows the arrangement of 5 lenses (5 lenses-2).
图14为5镜头布放方式(5镜头-3)。Figure 14 shows the arrangement of 5 lenses (5 lenses-3).
图15为5镜头布放方式(5镜头-4)。Figure 15 shows the arrangement of 5 lenses (5 lenses-4).
图16为5镜头布放方式(5镜头-5)。Figure 16 shows the arrangement of 5 lenses (5 lenses-5).
图17为5镜头布放方式(5镜头-6)。Figure 17 shows the arrangement of 5 lenses (5 lenses-6).
图18为5镜头布放方式(5镜头-7)。Figure 18 shows the arrangement of 5 lenses (5 lenses-7).
图19为6镜头布放方式(6镜头-1)。Figure 19 shows the arrangement of 6 lenses (6 lenses-1).
图20为6镜头布放方式(6镜头-2)。Figure 20 shows the arrangement of 6 lenses (6 lenses-2).
图21为6镜头布放方式(6镜头-3)。Figure 21 shows the arrangement of 6 lenses (6 lenses-3).
图22为6镜头布放方式(6镜头-4)。Figure 22 shows the arrangement of 6 lenses (6 lenses-4).
图23为6镜头布放方式(6镜头-5)。Figure 23 shows the arrangement of 6 lenses (6 lenses-5).
图24为6镜头布放方式(6镜头-6)。Figure 24 shows the arrangement of 6 lenses (6 lenses-6).
图25为6镜头布放方式(6镜头-7)。Figure 25 shows the arrangement of 6 lenses (6 lenses-7).
图26为6镜头布放方式(6镜头-8)。Figure 26 shows the arrangement of 6 lenses (6 lenses-8).
图27为6镜头布放方式(6镜头-9)。Figure 27 shows the arrangement of 6 lenses (6 lenses-9).
图28为7镜头布放方式(7镜头-1)。Figure 28 shows the arrangement of 7 lenses (7 lenses-1).
图29为7镜头布放方式(7镜头-2)。Figure 29 shows the arrangement of 7 lenses (7 lenses-2).
图30为7镜头布放方式(7镜头-3)。Figure 30 shows the arrangement of 7 lenses (7 lenses-3).
图31为7镜头布放方式(7镜头-4)。Figure 31 shows the arrangement of 7 lenses (7 lenses-4).
图32为7镜头布放方式(7镜头-5)。Figure 32 shows the arrangement of 7 lenses (7 lenses-5).
图33为7镜头布放方式(7镜头-6)。Figure 33 shows the arrangement of 7 lenses (7 lenses-6).
图34为7镜头布放方式(7镜头-7)。Figure 34 shows the arrangement of 7 lenses (7 lenses-7).
图35为7镜头布放方式(7镜头-8)。Figure 35 shows the arrangement of 7 lenses (7 lenses-8).
图36为7镜头布放方式(7镜头-9)。Figure 36 shows the arrangement of 7 lenses (7 lenses-9).
图37为7镜头布放方式(7镜头-10)。Figure 37 shows the arrangement of 7 lenses (7 lenses-10).
图38为8镜头布放方式(8镜头-1)。Figure 38 shows the arrangement of 8 lenses (8 lenses-1).
图39为8镜头布放方式(8镜头-2)。Figure 39 shows the arrangement of 8 lenses (8 lenses-2).
图40为8镜头布放方式(8镜头-3)。Figure 40 shows the arrangement of 8 lenses (8 lenses-3).
图41为8镜头布放方式(8镜头-4)。Figure 41 shows the arrangement of 8 lenses (8 lenses-4).
图42为8镜头布放方式(8镜头-5)。Figure 42 shows the arrangement of 8 lenses (8 lenses-5).
图43为8镜头布放方式(8镜头-6)。Figure 43 shows the arrangement of 8 lenses (8 lenses-6).
图44为8镜头布放方式(8镜头-7)。Figure 44 shows the arrangement of 8 lenses (8 lenses-7).
图45为8镜头布放方式(8镜头-8)。Figure 45 shows the arrangement of 8 lenses (8 lenses-8).
图46为8镜头布放方式(8镜头-9)。Figure 46 shows the arrangement of 8 lenses (8 lenses-9).
图47为9镜头布放方式(9镜头-1)。Figure 47 shows the arrangement of 9 lenses (9 lenses-1).
图48为9镜头布放方式(9镜头-2)。Figure 48 shows the arrangement of 9 lenses (9 lenses-2).
图49为9镜头布放方式(9镜头-3)。Figure 49 shows the arrangement of 9 lenses (9 lenses-3).
图50为9镜头布放方式(9镜头-4)。Figure 50 shows the arrangement of 9 lenses (9 lenses-4).
图51为9镜头布放方式(9镜头-5)。Figure 51 shows the arrangement of 9 lenses (9 lenses-5).
图52为9镜头布放方式(9镜头-6)。Figure 52 shows the arrangement of 9 lenses (9 lenses-6).
图53为9镜头布放方式(9镜头-7)。Figure 53 shows the arrangement of 9 lenses (9 lenses-7).
具体实施方式detailed description
以下实施例将结合附图对本发明作进一步的说明。The following embodiments will further illustrate the present invention in conjunction with the accompanying drawings.
在基于立体平行视觉模型的基础上,提出多镜头立体视觉摄像及其视差的计算方法,在多镜头成像的环境下利用立体平行视觉模型的视差计算方法,对多镜头相互之间进行视差计算,获得更为精确的成像视差,使得三维重建中物体点深度信息更为精确。Based on the stereo parallel vision model, a multi-lens stereo vision camera and its disparity calculation method are proposed. In the multi-lens imaging environment, the disparity calculation method of the stereo parallel vision model is used to calculate the disparity between multiple lenses. Obtaining more accurate imaging parallax makes the depth information of object points more accurate in 3D reconstruction.
本发明提出多镜头立体视觉摄像及其视差的计算方法,多镜头立体视觉模型的视差计算方法基于立体平行摄像系统的双目立体视觉视差计算方法。The invention proposes a multi-lens stereo vision imaging method and a calculation method of the parallax, and the multi-lens stereo vision model's parallax calculation method is based on the binocular stereo vision parallax calculation method of the stereo parallel camera system.
如图1所示,其中,P表示被拍摄物体,Cl和Cr表示摄像机镜头。设Cl和Cr分别为左右两个相机的光学中心位置,Cl和Cr之间的距离为b,两个相机的焦距为f。Pl和Pr称为空间点P在左右像平面上的对应投影点,P与Cl和Cr连线之间的距离为d。过Cl和Cr分别向视平面作垂线,垂足分别为Al和Ar,过P向视平面作垂线,令|AlPl|=la,|ArPr|=lb,|PrB|=a,则由相似三角形之间的关系得知如下公式:As shown in Figure 1, P represents the object to be photographed, and C l and Cr represent the camera lens. Let C l and Cr be the optical centers of the left and right cameras respectively, the distance between Cl and Cr is b, and the focal length of the two cameras is f. P l and P r are called the corresponding projection points of the space point P on the left and right image planes, and the distance between P and the line connecting C l and Cr is d. Draw a vertical line to the viewing plane through C l and C r respectively, the vertical feet are A l and A r respectively, and draw a vertical line to the viewing plane through P, let |A l P l |=l a , |A r P r | =l b , |P r B|=a, then the following formula can be obtained from the relationship between similar triangles:
(d-f)/d=a/(a+lb) 式1(df)/d=a/(a+l b ) Formula 1
(d-f)/d=(b-la+lb+a)/(a+lb+b) 式2(df)/d=(bl a +l b +a)/(a+l b +b) Formula 2
由式1和2推得如下公式3:From formulas 1 and 2, the following formula 3 can be deduced:
a/(a+lb)=(b-la+lb+a)/(a+lb+b)=1-la/(b+lb+a) 式3a/(a+l b )=(bl a +l b +a)/(a+l b +b)=1-l a /(b+l b +a) Formula 3
从而有如下公式4:So there is the following formula 4:
a=(b*la)/(la-lb)-lb 式4a=(b*l a )/(l a -l b )-l b formula 4
将公式4带入公式1中得到公式5:Substituting Equation 4 into Equation 1 yields Equation 5:
d=f*(a+lb)/lb=(b*f)/(la-lb) 式5d=f*(a+l b )/l b =(b*f)/(l a -l b ) Formula 5
由公式5可以看出,距离d与b、f和la-lb有关。la-lb称为点P在左右两个图像面上的视差,它表示了P点在左右图像中成像点的位置差异。由于b、f是已知的,因此要实现立体视差测距,最关键就是要求得视差la-lb。It can be seen from formula 5 that the distance d is related to b, f and l a -l b . l a -l b is called the parallax of point P on the left and right image planes, which represents the position difference of point P in the imaging points of the left and right images. Since b and f are known, the most critical thing to realize the stereoscopic parallax distance measurement is to obtain the parallax l a -l b .
现在已知双目平行摄像系统模型视差计算方式,本发明采取多边形顶点布放多镜头的方式来形成多镜头的立体视觉摄像,计算新的视差,以实现立体视差测距。Now known binocular parallel camera system model parallax calculation method, the present invention adopts polygon vertices to arrange multi-lens mode to form multi-lens stereo vision camera, calculate new parallax, to realize stereo parallax ranging.
多边形顶点布放的多镜头立体视觉摄像包括3镜头立体视觉摄像、4镜头立体视觉摄像、5镜头立体视觉摄像、6镜头立体视觉摄像、7镜头立体视觉摄像、8镜头立体视觉摄像、9镜头立体视觉摄像,以及更多镜头的立体视觉摄像。多镜头位于同一平面,以不同的顶点布放方式实现对物体精确的立体视差测距过程。本发明中以虚线圆形表示各镜头中心所位于的圆形平面。每种布放方式中的多镜头可按照相对距离不变的比例围绕圆心旋转;也可按照平面上一条直线为轴翻转来布放镜头。以两镜头间的虚线连接表示两镜头光学中心之间的距离。The multi-lens stereo vision camera with polygonal vertices layout includes 3-lens stereo vision camera, 4-lens stereo vision camera, 5-lens stereo vision camera, 6-lens stereo vision camera, 7-lens stereo vision camera, 8-lens stereo vision camera, 9-lens stereo vision camera Vision camera, and stereo vision camera with more lenses. Multiple lenses are located on the same plane, and different vertex layouts are used to achieve accurate stereoscopic parallax ranging for objects. In the present invention, the dotted circle represents the circular plane where the center of each lens is located. The multi-lens in each layout method can be rotated around the center of the circle at a constant ratio of relative distance; the lens can also be arranged by turning a straight line on the plane as the axis. The distance between the optical centers of the two lenses is indicated by the dotted line connection between the two lenses.
本发明的每种多镜头立体视觉摄像及其视差的计算方法由初始化步骤、获取所有双目视差测距步骤、获取多镜头视差测距步骤、结束步骤组成。其中在计算最终视差时采用了加权平均的方法,可以更好地消除测距误差。Each kind of multi-lens stereo vision imaging and its parallax calculation method of the present invention is composed of an initialization step, a step of obtaining all binocular parallax distance measurement steps, a step of obtaining multi-lens parallax distance measurement steps, and an end step. Among them, the weighted average method is adopted in the calculation of the final parallax, which can better eliminate the ranging error.
一、3镜头立体视觉摄像及其视差计算1. Three-lens stereo vision camera and its parallax calculation
1、初始化步骤1. Initialization steps
1.1 3镜头布放方式。3镜头的布放方式有4种,图2的镜头组成等边三角形,位于同一圆上;图3的镜头组成等腰三角形,位于同一圆上;图4的镜头组成任意三角形,位于同一圆上;图5的镜头在同一直线上等距布放。1.1 3 Lens arrangement. 3. There are four ways to arrange the lenses. The lenses in Figure 2 form an equilateral triangle and are located on the same circle; the lenses in Figure 3 form an isosceles triangle and are located on the same circle; the lenses in Figure 4 form an arbitrary triangle and are located on the same circle ; The lenses in Fig. 5 are arranged equidistantly on the same straight line.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在3镜头的4种布放示意图中,S1,S2,S3分别表示三个摄像机的光学中心位置,L13,L12,L23分别表示对应每对摄像机光学中心之间的距离,三个摄像机的焦距均为f。令同一平面上的三个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,三个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l1–l3,它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S1与S3所测距离为d13。In the four layout diagrams of the three lenses, S 1 , S 2 , and S 3 represent the optical center positions of the three cameras, respectively, and L 13 , L 12 , and L 23 represent the distance between the optical centers of each pair of cameras, respectively. All three cameras have a focal length f. Let every two cameras of the three cameras on the same plane capture the object P to obtain a two-dimensional image, according to the stereoscopic parallel camera system visual model and its calculation method, there is an object P between two of the three lenses on the two image planes The parallax on , respectively denoted as l 1 –l 2 , l 2 –l 3 , l 1 –l 3 , which represents the position difference of the imaging point of P in the image formed by each two cameras. d represents the distance between the object P and the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , and the distance measured by S 1 and S 3 is d 13 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2)d 12 =(L 12 *f)/(l 1 -l 2 )
d23=(L23*f)/(l2-l3)d 23 =(L 23 *f)/(l 2 -l 3 )
d13=(L13*f)/(l1-l3)d 13 =(L 13 *f)/(l 1 -l 3 )
3、获取多镜头视差测距步骤3. Obtain the steps of multi-lens parallax distance measurement
3.1对于图2而言,L12=L23=L13,则最终测距d为:3.1 For Figure 2, L 12 =L 23 =L 13 , then the final distance measurement d is:
d=(d12+d23+d13)/3d=(d 12 +d 23 +d 13 )/3
3.2对于图3而言,则最终测距d为:3.2 For Figure 3, Then the final ranging d is:
3.3对于图4而言,L23≠L12≠L13,则最终测距d为:3.3 For Figure 4, L 23 ≠L 12 ≠L 13 , then the final distance measurement d is:
d=(d12+d23+d13)/3d=(d 12 +d 23 +d 13 )/3
3.3对于图5而言,2L23=2L12=L13,则最终测距d为:3.3 For Figure 5, 2L 23 =2L 12 =L 13 , then the final distance measurement d is:
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
二、4镜头立体视觉摄像及其视差计算2. 4-lens stereo vision camera and its parallax calculation
1、初始化步骤1. Initialization steps
1.14镜头布放方式。4镜头的布放方式有6种。其中,图6的镜头组成正方形,位于同一圆上;图7的镜头组成长方形且L23=2L12,位于同一圆上;图8的3个镜头组成等边三角形,位于同一圆上,另一个镜头在圆心;图9的镜头在圆上任意布放;图10的3个镜头组成等边三角形,位于同一圆上,另一个镜头在等边三角形下边2个镜头连线的中间;图11的镜头在同一直线上等距布放。1.14 Lens placement method. 4 There are 6 ways to arrange the lens. Among them, the lenses in Figure 6 form a square, located on the same circle; the lenses in Figure 7 form a rectangle with L 23 =2L 12 , located on the same circle; the three lenses in Figure 8 form an equilateral triangle, located on the same circle, and the other The lenses are in the center of the circle; the lenses in Figure 9 are arranged arbitrarily on the circle; the three lenses in Figure 10 form an equilateral triangle, located on the same circle, and the other lens is in the middle of the line connecting the two lenses below the equilateral triangle; Figure 11 The lenses are arranged equidistantly on the same straight line.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在4镜头的6种布放示意图中,S1,S2,S3,S4分别表示四个摄像机的光学中心位置,L13,L12,L23,L14,L24,L34分别表示每对摄像头光学中心之间的距离,四个摄像机的焦距均为f。令同一平面上的四个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,四个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l1–l3,l1–l4,l2–l4,l3–l4,它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S1与S3所测距离为d13,S1与S4所测距离为d14,S2与S4所测距离为d24,S3与S4所测距离为d34。In the schematic diagram of 6 arrangements of 4 lenses, S 1 , S 2 , S 3 , and S 4 represent the optical center positions of the four cameras respectively, and L 13 , L 12 , L 23 , L 14 , L 24 , and L 34 respectively Indicates the distance between the optical centers of each pair of cameras, and the focal lengths of the four cameras are f. Let every two cameras of the four cameras on the same plane capture the object P to obtain a two-dimensional image. According to the stereoscopic parallel camera system visual model and its calculation method, there is an object P between the four lenses on the two image planes The parallax on , respectively recorded as l 1 –l 2 , l 2 –l 3 , l 1 –l 3 , l 1 –l 4 , l 2 –l 4 , l 3 –l 4 The position difference of the imaging point in the image formed by the two cameras. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 1 and S 3 is d 13 , and the distance measured by S 1 and S 3 is d 13 . The distance measured by 4 is d 14 , the distance measured by S 2 and S 4 is d 24 , and the distance measured by S 3 and S 4 is d 34 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d13=(L13*f)/(l1-l3)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 13 =(L 13 *f)/(l 1 - l 3 )
d14=(L14*f)/(l1-l4);d24=(L24*f)/(l2-l4);d34=(L34*f)/(l3-l4)3、获取多镜头视差测距步骤d 14 =(L 14 *f)/(l 1 -l 4 ); d 24 =(L 24 *f)/(l 2 -l 4 ); d 34 =(L 34 *f)/(l 3 - l 4 ) 3. Steps to obtain multi-lens parallax distance measurement
3.1对于图6而言,L12=L23=L34=L14,则最终测距d为:3.1 For Figure 6, L 12 =L 23 =L 34 =L 14 , then the final distance measurement d is:
3.2对于图7而言,则最终测距d为:3.2 For Figure 7, Then the final ranging d is:
3.3对于图8而言,L23=L12=L13,则最终测距d为:3.3 For Figure 8, L 23 =L 12 =L 13 , then the final distance measurement d is:
3.4对于图9而言,镜头两两之间距离不同,则最终测距d为:3.4 For Figure 9, the distance between the lenses is different, then the final distance measurement d is:
d=(d12+d23+d13+d14+d24+d34)/6d=(d 12 +d 23 +d 13 +d 14 +d 24 +d 34 )/6
3.5对于图10或者图11而言,先求出各对镜头间距离之和:L=L13+L12+L23+L14+L24+L34,则最终测距d为加权平均求和:3.5 For Figure 10 or Figure 11, first calculate the sum of the distances between each pair of lenses: L=L 13 +L 12 +L 23 +L 14 +L 24 +L 34 , then the final distance measurement d is the weighted average and:
其中i从1到3,j从2到4,且i大于j。Where i is from 1 to 3, j is from 2 to 4, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
三、5镜头立体视觉摄像及其视差计算3. 5-lens stereo vision camera and its parallax calculation
1、初始化步骤1. Initialization steps
1.15镜头布放方式。5镜头的布放方式有7种。其中,图12的4个镜头组成正方形,位于同一圆上,另一个镜头在圆外并与正方形一边的2个镜头组成等腰三角形;图13的4个镜头组成正方形,位于同一圆上,另一个镜头布放在圆心;图14的5个镜头组成正五边形;图15的5个镜头在同一直线上等距布放;图16的4个镜头组成正方形,位于同一圆上,另一个镜头在正方形下边2个镜头连线的中间;图17的4个镜头组成长方形,另一个镜头在长方形下边2个镜头连线的中间;图18的镜头分2排布放,相邻的镜头均组成等边三角形。1.15 Lens placement method. 5 There are 7 ways to arrange the lens. Among them, the 4 lenses in Figure 12 form a square and are located on the same circle, and the other lens is outside the circle and forms an isosceles triangle with the 2 lenses on one side of the square; the 4 lenses in Figure 13 form a square and are located on the same circle. One lens is arranged in the center of the circle; the 5 lenses in Figure 14 form a regular pentagon; the 5 lenses in Figure 15 are arranged equidistantly on the same straight line; the 4 lenses in Figure 16 form a square, located on the same circle, and the other The lens is in the middle of the line connecting the two lenses below the square; the four lenses in Figure 17 form a rectangle, and the other lens is in the middle of the line connecting the two lenses below the rectangle; the lenses in Figure 18 are arranged in two rows, and the adjacent lenses are all form an equilateral triangle.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在5镜头的7种布放示意图中,S1,S2,S3,S4,S5分别表示五个摄像机的光学中心位置,L12,L23,L34,L45,L15,L13,L14,L24,L25,L35分别表示每对摄像机光学中心之间的距离,五个摄像机的焦距均为f。令同一平面上的五个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,五个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l1–l5,l1–l3,l1–l4,l2–l4,l2–l5,l3–l5它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S1与S5所测距离为d15,S1与S3所测距离为d13,S1与S4所测距离为d14,S2与S4所测距离为d24,S2与S5所测距离为d25,S3与S5所测距离为d35。In the schematic diagram of 7 layouts of 5 lenses, S 1 , S 2 , S 3 , S 4 , S 5 represent the optical center positions of the five cameras respectively, L 12 , L 23 , L 34 , L 45 , L 15 , L 13 , L 14 , L 24 , L 25 , and L 35 respectively represent the distance between the optical centers of each pair of cameras, and the focal lengths of the five cameras are all f. Let every two of the five cameras on the same plane capture the object P to obtain a two-dimensional image. According to the stereoscopic parallel camera system visual model and its calculation method, there is an object P on the two image planes between the five lenses. The parallax on is denoted as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 1 –l 5 , l 1 –l 3 , l 1 –l 4 , l 2 –l 4 , l 2 –l 5 , l 3 –l 5 It represents the position difference of the imaging point of P in the image formed by every two cameras. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 3 and S 4 is d 34 , and the distance measured by S 4 and S The distance measured by 5 is d 45 , the distance measured by S 1 and S 5 is d 15 , the distance measured by S 1 and S 3 is d 13 , the distance measured by S 1 and S 4 is d 14 , and the distance measured by S 2 and S 4 is d 15 . The measured distance is d 24 , the measured distance between S 2 and S 5 is d 25 , and the measured distance between S 3 and S 5 is d 35 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-L4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - L 4 )
d45=(L45*f)/(l4-l5);d15=(L15*f)/(l1-l5);d13=(L13*f)/(l1-l3)d 45 =(L 45 *f)/(l 4 -l 5 ); d 15 =(L 15 *f)/(l 1 -l 5 ); d 13 =(L 13 *f)/(l 1 - l 3 )
d14=(LL14*f)/(l1-l4);d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5)d 14 =(LL 14 *f)/(l 1 -l 4 ); d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 - l 5 )
d35=(L35*f)/(l3-l5)d 35 =(L 35 *f)/(l 3 -l 5 )
3、获取多镜头视差测距步骤3. Obtain the steps of multi-lens parallax distance measurement
3.1对于图12而言,L12=L23=L34=L14,则最终测距d为:3.1 For Fig. 12, L 12 =L 23 =L 34 =L 14 , Then the final ranging d is:
3.2对于图13而言,L12=L34=L14=L23,则最终测距d为:3.2 For Figure 13, L 12 =L 34 =L 14 =L 23 , then the final distance measurement d is:
3.3对于图14而言,L12=L23=L34=L45=L15,则最终测距d为:3.3 For Figure 14, L 12 =L 23 =L 34 =L 45 =L 15 , then the final distance measurement d is:
其中,a表示d13、d14、d24、d25、d35的双目测距结果在所有两镜头双目测距结果总和的比例,取0.6到2.4之间的任一数值(一般而言,取值大于等于1),可取增量步长为0.1。Among them, a represents the ratio of the binocular ranging results of d 13 , d 14 , d 24 , d 25 , and d 35 to the sum of the binocular ranging results of all two lenses, and takes any value between 0.6 and 2.4 (generally In other words, the value is greater than or equal to 1), and the incremental step size is 0.1.
3.4对图15、图16、图17、图18分别而言,先求出各对镜头间距离之和:L=L12+L23+L34+L45+L15+L13+L14+L24+L25+L35,则最终测距d为加权平均求和:3.4 For Figure 15, Figure 16, Figure 17, and Figure 18 respectively, first calculate the sum of the distances between each pair of lenses: L=L 12 +L 23 +L 34 +L 45 +L 15 +L 13 +L 14 +L 24 +L 25 +L 35 , then the final distance d is the weighted average sum:
其中i从1到4,j从2到5,且i大于j。Where i is from 1 to 4, j is from 2 to 5, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
四、6镜头立体视觉摄像及其视差计算4. 6-lens stereo vision camera and its parallax calculation
1、初始化步骤1. Initialization steps
1.1 6镜头布放方式。6镜头的布放方式有9种。其中,图19的4个镜头组成正方形,位于同一圆上,另2个镜头在圆外并分别与正方形两边相邻的2个镜头及圆心各组成2个正方形;图20的4个镜头组成正方形,位于同一圆上,一个镜头布放在圆心,另一个镜头在圆外并与其下面的正方形一边的2个镜头组成等腰三角形;图21的5个镜头组成正五边形,位于同一圆上,一个镜头布放在圆心;图22的镜头组成等边六边形,位于同一圆上;图23的镜头在同一直线上等距布放;图24的4个镜头组成正方形,位于同一圆上,另2个镜头各在正方形上下边2个镜头连线的中间;图25的相邻4个镜头组成长方形;图26的3镜头组成一个外边大等边三角形,另3个布放在大等边三角形每条边的中间,组成倒立的小等边三角形;图27的镜头分2排布放,相邻的镜头均组成等边三角形。1.1 6 Lens arrangement. 6 There are 9 ways to arrange the lens. Among them, the 4 lenses in Figure 19 form a square, located on the same circle, and the other 2 lenses are outside the circle and respectively form 2 squares with the 2 adjacent lenses on both sides of the square and the center of the circle; the 4 lenses in Figure 20 form a square , located on the same circle, one lens is placed in the center of the circle, the other lens is outside the circle and forms an isosceles triangle with the two lenses on one side of the square below; the five lenses in Figure 21 form a regular pentagon and are located on the same circle , one lens is arranged in the center of the circle; the lenses in Figure 22 form an equilateral hexagon and are located on the same circle; the lenses in Figure 23 are arranged equidistantly on the same straight line; the four lenses in Figure 24 form a square and are located on the same circle , and the other 2 lenses are in the middle of the line connecting the 2 lenses on the upper and lower sides of the square; the 4 adjacent lenses in Figure 25 form a rectangle; the 3 lenses in Figure 26 form a large equilateral triangle outside, and the other 3 are arranged in a large equilateral triangle. The middle of each side of the side triangle forms an upside-down small equilateral triangle; the lenses in Figure 27 are arranged in two rows, and adjacent lenses form an equilateral triangle.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在6镜头的布放示意图中,S1,S2,S3,S4,S5,S6分别表示六个摄像机的光学中心位置,L12,L23,L34,L45,L56,L16,L13,L14,L15,L24,L25,L26,L35,L36,L46分别表示六个摄像机光学中心之间的距离,六个摄像机的焦距均为f。令同一平面上的六个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,六个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l1–l6,l1–l3,l1–l4,l1–l5,l2–l4,l2–l5,l2–l6,l3–l5,l3–l6,l4–l6它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S1与S6所测距离为d16,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S3与S5所测距离为d35,S3与S6所测距离为d36,S4与S6所测距离为d46。In the layout schematic diagram of 6 lenses, S 1 , S 2 , S 3 , S 4 , S 5 , and S 6 represent the optical center positions of the six cameras respectively, and L 12 , L 23 , L 34 , L 45 , and L 56 , L 16 , L 13 , L 14 , L 15 , L 24 , L 25 , L 26 , L 35 , L 36 , L 46 represent the distances between the optical centers of the six cameras respectively, and the focal lengths of the six cameras are all f . Let every two cameras of the six cameras on the same plane capture the object P to obtain a two-dimensional image. According to the stereoscopic parallel camera system visual model and its calculation method, there is an object P on the two image planes between the six lenses. The parallax on is denoted as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 1 –l 6 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 2 –l 4 , l 2 –l 5 , l 2 –l 6 , l 3 –l 5 , l 3 –l 6 , l 4 –l 6 The positional difference of the imaging point in the image formed by each two cameras. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 3 and S 4 is d 34 , and the distance measured by S 4 and S The distance measured by 5 is d 45 , the distance measured by S 5 and S 6 is d 56 , the distance measured by S 1 and S 6 is d 16 , the distance measured by S 1 and S 3 is d 13 , and the distance measured by S 1 and S 4 is d 16 . The measured distance is d 14 , the measured distance between S 1 and S 5 is d 15 , the measured distance between S 2 and S 4 is d 24 , the measured distance between S 2 and S 5 is d 25 , and the measured distance between S 2 and S 6 d 26 , the measured distance between S 3 and S 5 is d 35 , the measured distance between S 3 and S 6 is d 36 , and the measured distance between S 4 and S 6 is d 46 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d16=(L16*f)/(l1-l6)d 45 =(L 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 16 =(L 16 *f)/(l 1 - l 6 )
d13=(L13*f)/(l1-l3);d14=(L14*f)/(l1-l4);d15=(L15*f)/(l1-l5)d 13 =(L 13 *f)/(l 1 -l 3 ); d 14 =(L 14 *f)/(l 1 -l 4 ); d 15 =(L 15 *f)/(l 1 - l 5 )
d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5);d26=(L26*f)/(l2-l6)d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 -l 5 ); d 26 =(L 26 *f)/(l 2 - l 6 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d46=(L46*f)/(l4-l6)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 46 =(L 46 *f)/(l 4 - l 6 )
3、获取多镜头视差测距步骤3. Obtain the steps of multi-lens parallax distance measurement
根据6镜头各个示意图的不同布放方式,先求出各对镜头间距离之和:L=L12+L23+L34+L45+L56+L16+L13+L14+L15+L24+L25+L26+L35+L36+L46,则最终测距d为加权平均求和:According to the different layout methods of each schematic diagram of the 6 lenses, first calculate the sum of the distances between each pair of lenses: L=L 12 +L 23 +L 34 +L 45 +L 56 +L 16 +L 13 +L 14 +L 15 +L 24 +L 25 +L 26 +L 35 +L 36 +L 46 , then the final distance d is the weighted average sum:
其中i从1到5,j从2到6,且i大于j。Where i is from 1 to 5, j is from 2 to 6, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
五、7镜头立体视觉摄像及其视差计算5. 7-lens stereo vision camera and its parallax calculation
1、初始化步骤1. Initialization steps
1.17镜头布放方式。7镜头的顶点布放方式有10种。其中,图28的4个镜头组成正方形,位于同一圆上,另3个镜头在圆外并与其相邻正方形边上的2个镜头及圆心各组成3个正方形;图29的4个镜头组成正方形,位于同一圆上,一个镜头布放在圆心,另2个在圆外并与其相邻正方形边上的2个镜头及圆心各组成2个正方形;图30的4个镜头组成正方形,位于同一圆上,一个镜头布放在圆心,另2个在圆外并与其相邻正方形边上的2个镜头各组成2个等腰三角形;图31的6个镜头组成等边六边形,位于同一圆上,一个镜头布放在圆心;图32的镜头组成等边七边形,位于同一圆上;图33的镜头在同一直线上等距布放;图34的4个镜头组成正方形,位于同一圆上,另2个镜头各在正方形上下边2个镜头连线的中间,1个镜头在右边且与其相邻的2个镜头组成等边或等腰三角形;图35的6个镜头组成同图34,另一个镜头在上边且与左上角和右上角的2个镜头组成等边或等腰三角形;图36的镜头分3排布放且相邻的镜头均组成等边三角形;图37的镜头分2排布放且相邻的镜头均组成等边三角形。1.17 Lens placement method. 7 There are 10 ways to arrange the vertices of the lens. Among them, the 4 lenses in Figure 28 form a square and are located on the same circle, and the other 3 lenses are outside the circle and form 3 squares with the 2 lenses on the side of the adjacent square and the center of the circle; the 4 lenses in Figure 29 form a square , located on the same circle, one lens is arranged in the center of the circle, and the other two are outside the circle and form two squares with the two lenses on the side of the adjacent square and the center of the circle; the four lenses in Figure 30 form a square and are located in the same circle , one lens is arranged in the center of the circle, and the other 2 lenses are outside the circle and form 2 isosceles triangles with the 2 lenses on the side of the adjacent square; the 6 lenses in Figure 31 form an equilateral hexagon, located in the same circle , one lens is arranged in the center of the circle; the lenses in Figure 32 form an equilateral heptagon and are located on the same circle; the lenses in Figure 33 are arranged equidistantly on the same straight line; the four lenses in Figure 34 form a square and are located on the same circle On the top, the other two lenses are in the middle of the line connecting the two lenses on the upper and lower sides of the square, and one lens is on the right and its adjacent two lenses form an equilateral or isosceles triangle; the composition of the six lenses in Figure 35 is the same as that in Figure 34 , the other lens is on the top and forms an equilateral or isosceles triangle with the two lenses in the upper left and upper right corners; the lenses in Figure 36 are arranged in three rows and the adjacent lenses form an equilateral triangle; the lenses in Figure 37 are divided into Adjacent lenses arranged in 2 rows form an equilateral triangle.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在7镜头的布放示意图中,S1,S2,S3,S4,S5,S6,S7分别表示七个摄像机的光学中心位置,L12,L23,L34,L45,L56,L67,L17,L13,L14,L15,L16,L24,L25,L26,L27,L35,L36,L37,L46,L47,L57分别表示每对摄像机光学中心之间的距离,七个摄像机的焦距均为f。令同一平面上的七个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,七个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l6–l7,l1–l7,l1–l3,l1–l4,l1–l5,l1–l6,l2–l4,l2–l5,l2–l6,l2–l7,l3–l5,l3–l6,l3–l7,l4–l6,l4–l7,l5–l7,它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S6与S7所测距离为d67,S1与S7所测距离为d17,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S1与S6所测距离为d16,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S2与S7所测距离为d27,S3与S5所测距离为d35,S3与S6所测距离为d36,S3与S7所测距离为d37,S4与S6所测距离为d46,S4与S7所测距离为d47,S5与S7所测距离为d57。In the layout schematic diagram of 7 lenses, S 1 , S 2 , S 3 , S 4 , S 5 , S 6 , and S 7 represent the optical centers of the seven cameras respectively, and L 12 , L 23 , L 34 , and L 45 , L 56 , L 67 , L 17 , L 13 , L 14 , L 15 , L 16 , L 24 , L 25 , L 26 , L 27 , L 35 , L 36 , L 37 , L 46 , L 47 , L 57 represent the distance between the optical centers of each pair of cameras respectively, and the focal lengths of the seven cameras are all f. Let every two cameras of the seven cameras on the same plane capture the object P to obtain a two-dimensional image, according to the visual model of the stereo parallel camera system and its calculation method, there is an object P between two of the seven lenses on the two image planes The parallax on is denoted as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 6 –l 7 , l 1 –l 7 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 1 –l 6 , l 2 –l 4 , l 2 –l 5 , l 2 –l 6 , l 2 –l 7 , l 3 – l 5 , l 3 –l 6 , l 3 –l 7 , l 4 –l 6 , l 4 –l 7 , l 5 –l 7 , which represent the position of the imaging point of P in the image formed by each two cameras difference. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 3 and S 4 is d 34 , and the distance measured by S 4 and S The distance measured by 5 is d 45 , the distance measured by S 5 and S 6 is d 56 , the distance measured by S 6 and S 7 is d 67 , the distance measured by S 1 and S 7 is d 17 , and the distance measured by S 1 and S 3 is d 56 . The measured distance is d 13 , the measured distance between S 1 and S 4 is d 14 , the measured distance between S 1 and S 5 is d 15 , the measured distance between S 1 and S 6 is d 16 , and the measured distance between S 2 and S 4 is d 24 , the distance measured between S 2 and S 5 is d 25 , the distance measured between S 2 and S 6 is d 26 , the distance measured between S 2 and S 7 is d 27 , and the distance measured between S 3 and S 5 is d 35 , the measured distance between S 3 and S 6 is d 36 , the measured distance between S 3 and S 7 is d 37 , the measured distance between S 4 and S 6 is d 46 , the measured distance between S 4 and S 7 is d 47 , The measured distance between S 5 and S 7 is d 57 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(l45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d67=(L67*f)/(l6-l7)d 45 =(l 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 67 =(L 67 *f)/(l 6 - l 7 )
d17=(L17*f)/(l1-l7);d13=(L13*f)/(l1-l3);d14=(L14*f)/(l1-l4)d 17 =(L 17 *f)/(l 1 -l 7 ); d 13 =(L 13 *f)/(l 1 -l 3 ); d 14 =(L 14 *f)/(l 1 - l 4 )
d15=(L15*f)/(l1-l5);d16=(L16*/)/(l1-l6);d24=(L24*f)/(l2-l4)d 15 =(L 15 *f)/(l 1 -l 5 ); d 16 =(L 16 */)/(l 1 -l 6 ); d 24 =(L 24 *f)/(l 2 - l 4 )
d25=(L25*f)/(l2-l5);d26=(L26*f)/(l2-l6);d27=(L27*f)/(l2-l7)d 25 =(L 25 *f)/(l 2 -l 5 ); d 26 =(L 26 *f)/(l 2 -l 6 ); d 27 =(L 27 *f)/(l 2 - l 7 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d37=(L37*f)/(l3-l7)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 37 =(L 37 *f)/(l 3 - l 7 )
d46=(L46*f)/(l4-l6);d47=(L47*f)/(l4-l7);d57=(L57*f)/(l5-l7)d 46 =(L 46 *f)/(l 4 -l 6 ); d 47 =(L 47 *f)/(l 4 -l 7 ); d 57 =(L 57 *f)/(l 5 - l 7 )
3、获取多镜头视差测距步骤3. Obtain the steps of multi-lens parallax distance measurement
根据7镜头各个示意图的不同布放方式,先求出各对镜头间距离之和:L=L12+L23+L34+L45+L56+L67+L17+L13+L14+L15+L16+L24+L25+L26+L27+L35+L36+L37+L46+L47+L57,则最终测距d为加权平均求和:According to the different layout methods of each schematic diagram of the 7 lenses, first calculate the sum of the distances between each pair of lenses: L=L 12 +L 23 +L 34 +L 45 +L 56 +L 67 +L 17 +L 13 +L 14 +L 15 +L 16 +L 24 +L 25 +L 26 +L 27 +L 35 +L 36 +L 37 +L 46 +L 47 +L 57 , then the final distance d is the weighted average sum:
其中i从1到6,j从2到7,且i大于j。Where i is from 1 to 6, j is from 2 to 7, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
六、8镜头立体视觉摄像及其视差计算6. 8-lens stereo vision camera and its parallax calculation
1、初始化步骤1. Initialization steps
1.1 8镜头布放方式。8镜头的布放方式有9种。其中,图38的7个镜头布放方式同7镜头-1,另一个镜头在最左边对称布放;图39的7个镜头布放方式同7镜头-1,另一个镜头布放在圆心;图40的7个镜头组成等边七边形,位于同一圆上,另一个镜头布放在圆心;图41的镜头组成等边八边形,位于同一圆上;图42的镜头在同一直线上等距布放;图43的镜头分2排布放且相邻的镜头均组成等边三角形;图44的镜头分2排布放且相邻的镜头均组成正方形;图45的镜头分3排布放且相邻的镜头均组成正方形;图46的镜头分3排布放且相邻的镜头均组成等边三角形。1.1 8-lens arrangement. 8. There are 9 ways to arrange the lens. Among them, the layout of the 7 lenses in Figure 38 is the same as that of 7-lens-1, and the other lens is arranged symmetrically on the far left; the layout of the 7 lenses in Figure 39 is the same as that of 7-lens-1, and the other lens is placed in the center of the circle; The 7 lenses in Figure 40 form an equilateral heptagon and are located on the same circle, and the other lens is placed in the center of the circle; the lenses in Figure 41 form an equilateral octagon and are located on the same circle; the lenses in Figure 42 are on the same straight line Arrange equidistantly; the lenses in Figure 43 are arranged in 2 rows and the adjacent lenses form an equilateral triangle; the lenses in Figure 44 are arranged in 2 rows and the adjacent lenses form a square; the lenses in Figure 45 are arranged in 3 rows Arranged and adjacent lenses form a square; the lenses in Figure 46 are arranged in 3 rows and adjacent lenses form an equilateral triangle.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在8镜头的布放示意图中,S1,S2,S3,S4,S5,S6,S7,S8分别表示八个摄像机的光学中心位置,用Lij分别表示每对摄像机光学中心之间的距离(其中i从1到7,j从2到8,且i大于j),八个摄像机的焦距均为f。令同一平面上的八个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,八个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l6–l7,l7–l8,l1–l8,l1–l3,l1–l4,l1–l5,l1–l6,l1–l7,l2–l4,l2–l5,l2–l6,l2–l7,l2–l8,l3–l5,l3–l6,l3–l7,l3–l8,l4–l6,l4–l7,l4–l8,l5–l7,l5–l8,l6–l8,它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S6与S7所测距离为d67,S7与S8所测距离为d78,S1与S8所测距离为d18,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S1与S6所测距离为d16,S1与S7所测距离为d17,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S2与S7所测距离为d27,S2与S8所测距离为d28,S3与S5所测距离为d35,S3与S6所测距离为d36,S3与S7所测距离为d37,S3与S8所测距离为d38,S4与S6所测距离为d46,S4与S7所测距离为d47,S4与S8所测距离为d48,S5与S7所测距离为d57,S5与S8所测距离为d58,S6与S8所测距离为d68。In the layout diagram of 8 lenses, S 1 , S 2 , S 3 , S 4 , S 5 , S 6 , S 7 , and S 8 represent the optical center positions of the eight cameras respectively, and Lij represents the optical center position of each pair of cameras respectively. The distance between centers (where i ranges from 1 to 7, j ranges from 2 to 8, and i is greater than j), the focal lengths of the eight cameras are all f. Let every two cameras of the eight cameras on the same plane shoot the object P to obtain a two-dimensional image, according to the stereoscopic parallel camera system visual model and its calculation method, there is an object P between the eight lenses in two image planes The parallax on , denoted as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 6 –l 7 , l 7 –l 8 , l 1 –l 8 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 1 –l 6 , l 1 –l 7 , l 2 –l 4 , l 2 –l 5 , l 2 – l 6 , l 2 –l 7 , l 2 –l 8 , l 3 –l 5 , l 3 –l 6 , l 3 –l 7 , l 3 –l 8 , l 4 –l 6 , l 4 –l 7 , l 4 –l 8 , l 5 –l 7 , l 5 –l 8 , l 6 –l 8 , which represent the position difference of the imaging point of P in the image formed by each two cameras. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 3 and S 4 is d 34 , and the distance measured by S 4 and S The distance measured by 5 is d 45 , the distance measured by S 5 and S 6 is d 56 , the distance measured by S 6 and S 7 is d 67 , the distance measured by S 7 and S 8 is d 78 , and the distance measured by S 1 and S 8 is d 56 . The measured distance is d 18 , the measured distance between S 1 and S 3 is d 13 , the measured distance between S 1 and S 4 is d 14 , the measured distance between S 1 and S 5 is d 15 , and the measured distance between S 1 and S 6 is d 16 , the distance measured between S 1 and S 7 is d 17 , the distance measured between S 2 and S 4 is d 24 , the distance measured between S 2 and S 5 is d 25 , and the distance measured between S 2 and S 6 is d 26 , the measured distance between S 2 and S 7 is d 27 , the measured distance between S 2 and S 8 is d 28 , the measured distance between S 3 and S 5 is d 35 , the measured distance between S 3 and S 6 is d 36 , The measured distance between S 3 and S 7 is d 37 , the measured distance between S 3 and S 8 is d 38 , the measured distance between S 4 and S 6 is d 46 , the measured distance between S 4 and S 7 is d 47 , and S 4 The measured distance to S 8 is d 48 , the measured distance to S 5 and S 7 is d 57 , the measured distance to S 5 and S 8 is d 58 , and the measured distance to S 6 and S 8 is d 68 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d67=(L67*f)/(l6-l7)d 45 =(L 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 67 =(L 67 *f)/(l 6 - l 7 )
d78=(L78*f)/(l7-l8);d18=(L18*f)/(l1-l8);d13=(L13*f)/(l1-l3)d 78 =(L 78 *f)/(l 7 -l 8 ); d 18 =(L 18 *f)/(l 1 -l 8 ); d 13 =(L 13 *f)/(l 1 - l 3 )
d14=(L14*f)/(l1-l4);d15=(L15*f)/(l1-l5);d16=(L16*f)/(l1-l6)d 14 =(L 14 *f)/(l 1 -l 4 ); d 15 =(L 15 *f)/(l 1 -l 5 ); d 16 =(L 16 *f)/(l 1 - l 6 )
d17=(L17*f)/(l1-l7);d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5)d 17 =(L 17 *f)/(l 1 -l 7 ); d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 - l 5 )
d26=(L26*f)/(l2-l6);d27=(L27*f)/(l2-l7);d28=(L28*f)/(l2-l8)d 26 =(L 26 *f)/(l 2 -l 6 ); d 27 =(L 27 *f)/(l 2 -l 7 ); d 28 =(L 28 *f)/(l 2 - l 8 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d37=(L37*f)/(l3-l7)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 37 =(L 37 *f)/(l 3 - l 7 )
d38=(L38*f)/(l3-l8);d46=(L46*f)/(l4-l6);d47=(L47*f)/(l4-l7)d 38 =(L 38 *f)/(l 3 -l 8 ); d 46 =(L 46 *f)/(l 4 -l 6 ); d 47 =(L 47 *f)/(l 4 - l 7 )
d48=(L48*f)/(l4-l8);d57=(L57*f)/(l5-l7);d58=(L58*f)/(l5-l8)d 48 =(L 48 *f)/(l 4 -l 8 ); d 57 =(L 57 *f)/(l 5 -l 7 ); d 58 =(L 58 *f)/(l 5 - l 8 )
d68=(L68*f)/(l6-l8)d 68 =(L 68 *f)/(l 6 -l 8 )
3、获取多镜头视差测距步骤3. Obtain the steps of multi-lens parallax distance measurement
根据8镜头各个示意图的不同布放方式,先求出各对镜头间距离之和:L=∑Lij,则最终测距d为加权平均求和:According to the different layout methods of the schematic diagrams of the 8 lenses, first calculate the sum of the distances between each pair of lenses: L=∑Lij, then the final distance measurement d is the weighted average sum:
其中i从1到7,j从2到8,且i大于j。Where i is from 1 to 7, j is from 2 to 8, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
七、9镜头立体视觉摄像及其视差计算7. 9-lens stereo vision camera and its parallax calculation
1、初始化步骤1. Initialization steps
1.19镜头布放方式。9镜头的布放方式有7种。其中,图47的8个镜头布放方式同8镜头-1,另一个镜头布放在圆心;图48的8个镜头组成等边八边形,一个镜头布放在圆心;图49的镜头分3排等间距布放,相邻的镜头均组成正方形;图50的8个镜头分2排等间距布放,均组成正方形,另一个镜头在右边且与其相邻的2个镜头组成等边或等腰三角形;图51的镜头分3排布放且相邻的镜头均组成等边三角形;图52的镜头分2排布放且相邻的镜头均组成等边三角形;图53的镜头在同一直线上等距布放。1.19 Lens placement method. 9 There are 7 ways to arrange the lens. Among them, the 8 lenses in Figure 47 are arranged in the same way as 8 lenses-1, and the other lens is placed in the center of the circle; the 8 lenses in Figure 48 form an equilateral octagon, and one lens is placed in the center of the circle; the lens in Figure 49 is divided into 3 rows are arranged at equal intervals, and the adjacent lenses all form a square; the 8 lenses in Figure 50 are arranged in 2 rows at equal intervals, all forming a square, and the other lens is on the right and its adjacent 2 lenses form an equilateral or Isosceles triangle; the lenses in Figure 51 are arranged in 3 rows and the adjacent lenses form an equilateral triangle; the lenses in Figure 52 are arranged in 2 rows and the adjacent lenses form an equilateral triangle; the lenses in Figure 53 are arranged in the same Arranged equidistantly on a straight line.
1.2初始化所有参数变量1.2 Initialize all parameter variables
在9镜头的7种布放示意图中,S1,S2,S3,S4,S5,S6,S7,S8,S9分别表示九个摄像机的光学中心位置,用Lij分别表示每对摄像机光学中心之间的距离(其中i从1到8,j从2到9,且i大于j),九个摄像机的焦距均为f。令同一平面上的九个摄像机中的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,九个镜头两两之间存在物体P在两个图像面上的视差,分别记作l1–l2,l2–l3,l3–l4,l4–l5,l5–l6,l6–l7,l7–l8,l8–l9,l1–l9,l1–l3,l1–l4,l1–l5,l1–l6,l1–l7,l1–l8,l2–l4,l2–l5,l2–l6,l2–l7,l2–l8,l2–l9,l3–l5,l3–l6,l3–l7,l3–l8,l3–l9,l4–l6,l4–l7,l4–l8,l4–l9,l5–l7,l5–l8,l5–l9,l6–l8,l6–l9,l7–l9它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则S1与S2所测距离为d12,S2与S3所测距离为d23,S3与S4所测距离为d34,S4与S5所测距离为d45,S5与S6所测距离为d56,S6与S7所测距离为d67,S7与S8所测距离为d78,S8与S9所测距离为d89,S1与S9所测距离为d19,S1与S3所测距离为d13,S1与S4所测距离为d14,S1与S5所测距离为d15,S1与S6所测距离为d16,S1与S7所测距离为d17,S1与S8所测距离为d18,S2与S4所测距离为d24,S2与S5所测距离为d25,S2与S6所测距离为d26,S2与S7所测距离为d27,S2与S8所测距离为d28,S2与S9所测距离为d29,S3与S5所测距离为d35,S3与S6所测距离为d36,S3与S7所测距离为d37,S3与S8所测距离为d38,S3与S9所测距离为d39,S4与S6所测距离为d46,S4与S7所测距离为d47,S4与S8所测距离为d48,S4与S9所测距离为d49,S5与S7所测距离为d57,S5与S8所测距离为d58,S5与S9所测距离为d59,S6与S8所测距离为d68,S6与S9所测距离为d69,S7与S9所测距离为d79。In the seven layout schematic diagrams of nine lenses, S 1 , S 2 , S 3 , S 4 , S 5 , S 6 , S 7 , S 8 , and S 9 represent the optical center positions of the nine cameras respectively, and use Lij respectively Indicates the distance between the optical centers of each pair of cameras (where i ranges from 1 to 8, j ranges from 2 to 9, and i is greater than j), and the focal lengths of the nine cameras are all f. Let every two cameras of the nine cameras on the same plane capture the object P to obtain a two-dimensional image, according to the visual model of the stereo parallel camera system and its calculation method, there is an object P between the nine lenses in two image planes The parallax on , denoted as l 1 –l 2 , l 2 –l 3 , l 3 –l 4 , l 4 –l 5 , l 5 –l 6 , l 6 –l 7 , l 7 –l 8 , l 8 –l 9 , l 1 –l 9 , l 1 –l 3 , l 1 –l 4 , l 1 –l 5 , l 1 –l 6 , l 1 –l 7 , l 1 –l 8 , l 2 – l 4 , l 2 –l 5 , l 2 –l 6 , l 2 –l 7 , l 2 –l 8 , l 2 –l 9 , l 3 –l 5 , l 3 –l 6 , l 3 –l 7 , l 3 –l 8 , l 3 –l 9 , l 4 –l 6 , l 4 –l 7 , l 4 –l 8 , l 4 –l 9 , l 5 –l 7 , l 5 –l 8 , l 5 –l 9 , l 6 –l 8 , l 6 –l 9 , l 7 –l 9 It represents the position difference of the imaging point of P in the image formed by each two cameras. d represents the distance of the object P from the plane, then the distance measured by S 1 and S 2 is d 12 , the distance measured by S 2 and S 3 is d 23 , the distance measured by S 3 and S 4 is d 34 , and the distance measured by S 4 and S The distance measured by 5 is d 45 , the distance measured by S 5 and S 6 is d 56 , the distance measured by S 6 and S 7 is d 67 , the distance measured by S 7 and S 8 is d 78 , and the distance measured by S 8 and S 9 is d 56 . The measured distance is d 89 , the measured distance between S 1 and S 9 is d 19 , the measured distance between S 1 and S 3 is d 13 , the measured distance between S 1 and S 4 is d 14 , and the measured distance between S 1 and S 5 d 15 , the distance measured between S 1 and S 6 is d 16 , the distance measured between S 1 and S 7 is d 17 , the distance measured between S 1 and S 8 is d 18 , the distance measured between S 2 and S 4 is d 24 , the measured distance between S 2 and S 5 is d 25 , the measured distance between S 2 and S 6 is d 26 , the measured distance between S 2 and S 7 is d 27 , the measured distance between S 2 and S 8 is d 28 , The measured distance between S 2 and S 9 is d 29 , the measured distance between S 3 and S 5 is d 35 , the measured distance between S 3 and S 6 is d 36 , the measured distance between S 3 and S 7 is d 37 , and S 3 The measured distance from S 8 is d 38 , the measured distance from S 3 and S 9 is d 39 , the measured distance from S 4 and S 6 is d 46 , the measured distance from S 4 and S 7 is d 47 , and the measured distance between S 4 and S The distance measured by 8 is d 48 , the distance measured by S 4 and S 9 is d 49 , the distance measured by S 5 and S 7 is d 57 , the distance measured by S 5 and S 8 is d 58 , and the distance measured by S 5 and S 9 is d 58 . The measured distance is d 59 , the measured distance between S 6 and S 8 is d 68 , the measured distance between S 6 and S 9 is d 69 , and the measured distance between S 7 and S 9 is d 79 .
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头的双目视差测距计算结果分别为:The binocular parallax ranging calculation results of each two lenses are:
d12=(L12*f)/(l1-l2);d23=(L23*f)/(l2-l3);d34=(L34*f)/(l3-l4)d 12 =(L 12 *f)/(l 1 -l 2 ); d 23 =(L 23 *f)/(l 2 -l 3 ); d 34 =(L 34 *f)/(l 3 - l 4 )
d45=(L45*f)/(l4-l5);d56=(L56*f)/(l5-l6);d67=(L67*f)/(l6-l7)d 45 =(L 45 *f)/(l 4 -l 5 ); d 56 =(L 56 *f)/(l 5 -l 6 ); d 67 =(L 67 *f)/(l 6 - l 7 )
d78=(L78*f)/(l7-l8);d89=(L89*f)/(l8-l9);d19=(L19*f)/(l1-l9)d 78 =(L 78 *f)/(l 7 -l 8 ); d 89 =(L 89 *f)/(l 8 -l 9 ); d 19 =(L 19 *f)/(l 1 - l 9 )
d13=(L13*f)/(l1-l3);d14=(L14*f)/(l1-l4);d15=(L15*f)/(l1-l5)d 13 =(L 13 *f)/(l 1 -l 3 ); d 14 =(L 14 *f)/(l 1 -l 4 ); d 15 =(L 15 *f)/(l 1 - l 5 )
d16=(L16*f)/(l1-l6);d17=(L17*f)/(l1-l7);d18=(L18*f)/(l1-l8)d 16 =(L 16 *f)/(l 1 -l 6 ); d 17 =(L 17 *f)/(l 1 -l 7 ); d 18 =(L 18 *f)/(l 1 - l 8 )
d24=(L24*f)/(l2-l4);d25=(L25*f)/(l2-l5);d26=(L26*f)/(l2-l6)d 24 =(L 24 *f)/(l 2 -l 4 ); d 25 =(L 25 *f)/(l 2 -l 5 ); d 26 =(L 26 *f)/(l 2 - l 6 )
d27=(L27*f)/(l2-l7);d28=(L28*f)/(l2-l8);d29=(L29*f)/(l2-l9)d 27 =(L 27 *f)/(l 2 -l 7 ); d 28 =(L 28 *f)/(l 2 -l 8 ); d 29 =(L 29 *f)/(l 2 - l 9 )
d35=(L35*f)/(l3-l5);d36=(L36*f)/(l3-l6);d37=(L37*f)/(l3-l7)d 35 =(L 35 *f)/(l 3 -l 5 ); d 36 =(L 36 *f)/(l 3 -l 6 ); d 37 =(L 37 *f)/(l 3 - l 7 )
d38=(L38*f)/(l3-l8);d39=(L39*f)/(l3-l9);d46=(L46*f)/(l4-l6)d 38 =(L 38 *f)/(l 3 -l 8 ); d 39 =(L 39 *f)/(l 3 -l 9 ); d 46 =(L 46 *f)/(l 4 - l 6 )
d47=(L47*f)/(l4-l7);d48=(L48*f)/(l4-l8);d49=(L49*f)/(l4-l9)d 47 =(L 47 *f)/(l 4 -l 7 ); d 48 =(L 48 *f)/(l 4 -l 8 ); d 49 =(L 49 *f)/(l 4 - l 9 )
d57=(L57*f)/(l5-l7);d58=(L58*f)/(l5-l8);d59=(L59*f)/(l5-l9)d 57 =(L 57 *f)/(l 5 -l 7 ); d 58 =(L 58 *f)/(l 5 -l 8 ); d 59 =(L 59 *f)/(l 5 - l 9 )
d68=(L68*f)/(l6-l8);d69=(L69*f)/(l6-l9);d79=(L79*f)/(l7-l9)d 68 =(L 68 *f)/(l 6 -l 8 ); d 69 =(L 69 *f)/(l 6 -l 9 ); d 79 =(L 79 *f)/(l 7 - l 9 )
3、获取多镜头视差测距步骤3. Obtain the steps of multi-lens parallax distance measurement
根据9镜头各个示意图的不同布放方式,先求出各对镜头间距离之和:L=∑Lij,则最终测距d为加权平均求和:According to the different layout methods of each schematic diagram of the 9 lenses, first calculate the sum of the distances between each pair of lenses: L=∑Lij, then the final distance measurement d is the weighted average sum:
其中i从1到8,j从2到9,且i大于j。Where i is from 1 to 8, j is from 2 to 9, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
八、更多镜头立体视觉摄像及其视差计算8. Stereo vision camera with more lenses and its parallax calculation
1、初始化步骤1. Initialization steps
1.1镜头布放方式。十镜头以上至2500个镜头立体视觉摄像及其视差计算,排布方式按以下方法得到:1.1 Lens placement method. More than 10 lenses to 2500 lenses for stereo vision imaging and parallax calculation, the arrangement method is obtained by the following method:
1)记镜头数为N,10≤N≤2500;1) Record the number of shots as N, 10≤N≤2500;
2)计算排布最大行数M:M2≤N<(M+1)2,M为对应N而确定的一个整数且3≤M≤50;2) Calculate the maximum number of rows M: M 2 ≤N<(M+1) 2 , M is an integer determined corresponding to N and 3≤M≤50;
3)选定具体要排布的行数H,1≤H≤M;3) Select the specific row number H to be arranged, 1≤H≤M;
3.1)如果H=1,则各镜头构成一条直线且等距离排布;3.1) If H=1, each lens forms a straight line and is arranged equidistantly;
3.2)如果H=2,在下面方式中选择其一:3.2) If H=2, choose one of the following ways:
3.2.1上下2行平行,相邻最近的每4个镜头构成正方形,形似“8镜头-7”;3.2.1 The upper and lower rows are parallel, and every 4 adjacent lenses form a square, which looks like "8 lenses - 7";
3.2.2上下2行平行,相邻最近的每3个镜头构成等边三角形,形似“8镜头-6”;3.2.2 The upper and lower rows are parallel, and every three adjacent lenses form an equilateral triangle, which looks like "8 lenses - 6";
3.2.3如果N为奇数,则最后一个镜头与上下2行最右边的2个镜头构成等边三角形,形似“9镜头-4”,或者直接等距离布放在上行或下行;3.2.3 If N is an odd number, the last lens and the rightmost 2 lenses in the upper and lower rows form an equilateral triangle, which looks like "9 lenses-4", or they are placed equidistantly in the upper or lower rows;
3.3)如果H≥3,各行之间平行且等距离:3.3) If H≥3, the rows are parallel and equidistant:
3.3.1根据H,确定每行布放的最少镜头数I:H×I≤N<H×(I+1);3.3.1 According to H, determine the minimum number of lenses I placed in each row: H×I≤N<H×(I+1);
3.3.2每个上下2行相邻的行中,相邻最近的每4个镜头构成正方形,形似“9镜头-3”,或者采取3.3.3方式布放;3.3.2 In each of the upper and lower 2 adjacent rows, every 4 adjacent lenses form a square, similar to "9 lenses-3", or adopt the method 3.3.3;
3.3.3每个上下2行相邻的行中,相邻最近的每3个镜头构成等边三角形,形似“9镜头-5”;3.3.3 In each of the upper and lower 2 adjacent rows, every 3 adjacent lenses form an equilateral triangle, which looks like "9 lenses-5";
3.3.4多出的K个镜头(1≤K<H),则每行一个将它们布放在第一行到第K行中间的延长线上,且与其上下2行最右边的2个镜头构成等边三角形,形似“9镜头-4”;或者每行一个将它们等距离布放在第一行到第K行的延长线上,与其相邻的4个镜头构成正方形,形似“8镜头-8”。3.3.4 For extra K lenses (1≤K<H), place them on the extension line between the first row and the Kth row, one for each row, and the rightmost two lenses in the upper and lower rows Form an equilateral triangle, similar to "9-lens-4"; or arrange them equidistantly on the extension line from the first row to the K-th row one by one in each row, and the 4 adjacent lenses form a square, similar to "8-lens -8".
1.2初始化所有参数变量1.2 Initialize all parameter variables
在多镜头的布放方式下,Si(i从1到N)表示各摄像机的光学中心位置,用Lij分别表示每对摄像机光学中心之间的距离(其中i从1到N-1,j从2到N,且i大于j),各个摄像机的焦距均为f。令同一平面上的每两个摄像机对物体P拍摄获取二维图像,根据立体平行摄像系统视觉模型以及其计算方法,镜头i和镜头j两两之间存在物体P在两个图像面上的视差,记作(li–lj),它表示了P在每两个摄像机所成图像中成像点的位置差异。d表示物体P距平面的距离,则Si与Sj所测距离为dij。In the multi-lens layout, Si (i from 1 to N) represents the optical center position of each camera, and Lij represents the distance between the optical centers of each pair of cameras (where i is from 1 to N-1, and j is from 2 to N, and i is greater than j), the focal length of each camera is f. Let every two cameras on the same plane capture the object P to obtain a two-dimensional image, according to the stereoscopic parallel camera system visual model and its calculation method, there is a parallax of the object P on the two image planes between the lens i and the lens j , denoted as (li–lj), which represents the position difference of the imaging point of P in the images formed by every two cameras. d represents the distance between the object P and the plane, then the distance measured by Si and Sj is dij.
2、获取所有双目视差测距步骤2. Obtain all binocular parallax ranging steps
每两个镜头Si和镜头Sj之间的双目视差测距计算结果为:The binocular parallax ranging calculation result between every two lenses Si and Sj is:
dij=(Lij*f)/(li-lj)d ij =(L ij *f)/(l i -l j )
其中i从1到N-1,j从2到N,且i大于j。Where i is from 1 to N-1, j is from 2 to N, and i is greater than j.
3、获取多镜头视差测距步骤3. Obtain the steps of multi-lens parallax distance measurement
根据多镜头各个不同布放方式,先求出各对镜头间距离之和:L=∑Lij,则最终测距d为加权平均求和:According to the different layout methods of multiple lenses, first calculate the sum of the distances between each pair of lenses: L=∑Lij, then the final distance measurement d is the weighted average sum:
其中i从1到N-1,j从2到N,且i大于j。Where i is from 1 to N-1, j is from 2 to N, and i is greater than j.
4、结束步骤4. End step
依据如上公式计算出多镜头视差测距结果,将结果输出。Calculate the multi-lens parallax ranging result according to the above formula, and output the result.
本发明从多个视点观察同一景物,以获取在不同视角下的感知图像,通过三角测量原理计算图像像素间的位置偏差(即视差)来获取景物的三维信息。在基于立体平行视觉模型的基础上,给出多镜头立体视觉摄像及其视差的计算方法。在多镜头成像的环境下利用立体平行视觉模型的视差计算方法,对多镜头相互之间进行视差计算,获得更为精确的成像视差,使得三维重建中物体点深度信息更为精确。The present invention observes the same scene from multiple viewpoints to obtain perceptual images under different viewing angles, and calculates the positional deviation (that is, parallax) between image pixels through the principle of triangulation to obtain three-dimensional information of the scene. Based on the stereo parallel vision model, the calculation method of multi-lens stereo vision camera and its parallax is given. In the multi-lens imaging environment, the disparity calculation method of the stereo parallel vision model is used to calculate the disparity between the multiple lenses to obtain more accurate imaging disparity, which makes the depth information of object points more accurate in 3D reconstruction.
每种布放方式中的多镜头可按照相对距离不变的比例围绕圆心旋转;也可按平面上一条直线为轴翻转来布放镜头。本发明的每种多镜头立体视觉摄像及其视差的计算方法由初始化步骤、获取所有双目视差测距步骤、获取多镜头视差测距步骤、结束步骤组成。其中在计算最终视差时采用了加权平均的方法,可以更好地消除测距误差。The multi-lens in each layout method can be rotated around the center of the circle at a constant relative distance ratio; the lens can also be arranged by turning a straight line on the plane as the axis. Each kind of multi-lens stereo vision imaging and its parallax calculation method of the present invention is composed of an initialization step, a step of obtaining all binocular parallax distance measurement steps, a step of obtaining multi-lens parallax distance measurement steps, and an end step. Among them, the weighted average method is adopted in the calculation of the final parallax, which can better eliminate the ranging error.
本发明的每种多镜头立体视觉摄像及其视差的计算方法由初始化步骤、获取所有双目视差测距步骤、获取多镜头视差测距步骤、结束步骤组成。其中在计算最终视差时采用了加权平均的方法,可以更好地消除测距误差。Each kind of multi-lens stereo vision imaging and its parallax calculation method of the present invention is composed of an initialization step, a step of obtaining all binocular parallax distance measurement steps, a step of obtaining multi-lens parallax distance measurement steps, and an end step. Among them, the weighted average method is adopted in the calculation of the final parallax, which can better eliminate the ranging error.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610177856.5A CN105869157B (en) | 2016-03-25 | 2016-03-25 | The calculation method of more lens stereo vision parallaxes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610177856.5A CN105869157B (en) | 2016-03-25 | 2016-03-25 | The calculation method of more lens stereo vision parallaxes |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105869157A true CN105869157A (en) | 2016-08-17 |
CN105869157B CN105869157B (en) | 2019-03-15 |
Family
ID=56625890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610177856.5A Active CN105869157B (en) | 2016-03-25 | 2016-03-25 | The calculation method of more lens stereo vision parallaxes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105869157B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108024051A (en) * | 2016-11-04 | 2018-05-11 | 宁波舜宇光电信息有限公司 | Distance parameter computational methods, dual camera module and electronic equipment |
CN108520540A (en) * | 2018-03-07 | 2018-09-11 | 北京华凯汇信息科技有限公司 | A calibration-free three-dimensional stereotaxic positioning method for binocular bionic eyes |
CN111595292A (en) * | 2020-04-29 | 2020-08-28 | 杭州电子科技大学 | A binocular vision ranging method based on unequal focal lengths |
CN112828683A (en) * | 2020-07-30 | 2021-05-25 | 哈尔滨理工大学 | Outer cover mold bionic surface topography detection device and multi-factor coupling control processing method |
CN113301321A (en) * | 2021-04-01 | 2021-08-24 | 维沃移动通信(杭州)有限公司 | Imaging method, system, device, electronic equipment and readable storage medium |
CN113570533A (en) * | 2021-07-28 | 2021-10-29 | 深圳创维-Rgb电子有限公司 | Image display method and device based on intelligent wardrobe and intelligent wardrobe |
US20240040220A1 (en) * | 2022-07-27 | 2024-02-01 | Kwok Wah Allen Lo | Camera having imaging lenses with varied inter-lens spacings |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103065289A (en) * | 2013-01-22 | 2013-04-24 | 清华大学 | Four-ocular video camera front face reconstruction method based on binocular stereo vision |
CN103458257A (en) * | 2012-05-31 | 2013-12-18 | 财团法人工业技术研究院 | Hole filling method for multi-view disparity map |
CN104616348A (en) * | 2015-01-15 | 2015-05-13 | 东华大学 | Method for reconstructing fabric appearance based on multi-view stereo vision |
KR20150115335A (en) * | 2014-04-03 | 2015-10-14 | 한국전자통신연구원 | Distance measuring apparatus using Multi-view point image and method therefor |
-
2016
- 2016-03-25 CN CN201610177856.5A patent/CN105869157B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103458257A (en) * | 2012-05-31 | 2013-12-18 | 财团法人工业技术研究院 | Hole filling method for multi-view disparity map |
CN103065289A (en) * | 2013-01-22 | 2013-04-24 | 清华大学 | Four-ocular video camera front face reconstruction method based on binocular stereo vision |
KR20150115335A (en) * | 2014-04-03 | 2015-10-14 | 한국전자통신연구원 | Distance measuring apparatus using Multi-view point image and method therefor |
CN104616348A (en) * | 2015-01-15 | 2015-05-13 | 东华大学 | Method for reconstructing fabric appearance based on multi-view stereo vision |
Non-Patent Citations (2)
Title |
---|
佘彩云 等: "一种多目视觉三维测距系统设计", 《制导与引信》 * |
刘姚军 等: "多目聚焦立体视觉", 《信息通信》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108024051A (en) * | 2016-11-04 | 2018-05-11 | 宁波舜宇光电信息有限公司 | Distance parameter computational methods, dual camera module and electronic equipment |
CN108024051B (en) * | 2016-11-04 | 2021-05-04 | 宁波舜宇光电信息有限公司 | Distance parameter calculation method, double-camera module and electronic equipment |
CN108520540A (en) * | 2018-03-07 | 2018-09-11 | 北京华凯汇信息科技有限公司 | A calibration-free three-dimensional stereotaxic positioning method for binocular bionic eyes |
CN111595292A (en) * | 2020-04-29 | 2020-08-28 | 杭州电子科技大学 | A binocular vision ranging method based on unequal focal lengths |
CN112828683A (en) * | 2020-07-30 | 2021-05-25 | 哈尔滨理工大学 | Outer cover mold bionic surface topography detection device and multi-factor coupling control processing method |
CN113301321A (en) * | 2021-04-01 | 2021-08-24 | 维沃移动通信(杭州)有限公司 | Imaging method, system, device, electronic equipment and readable storage medium |
CN113570533A (en) * | 2021-07-28 | 2021-10-29 | 深圳创维-Rgb电子有限公司 | Image display method and device based on intelligent wardrobe and intelligent wardrobe |
US20240040220A1 (en) * | 2022-07-27 | 2024-02-01 | Kwok Wah Allen Lo | Camera having imaging lenses with varied inter-lens spacings |
Also Published As
Publication number | Publication date |
---|---|
CN105869157B (en) | 2019-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105869157A (en) | Multi-lens stereoscopic vision parallax calculating method | |
CN104376558B (en) | Cuboid-based intrinsic parameter calibration method for Kinect depth camera | |
CN107063129B (en) | A kind of array parallel laser projection three-dimensional scan method | |
CN104075688B (en) | A kind of binocular solid stares the distance-finding method of monitoring system | |
CN101299270B (en) | Synchronous Fast Calibration Method for Multiple Cameras in 3D Scanning System | |
CN104835158B (en) | 3D Point Cloud Acquisition Method Based on Gray Code Structured Light and Epipolar Constraint | |
CN107346425B (en) | A three-dimensional texture camera system, calibration method and imaging method | |
CN102072706B (en) | Multi-camera positioning and tracking method and system | |
CN102445165B (en) | Stereo vision measurement method based on single-frame color coding grating | |
CN110345921B (en) | Stereo visual field vision measurement and vertical axis aberration and axial aberration correction method and system | |
CN109523595A (en) | A kind of architectural engineering straight line corner angle spacing vision measuring method | |
CN109859272A (en) | A kind of auto-focusing binocular camera scaling method and device | |
CN107492127A (en) | Light-field camera parameter calibration method, device, storage medium and computer equipment | |
CN101586943B (en) | Method for calibrating structure light vision transducer based on one-dimensional target drone | |
CN102944191B (en) | Method and device for three-dimensional vision measurement data registration based on planar circle target | |
CN109712232B (en) | Object surface contour three-dimensional imaging method based on light field | |
CN103606147B (en) | Coordinate system conversion and calibration method for multiple measurement cameras with different fields of view | |
CN103903260A (en) | Target method for quickly calibrating intrinsic parameters of vidicon | |
CN109163657A (en) | A kind of circular target position and posture detection method rebuild based on binocular vision 3 D | |
Zhou et al. | A novel way of understanding for calibrating stereo vision sensor constructed by a single camera and mirrors | |
CN104634248A (en) | Revolving shaft calibration method under binocular vision | |
CN111192235A (en) | An Image Measurement Method Based on Monocular Vision Model and Perspective Transformation | |
CN105654547A (en) | Three-dimensional reconstruction method | |
TW201310004A (en) | Correlation arrangement device of digital images | |
CN108180888A (en) | A kind of distance detection method based on rotating pick-up head |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |