CN104616304A - Self-adapting support weight stereo matching method based on field programmable gate array (FPGA) - Google Patents
Self-adapting support weight stereo matching method based on field programmable gate array (FPGA) Download PDFInfo
- Publication number
- CN104616304A CN104616304A CN201510072013.4A CN201510072013A CN104616304A CN 104616304 A CN104616304 A CN 104616304A CN 201510072013 A CN201510072013 A CN 201510072013A CN 104616304 A CN104616304 A CN 104616304A
- Authority
- CN
- China
- Prior art keywords
- value
- point
- fpga
- overbar
- matching
- 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.)
- Pending
Links
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/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
- G06T2207/10012—Stereo images
-
- 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/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
- G06T2207/10021—Stereoscopic video; Stereoscopic image sequence
Landscapes
- Image Processing (AREA)
Abstract
本发明提出了一种基于FPGA的自适应支撑权重的立体匹配方法。在FPGA中对左右图像建立局部立体匹配窗口;然后根据局部窗口内匹配点与局部窗口中心点间的灰度相似性和曼哈顿距离相似性,求取待匹配点的灰度相似性函数值和曼哈顿距离相似性函数值,从而得到局部窗口匹配点的权重代价关系值;最后根据所述局部匹配窗口的匹配代价权重关系值,计算出每个匹配点的代价聚合关系,然后利用胜者为王准则,求取每个像素点的视差结果。本发明提高了整体匹配效果,可以获得实时的稠密视差结果,具有较强的鲁棒性。
The invention proposes a stereo matching method based on FPGA-based self-adaptive support weights. Establish a local stereo matching window for the left and right images in the FPGA; then according to the gray similarity between the matching point in the local window and the center point of the local window and the similarity of the Manhattan distance, the gray similarity function value and the Manhattan distance of the points to be matched are obtained. distance similarity function value, so as to obtain the weight cost relationship value of the local window matching point; finally, according to the matching cost weight relationship value of the local matching window, calculate the cost aggregation relationship of each matching point, and then use the winner is king criterion , to obtain the disparity result of each pixel. The present invention improves the overall matching effect, can obtain real-time dense disparity results, and has strong robustness.
Description
技术领域technical field
本发明属于双目立体视觉领域,具体涉及一种基于FPGA的自适应支撑权重的立体匹配方法。The invention belongs to the field of binocular stereo vision, and in particular relates to a stereo matching method based on FPGA-based self-adaptive support weights.
背景技术Background technique
双目立体视觉是直接模拟人类双眼视觉的生理结构,它是三维场景下深度信息提取的重要技术手段,在机器人导航、无人机定位以及三维测量中具有广泛的运用,立体视觉中最关键和难点在于双目图像的立体匹配,匹配过程中由于需要进行大量数据的重复运算,因此在CPU上对双目图像进行立体匹配需要花费大量的运算时间,难以满足实时性的要求。例如,对于主频为1GHZ的CPU,利用区域立体匹配算法对两幅中型大小的图片进行稠密视差图计算,需要花费几秒的时间,这样低速率的处理结果极大的限制了立体视觉的发展,特别是一些需要得到实时匹配视差结果的实际运用场合。因此,近年来如何在保证匹配精度的条件下提高立体匹配算法的实时性,成为了人们研究的热点。Binocular stereo vision is a physiological structure that directly simulates human binocular vision. It is an important technical means for depth information extraction in 3D scenes. It is widely used in robot navigation, UAV positioning and 3D measurement. The most critical and The difficulty lies in the stereo matching of binocular images. Due to the need for repeated calculations of a large amount of data during the matching process, it takes a lot of computing time to perform stereo matching of binocular images on the CPU, which is difficult to meet the real-time requirements. For example, for a CPU with a main frequency of 1GHZ, it takes a few seconds to calculate the dense disparity map of two medium-sized pictures using the regional stereo matching algorithm. Such low-speed processing results greatly limit the development of stereo vision. , especially in some practical applications that require real-time matching disparity results. Therefore, in recent years, how to improve the real-time performance of the stereo matching algorithm under the condition of ensuring the matching accuracy has become a research hotspot.
区域立体匹配算法包含全局区域立体匹配算法和局部区域立体匹配算法,全局区域立体匹配算法匹配准确度高,但计算复杂、运算量大,在提高实时性方面可以采用GPU来实现,但是GPU处理过程中功耗很大,因此限制器实际的运用场合。对应局部区域立体匹配算法,该方法是通过左右图像上的局部窗口的相似性关系来获得每个待匹配点的视差值,计算量小,且匹配过程中如果能够找到一个合适的匹配代价关系,也能获得一个较好的匹配结果,而FPGA作为一种可编程的逻辑门阵列,灵活性强,利用其内部的并行流水线技术可以实时的实现局部区域立体匹配算法。The regional stereo matching algorithm includes a global stereo matching algorithm and a local stereo matching algorithm. The global stereo matching algorithm has high matching accuracy, but the calculation is complex and the amount of calculation is large. GPU can be used to improve real-time performance, but the GPU processing process The power consumption in the middle is very large, so the actual application occasion of the limiter. Corresponding to the local area stereo matching algorithm, this method is to obtain the disparity value of each point to be matched through the similarity relationship between the local windows on the left and right images, the calculation amount is small, and if a suitable matching cost relationship can be found during the matching process , can also obtain a better matching result, and FPGA, as a programmable logic gate array, has strong flexibility. Using its internal parallel pipeline technology, it can realize the local area stereo matching algorithm in real time.
目前,利用FPGA实现实时的局部区域立体匹配方法有Ambrosch K等人提出的基于FPGA实现的SAD立体匹配方法(详见文献Hardware implementation of an SAD basedstereo vision algorithm)、Chen L等人提出的基于FPGA实现的实时立体匹配方法(详见文献A Parallel reconfigurable architecture for real-time stereo vision)。该类方法能够实时的获得到实时的稠密视差结果,但匹配过程中的局部窗口为固定值,且对窗口内的匹配点在匹配过程中没有分配合适的权重信息,因此在深度不连续点处、低纹理处以及场景重复区域处容易匹配出错,匹配准确率不高。At present, the real-time local area stereo matching method using FPGA includes FPGA-based SAD stereo matching method proposed by Ambrosch K et al. Real-time stereo matching method (see literature A Parallel reconfigurable architecture for real-time stereo vision for details). This type of method can obtain real-time dense disparity results in real time, but the local window in the matching process is a fixed value, and no appropriate weight information is assigned to the matching points in the window during the matching process, so the depth discontinuity point It is easy to make matching errors in places with low texture and repeated scenes, and the matching accuracy is not high.
发明内容Contents of the invention
本发明的目的针对现有立体匹配方法在匹配准确率和实时性方面存在的不足,提出了一种基于FPGA的自适应支撑权重的立体匹配方法,该方法可以解决深度不连续点处、低纹理处以及场景重复区域处容易匹配出错的问题,从而可以提高整体的匹配效果,同时,该方法利用FPGA内部的并行流水线技术,可以在FPGA内进行并行的局部区域立体匹配,获得实时的稠密视差结果,具有较强的鲁棒性。The purpose of the present invention aims at the deficiencies of existing stereo matching methods in terms of matching accuracy and real-time performance, and proposes a stereo matching method based on FPGA-based adaptive support weights. It is easy to make matching errors in places and repeated areas of the scene, so as to improve the overall matching effect. At the same time, this method uses the parallel pipeline technology inside the FPGA to perform parallel local area stereo matching in the FPGA to obtain real-time dense disparity results. , has strong robustness.
为了解决上述技术问题,本发明提供一种基于FPGA的自适应支撑权重的立体匹配方法,在FPGA中对左右图像建立一个m×n大小的局部立体匹配窗口,视频输入口的输入数据为预处理后的左右图像,像素点的时钟为左右图像每个像素点进入FPGA内部的系统同步时钟,用先进先出缓存器对匹配点进行行缓存,用FPGA内部的D触发器对匹配点进行列缓存;然后根据局部窗口内匹配点与局部窗口中心点间的灰度相似性和曼哈顿距离相似性,求取待匹配点的灰度相似性函数值和曼哈顿距离相似性函数值,从而得到局部窗口匹配点的权重代价关系值w(p,q),权重代价关系值w(p,q)如式(1)所示,In order to solve the above-mentioned technical problems, the present invention provides a stereo matching method based on FPGA-based self-adaptive support weights, in which a local stereo matching window of m×n size is established for the left and right images in the FPGA, and the input data of the video input port is preprocessed After the left and right images, the clock of the pixel point is the system synchronous clock that each pixel point of the left and right images enters into the FPGA, and uses the first-in-first-out buffer to cache the matching points, and uses the D flip-flop inside the FPGA to cache the matching points ; Then according to the gray similarity and Manhattan distance similarity between the matching point in the local window and the local window center point, calculate the gray similarity function value and the Manhattan distance similarity function value of the point to be matched, so as to obtain the local window matching The weight-cost relationship value w(p,q) of the point, and the weight-cost relationship value w(p,q) is shown in formula (1),
w(p,q)=wdk·wRl (1)w(p,q)=wd k ·wR l (1)
式(1)中,wdk表示在FPGA内部通过查找表获得的像素点p和q的曼哈顿距离相似性函数值的对应值,Rl表示像素点p和q的灰度值在经过rank变换后的灰度相似性关系,wRl表示在FPGA内部通过查找表获得的像素点p和q的灰度相似性函数值的对应值;最后根据所述局部匹配窗口的匹配代价权重关系值,计算出每个匹配点的代价聚合关系,然后利用胜者为王准则,求取每个像素点的视差结果;所述每个匹配点的代价聚合关系如式(2)所示,In formula (1), wd k represents the corresponding value of the Manhattan distance similarity function value of the pixel point p and q obtained through the lookup table inside the FPGA, and R l represents the gray value of the pixel point p and q after rank transformation The gray-scale similarity relationship of wR 1 represents the corresponding value of the gray-scale similarity function value of the pixel point p and q obtained by the look-up table inside the FPGA; finally, according to the matching cost weight relationship value of the local matching window, calculate The cost aggregation relationship of each matching point, and then use the winner is king criterion to obtain the disparity result of each pixel point; the cost aggregation relationship of each matching point As shown in formula (2),
式(2)中,Np表示左图像的局部匹配窗口,表示右图像的局部匹配窗口,w(p,q)为左图像中匹配点q的权重关系值,为右图像中的匹配点的权重关系值,对于左右图像的局部窗口,p点和点对应,q点和点相对应,为匹配点经rank变换后的比较值,表达式如式(3)所示:In formula (2), N p represents the local matching window of the left image, Represents the local matching window of the right image, w(p,q) is the weight relationship value of the matching point q in the left image, is the matching point in the right image The weight relationship value of , for the local window of the left and right images, p points and points correspond to points q and corresponding to the point, is the comparison value of the matching point after rank transformation, The expression is shown in formula (3):
式(3)中,Rpq表示q点的rank变换值,表示点的rank变换值。In formula (3), R pq represents the rank transformation value of point q, express The rank transformation value of the point.
较佳地,选用高斯函数对视频图像进行预处理,滤除噪声。Preferably, a Gaussian function is selected to preprocess the video image to filter out noise.
本发明与现有技术相比,其显著优点在于,(1)本发明在硬件FPGA上对双目图像进行局部区域立体匹配,从而可以获得实时的稠密视差结果;(2)本发明利用局部窗口内匹配点与窗口中心点间的灰度相似性、曼哈顿距离相似性建立自适应权重关系,从而可以提高匹配过程中的准确率;(3)本发明在局部窗口的匹配过程中,用rank变换后的值替代原始的灰度相似性函数关系值,从而可以在FPGA内部建立一个固定的灰度查找表,有利于FPGA的实时性计算;(4)本发明在代价聚合过程中,将匹配点先经过rank变换后再进行视差值计算,从而消除光照和噪声对左右图像匹配结果的影响。Compared with the prior art, the present invention has significant advantages in that (1) the present invention performs local area stereo matching on binocular images on the hardware FPGA, thereby obtaining real-time dense parallax results; (2) the present invention utilizes local windows The gray-scale similarity between the inner matching point and the window center point, the Manhattan distance similarity establish an adaptive weight relationship, thereby the accuracy rate in the matching process can be improved; (3) the present invention uses rank transformation in the matching process of the local window The final value replaces the original gray-scale similarity function relationship value, thereby a fixed gray-scale lookup table can be established inside the FPGA, which is conducive to the real-time calculation of the FPGA; (4) the present invention will match the matching point After the rank transformation, the disparity value is calculated, so as to eliminate the influence of illumination and noise on the matching results of the left and right images.
附图说明Description of drawings
图1是本发明方法流程图。Fig. 1 is a flow chart of the method of the present invention.
图2是本发明在FPGA中对左右图像建立m×n大小的局部区域立体匹配窗口。Fig. 2 is the local area stereo matching window of m×n size established for the left and right images in the FPGA of the present invention.
图3是本发明在FPGA中对像素点进行rank变换的过程示意图。Fig. 3 is a schematic diagram of the process of performing rank transformation on pixels in FPGA according to the present invention.
图4是本发明在FPGA中建立的相似性函数查找表,其中(a)为曼哈顿距离相似性查找表,(b)为灰度相似性查找表。Fig. 4 is the similarity function lookup table that the present invention establishes in FPGA, and wherein (a) is the Manhattan distance similarity lookup table, (b) is the gray scale similarity lookup table.
图5是本发明在左右图像的局部窗口中对相应的匹配点进行代价聚合运算示意图,其中(a)为左图像窗口的示意图,(b)为右图像窗口的示意图。Fig. 5 is a schematic diagram of the present invention performing cost aggregation operation on corresponding matching points in the local windows of the left and right images, wherein (a) is a schematic diagram of the left image window, and (b) is a schematic diagram of the right image window.
图6是本发明代价聚合过程在FPGA中的实现示意图。FIG. 6 is a schematic diagram of the implementation of the cost aggregation process in the FPGA of the present invention.
具体实施方式Detailed ways
结合图1,本发明基于FPGA的自适应支撑权重的立体匹配方法,步骤如下:In conjunction with Fig. 1, the stereo matching method of the adaptive support weight based on FPGA of the present invention, the steps are as follows:
步骤1:利用标定好的左右摄像机获得极线矫正好的左右图像,将采集到的左右图像进行滤波处理去除噪声干扰,预处理后的左图像为Il(i,j)和右图像为Ir(i,j);Step 1: Use the calibrated left and right cameras to obtain the left and right images after epipolar correction, and filter the collected left and right images to remove noise interference. The preprocessed left image is I l (i, j) and the right image is I r (i,j);
本发明选用高斯函数对图像进行滤波,从而有效的消除传感器所引入的高斯白噪声。滤波模板采用(2k+1)×(2k+1)维(其中k=1,2,3,...)的离散高斯卷积核,计算方式如公式(1)所示:The invention uses Gaussian function to filter the image, thereby effectively eliminating Gaussian white noise introduced by the sensor. The filter template adopts a (2k+1)×(2k+1) dimensional (where k=1,2,3,...) discrete Gaussian convolution kernel, and the calculation method is shown in formula (1):
公式(1)中,(i,j)为图像像素点的坐标值,Il0(i,j)为输入的原始左图像,Ir0(i,j)为输入的原始右图像,(u,v)为离散高斯点坐标,G(u,v)为离散高斯核函数在(u,v)处的归一化值,σ为高斯函数尺度值。In formula (1), (i, j) is the coordinate value of the image pixel, I l0 (i, j) is the input original left image, I r0 (i, j) is the input original right image, (u, v) is the discrete Gaussian point coordinates, G(u,v) is the normalized value of the discrete Gaussian kernel function at (u,v), and σ is the scale value of the Gaussian function.
步骤2:结合图2,在FPGA中对左右图像建立一个m×n大小的局部立体匹配窗口,视频输入口的输入数据为预处理后的左右图像,像素点的时钟为左右图像每个像素点进入FPGA内部的系统同步时钟,FIFO为先进先出缓存器,对匹配点进行行缓存,列缓存通过FPGA内部的D触发器进行缓存,win为建立的局部窗口,由此在FPGA中可以得到一个并行的局部窗口,用于左右图像的局部区域立体匹配。Step 2: Combining with Figure 2, establish a local stereo matching window of m×n size for the left and right images in the FPGA, the input data of the video input port is the preprocessed left and right images, and the pixel clock is each pixel of the left and right images Entering the system synchronous clock inside the FPGA, FIFO is a first-in-first-out buffer, which caches the matching points, and the column cache is cached through the D flip-flop inside the FPGA, and win is the local window established, so one can get a Parallel local windows for local region stereo matching of left and right images.
步骤3:根据局部窗口内匹配点与局部窗口中心点间的灰度相似性和曼哈顿距离相似性,求取待匹配点的灰度相似性函数值f(Δcpq)和曼哈顿距离相似性函数值f(Δdpq),从而得到局部窗口匹配点的权重代价关系值w(p,q),如下式(2)所示:Step 3: According to the gray similarity and Manhattan distance similarity between the matching point in the local window and the center point of the local window, calculate the gray similarity function value f(Δc pq ) and the Manhattan distance similarity function value of the point to be matched f(Δd pq ), so as to obtain the weight cost relationship value w(p,q) of the local window matching point, as shown in the following formula (2):
w(p,q)=f(Δcpq)·f(Δdpq) (2)w(p,q)=f(Δc pq )·f(Δd pq ) (2)
式(2)中,p和q分别为图像匹配窗口的中心像素点和窗口区域内的像素点,Δcpq表示p和q点的灰度相似性关系,Δdpq表示p和q点的曼哈顿距离相似性关系。其中Δcpq、Δdpq的关系如式(3)所示,f(Δcpq)、f(Δdpq)函数表达式关系如式(4)所示。In formula (2), p and q are the central pixel of the image matching window and the pixels in the window area, respectively, Δc pq represents the gray similarity relationship between p and q points, and Δd pq represents the Manhattan distance between p and q points similarity relationship. Among them, the relationship between Δc pq and Δd pq is shown in formula (3), and the relationship between the function expressions of f(Δc pq ) and f(Δd pq ) is shown in formula (4).
式(3)中,Ip表示p点的灰度值,Iq表示q点的灰度值,(xp,yp)表示p点的行列坐标值,(xq,yq)表示q点的行列坐标值,式(4)中exp表示指数函数,τc表示颜色相似性函数下的权重比例常数,τd表示曼哈顿距离相似性函数下的权重比例常数。In formula (3), I p represents the gray value of point p, I q represents the gray value of point q, (x p , y p ) represents the row and column coordinates of point p, (x q , y q ) represents q The row and column coordinates of the point, exp in formula (4) represents the exponential function, τ c represents the weight proportional constant under the color similarity function, and τ d represents the weight proportional constant under the Manhattan distance similarity function.
进一步,本发明中,为了使灰度相似性函数方便在FPGA中计算,对匹配点的灰度值先进行rank变换,然后利用新的灰度相似性关系Rpq代替原始的Δcpq,rank变换的表达式如下:Further, in the present invention, in order to facilitate the calculation of the gray-scale similarity function in the FPGA, the gray-scale value of the matching point is first subjected to rank transformation, and then the original Δc pq is replaced by the new gray-scale similarity relationship Rpq, and the rank transformation The expression of is as follows:
式(5)中τ1、τ2为rank变换的分类条件,计算过程中作为固定常数,Ip表示p点的灰度值,Iq表示q点的灰度值。In formula (5), τ 1 and τ 2 are the classification conditions of rank transformation, which are used as fixed constants in the calculation process. I p represents the gray value of point p, and I q represents the gray value of point q.
因此根据式(5)和图2中建立的局部窗口,结合图3,利用FPGA内部的减法器对窗口内匹配点与窗口中心点的灰度值相减并判断,从而在FPGA内部确定窗口内每个匹配点rank变换等级,由于局部窗口中每个点都是并行得到的,因此变换后的rank像素点也是以局部窗口的形式并行出现,从而不影响算法的实时性。Therefore, according to formula (5) and the local window established in Figure 2, combined with Figure 3, the subtractor in the FPGA is used to subtract and determine the gray value of the matching point in the window and the gray value of the window center point, so as to determine the gray value in the window within the FPGA. The rank transformation level of each matching point, since each point in the local window is obtained in parallel, the transformed rank pixels also appear in parallel in the form of a local window, which does not affect the real-time performance of the algorithm.
结合图4,根据新的灰度相似性函数值f(Rpq)和曼哈顿距离相似性函数值f(Δdpq)在FPGA中建立查找表,从而确定每个像素点的匹配代价关系权重值w(p,q),因此在FPGA中计算的局部窗口匹配点的权重w(p,q)表达式如式(6)所示:Combined with Figure 4, according to the new gray similarity function value f(R pq ) and the Manhattan distance similarity function value f(Δd pq ), a lookup table is established in the FPGA to determine the matching cost relationship weight value w of each pixel (p,q), so the weight w(p,q) of the local window matching points calculated in the FPGA is shown in formula (6):
w(p,q)=wdk·wRl (6)w(p,q)=wd k ·wR l (6)
图4中,Δdk表示p和q点的曼哈顿距离,wdk表示在FPGA内部通过查找表获得的f(Δdpq)对应值,Rl表示p和q点在rank变换后的灰度相似性关系,wRl表示在FPGA内部通过查找表获得的f(Rpq)对应值。In Figure 4, Δd k represents the Manhattan distance between points p and q, wd k represents the corresponding value of f(Δd pq ) obtained through a lookup table inside the FPGA, and R l represents the gray similarity between points p and q after rank transformation relationship, wR l represents the corresponding value of f(R pq ) obtained through the lookup table inside the FPGA.
由于经过上述步骤变换后,对于大小一定的局部区域匹配窗口,其曼哈顿距离相似性函数值与rank变换后的灰度相似性函数值都是一定范围内的离散变换值,因此查找表的建立可以在FPGA中通过有限状态机来对数据进行映射,其中映射后的wdk、wRl数据都为整数,该数据在归一化后,并不会影响其匹配点权重的变换,如此有利于在FPGA中进行定点整数的计算。After the above steps of transformation, for a local area matching window with a certain size, its Manhattan distance similarity function value and the gray level similarity function value after rank transformation are both discrete transformation values within a certain range, so the establishment of the lookup table can be In the FPGA, the data is mapped through the finite state machine, where the mapped wd k and wR l data are all integers, and the normalized data will not affect the transformation of its matching point weights, which is beneficial in Perform fixed-point integer calculations in the FPGA.
步骤4:结合图5,根据局部匹配窗口的匹配代价权重关系值,计算出每个匹配点的代价聚合关系如式(7)所示,然后利用胜者为王(WTA)的准则,求取每个像素点的视差结果dq,如式(9)所示。Step 4: Combined with Figure 5, calculate the cost aggregation relationship of each matching point according to the matching cost weight relationship value of the local matching window As shown in Equation (7), the disparity result d q of each pixel is obtained by using the winner-takes-all (WTA) criterion, as shown in Equation (9).
式(7)中,Np表示左图像的局部匹配窗口,表示右图像的局部匹配窗口,w(p,q)为左图像中匹配点q的权重关系值,为右图像中的匹配点的权重关系值,对于左右图像的局部窗口,p点和点对应,q点和点相对应,为匹配点rank变换后的比较值,表达式如式(8)所示:In formula (7), N p represents the local matching window of the left image, Represents the local matching window of the right image, w(p,q) is the weight relationship value of the matching point q in the left image, is the matching point in the right image The weight relationship value of , for the local window of the left and right images, p points and points correspond to points q and corresponding to the point, To match the comparison value after the rank transformation of the matching point, the expression is shown in formula (8):
式(8)中,Rpq表示q点的rank变换值,表示点的rank变换值。In formula (8), R pq represents the rank transformation value of point q, express The rank transformation value of the point.
式(9)中,Sd={dmin,dmin+1,...,dmax},dmin为最小视差值,dmax为最大视差值。In formula (9), S d ={d min ,d min +1,...,d max }, d min is the minimum parallax value, and d max is the maximum parallax value.
结合图6,根据FPGA在左右图像中建立起局部权重窗口和局部像素点窗口,根据式(7)进行运算,在FPGA内部,为了减少乘法器资源的使用,左右图像的权重关系值进行相乘的过程中,利用移位的操作代替乘法器的功能(即将数据拆成多个2的n次方形式进行求和),图6中的wl表示左图像的权重w(p,q),wr表示右图像中的权重w即为用移位操作计算出的左右图像的权重积,图6中em的值由式(8)确定,它的取值只能是‘1’或者‘0’,因此式(7)的代价聚合的过程中,在FPGA中,只需要将em的最低位与权重值w中的各位进行逻辑与(&)操作,因此根据式(7),对权重关系值归一化后即可得到代价聚合关系值 Combined with Figure 6, the local weight window and local pixel point window are established in the left and right images according to the FPGA, and the operation is performed according to formula (7). Inside the FPGA, in order to reduce the use of multiplier resources, the weight relationship values of the left and right images are multiplied In the process, the shift operation is used to replace the function of the multiplier (that is, the data is divided into multiple n-th power forms for summing), w l in Figure 6 represents the weight w(p,q) of the left image, w r represents the weight in the right image w is the weight product of the left and right images calculated by the shift operation. The value of em in Figure 6 is determined by formula (8), and its value can only be '1' or '0', so formula (7) In the process of aggregation of the cost of , in the FPGA, only the lowest bit of em and the bits in the weight value w need to be logically ANDed (&). Therefore, according to formula (7), after normalizing the weight relationship value, it is Aggregated value of cost can be obtained
根据式(9),在FPGA中对每个匹配像素点并行的计算出(dmax-dmin+1)个匹配代价聚合值,并利用FPGA内部的比较器计算出代价聚合关系值最小的像素点所对应的偏移量,即为该点的视差值。According to formula (9), (d max -d min +1) matching cost aggregation values are calculated in parallel for each matching pixel in the FPGA, and the pixel with the smallest cost aggregation relationship value is calculated using the comparator inside the FPGA The offset corresponding to the point is the disparity value of the point.
因此,本发明循环上述步骤1~步骤6,即可对双目视频流进行稠密视差图的计算。Therefore, the present invention can calculate the dense disparity map for the binocular video stream by repeating the above steps 1 to 6.
为了本发明进一步通过仿真实验验证了本发明的有益效果,仿真实验是在Altera公司提供的CYCLONE III EP3C120F780C8 FPGA芯片上实现的,采用的局部匹配窗口的大小为11×11,采集到的双目视频流的帧频为60fps,图像大小分辨率为640×480,表1是本发明方法利用quartus2编译软件生成的硬件资源使用的报表,表2是本发明方法与现有的立体匹配算法的实时性能对比,帧频按60MHZ时钟归一化。实验表明本发明方法比Chen提出的方法搜索的视差范围更大,帧频也更高,能够获得一个实时、匹配准确率较高的稠密视差结果。In order for the present invention to further verify the beneficial effects of the present invention by simulation experiments, the simulation experiments are realized on the CYCLONE III EP3C120F780C8 FPGA chip provided by Altera Corporation, and the size of the local matching window adopted is 11 * 11, and the binocular video collected The frame rate of stream is 60fps, and the image size resolution is 640 * 480, and table 1 is the report form that the inventive method utilizes the hardware resource that quartus2 compiles software to generate to use, and table 2 is the real-time performance of the inventive method and existing stereo matching algorithm In contrast, the frame rate is normalized to a 60MHZ clock. Experiments show that the method of the present invention searches a larger disparity range and a higher frame rate than the method proposed by Chen, and can obtain a real-time dense disparity result with high matching accuracy.
表1Table 1
表2Table 2
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510072013.4A CN104616304A (en) | 2015-02-11 | 2015-02-11 | Self-adapting support weight stereo matching method based on field programmable gate array (FPGA) |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510072013.4A CN104616304A (en) | 2015-02-11 | 2015-02-11 | Self-adapting support weight stereo matching method based on field programmable gate array (FPGA) |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104616304A true CN104616304A (en) | 2015-05-13 |
Family
ID=53150737
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510072013.4A Pending CN104616304A (en) | 2015-02-11 | 2015-02-11 | Self-adapting support weight stereo matching method based on field programmable gate array (FPGA) |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104616304A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105807786A (en) * | 2016-03-04 | 2016-07-27 | 深圳市道通智能航空技术有限公司 | UAV automatic obstacle avoidance method and system |
CN108038874A (en) * | 2017-12-01 | 2018-05-15 | 中国科学院自动化研究所 | Towards the real-time registration apparatus of scanning electron microscope image and method of sequence section |
WO2018086348A1 (en) * | 2016-11-09 | 2018-05-17 | 人加智能机器人技术(北京)有限公司 | Binocular stereo vision system and depth measurement method |
CN111553296A (en) * | 2020-04-30 | 2020-08-18 | 中山大学 | A Binary Neural Network Stereo Vision Matching Method Based on FPGA |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101557534A (en) * | 2009-05-19 | 2009-10-14 | 无锡景象数字技术有限公司 | Method for generating disparity map from video close frames |
CN103778632A (en) * | 2014-01-18 | 2014-05-07 | 南京理工大学 | Method for stereo matching based on FPGA |
US20140177927A1 (en) * | 2012-12-26 | 2014-06-26 | Himax Technologies Limited | System of image stereo matching |
CN103985128A (en) * | 2014-05-23 | 2014-08-13 | 南京理工大学 | Three-dimensional matching method based on color intercorrelation and self-adaptive supporting weight |
CN104123727A (en) * | 2014-07-26 | 2014-10-29 | 福州大学 | Stereo matching method based on self-adaptation Gaussian weighting |
-
2015
- 2015-02-11 CN CN201510072013.4A patent/CN104616304A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101557534A (en) * | 2009-05-19 | 2009-10-14 | 无锡景象数字技术有限公司 | Method for generating disparity map from video close frames |
US20140177927A1 (en) * | 2012-12-26 | 2014-06-26 | Himax Technologies Limited | System of image stereo matching |
CN103778632A (en) * | 2014-01-18 | 2014-05-07 | 南京理工大学 | Method for stereo matching based on FPGA |
CN103985128A (en) * | 2014-05-23 | 2014-08-13 | 南京理工大学 | Three-dimensional matching method based on color intercorrelation and self-adaptive supporting weight |
CN104123727A (en) * | 2014-07-26 | 2014-10-29 | 福州大学 | Stereo matching method based on self-adaptation Gaussian weighting |
Non-Patent Citations (2)
Title |
---|
C. TTOFIS ET AL: "Towards accurate hardware stereo correspondence a real-time FPGA implementation of a segmentation-based adaptive support weight algorithm", 《PROCESSING OF THE CONFERENCE ON DESIGN,AUTOMATIC AND TEST IN EUROPE》 * |
龚文彪等: "基于颜色内相关和自适应支撑权重的立体匹配算法", 《中国激光》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105807786A (en) * | 2016-03-04 | 2016-07-27 | 深圳市道通智能航空技术有限公司 | UAV automatic obstacle avoidance method and system |
WO2018086348A1 (en) * | 2016-11-09 | 2018-05-17 | 人加智能机器人技术(北京)有限公司 | Binocular stereo vision system and depth measurement method |
CN108038874A (en) * | 2017-12-01 | 2018-05-15 | 中国科学院自动化研究所 | Towards the real-time registration apparatus of scanning electron microscope image and method of sequence section |
CN111553296A (en) * | 2020-04-30 | 2020-08-18 | 中山大学 | A Binary Neural Network Stereo Vision Matching Method Based on FPGA |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111062880B (en) | Underwater image real-time enhancement method based on condition generation countermeasure network | |
CN109993096B (en) | A multi-layer optical flow frame feature propagation and aggregation method for video object detection | |
CN105528785A (en) | Binocular visual image stereo matching method | |
CN104036479B (en) | Multi-focus image fusion method based on non-negative matrix factorization | |
CN105761233A (en) | FPGA-based real-time panoramic image mosaic method | |
CN109887021B (en) | Stereo matching method based on cross-scale random walk | |
CN105869167A (en) | High-resolution depth map acquisition method based on active and passive fusion | |
CN110443883B (en) | Plane three-dimensional reconstruction method for single color picture based on droplock | |
CN103227888B (en) | A kind of based on empirical mode decomposition with the video stabilization method of multiple interpretational criteria | |
CN103985128B (en) | A kind of solid matching method for supporting weight based on related and self adaptation in color | |
CN106204491A (en) | A kind of adapting to image defogging method based on dark channel prior | |
CN104978728A (en) | Image matching system of optical flow method | |
US20220198694A1 (en) | Disparity estimation optimization method based on upsampling and exact rematching | |
CN109242834A (en) | It is a kind of based on convolutional neural networks without reference stereo image quality evaluation method | |
CN103778632A (en) | Method for stereo matching based on FPGA | |
CN111046767A (en) | A 3D Object Detection Method Based on Monocular Image | |
CN104616304A (en) | Self-adapting support weight stereo matching method based on field programmable gate array (FPGA) | |
CN113129352A (en) | Sparse light field reconstruction method and device | |
CN103514610B (en) | A kind of moving Object Segmentation method of stationary background | |
CN104715470B (en) | A kind of klt Corner Detections device and method | |
CN104778673B (en) | A kind of improved gauss hybrid models depth image enhancement method | |
CN111462211B (en) | A Binocular Disparity Calculation Method Based on Convolutional Neural Network | |
CN107274448B (en) | Variable weight cost aggregation stereo matching algorithm based on horizontal tree structure | |
CN108510591A (en) | A kind of improvement Poisson curve reestablishing method based on non-local mean and bilateral filtering | |
CN115631223A (en) | Multi-view stereo reconstruction method based on self-adaptive learning and aggregation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150513 |
|
RJ01 | Rejection of invention patent application after publication |