[go: up one dir, main page]

CN103996201A - Stereo matching method based on improved gradient and adaptive window - Google Patents

Stereo matching method based on improved gradient and adaptive window Download PDF

Info

Publication number
CN103996201A
CN103996201A CN201410258432.2A CN201410258432A CN103996201A CN 103996201 A CN103996201 A CN 103996201A CN 201410258432 A CN201410258432 A CN 201410258432A CN 103996201 A CN103996201 A CN 103996201A
Authority
CN
China
Prior art keywords
matching
disparity
gradient
value
cost
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
Application number
CN201410258432.2A
Other languages
Chinese (zh)
Inventor
祝世平
李政
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN201410258432.2A priority Critical patent/CN103996201A/en
Publication of CN103996201A publication Critical patent/CN103996201A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

针对现有局部立体匹配算法精度不高以及易受幅度失真影响的问题,本发明提出了一种基于改进梯度和自适应窗口的立体匹配方法。首先在传统梯度向量仅包含幅值信息的基础上,引入相位信息,并对原始匹配代价进行变换,进一步消除异常值;然后采用一种基于十字交叉自适应窗口生成方法,可以根据相邻像素的色彩和空间位置关系构建自适应窗口。在低纹理区域,提供较大的窗口以提高匹配精度;而在高纹理区域则产生较小的窗口,以保护物体边缘等细节信息。对聚合后的代价,采用“胜者为王”(Winner-Takes-All(WTA))策略选择使总代价最小对应的视差值作为初始匹配结果;最后,提出一种局部视差直方图的视差精化方法,获得了高精度的视差图。实验结果表明,所提方法匹配精度高,且对幅度失真条件具有较高的鲁棒性。

Aiming at the problems that the existing local stereo matching algorithm has low precision and is easily affected by amplitude distortion, the present invention proposes a stereo matching method based on improved gradient and self-adaptive window. Firstly, on the basis that the traditional gradient vector only contains amplitude information, the phase information is introduced, and the original matching cost is transformed to further eliminate outliers; then a cross-based adaptive window generation method is adopted, which can be based on the adjacent pixels An adaptive window is constructed based on the relationship between color and spatial position. In low-texture areas, larger windows are provided to improve matching accuracy; while in high-texture areas, smaller windows are generated to protect details such as object edges. For the aggregated cost, the "Winner-Takes-All (WTA)" strategy is used to select the disparity value corresponding to the minimum total cost as the initial matching result; finally, a disparity value of the local disparity histogram is proposed. Refining the method, a high-precision disparity map is obtained. Experimental results show that the proposed method has high matching accuracy and is robust to amplitude distortion conditions.

Description

A kind of solid matching method based on improving gradient and self-adapting window
Technical field:
The present invention relates to a kind of binocular image Stereo matching and obtain depth map method, be particularly related to a kind of solid matching method based on improving gradient and self-adapting window, the depth map result that the present invention obtains can further be applied to the fields such as vision measurement, three-dimensionalreconstruction, drawing virtual view image.
Background technology:
Stereo matching is a classical problem in computer vision, is the focus of research always.For many years, researchers have proposed a large amount of algorithms and have attempted to address this problem, but due to the pathosis of problem itself, at present perfect solution without comparison also.Scharstein is (referring to Daniel Scharstein, Richard Szeliski.A taxonomy and evaluation of dense two-frame stereo correspondence algorithms[J] .International Journal of Computer Vision, 2002,47 (1): 7-42.) etc. furtherd investigate some typical Stereo Matching Algorithm, various main method have been carried out to more comprehensive summary.They Stereo matching process be summarised as that coupling cost is calculated, coupling cost polymerization, initial parallax calculate and parallax four steps of refining, and according to cost polymerization methods, Stereo Matching Algorithm be divided into partial approach and global approach.Global approach generally has higher matching precision, but efficiency is lower; Partial approach travelling speed is fast, be easy to realize, but the coupling cost computing method of the support window that How to choose is suitable and pixel are difficult problem (referring to YANG Qing-xiong.A non-local cost aggregation method for stereo matching[C] .IEEE Conference on Computer Vision and Pattern Recognition, 2012:1402-1409.).
The similarity measure of most of Stereo Matching Algorithm is all the gray-scale value based on pixel, the same unique point in two width images should have identical gray-scale value (referring to Wang Junzheng under desirable illumination condition, Zhu Huajian, Li Jing. a kind of variable weight Stereo Matching Algorithm [J] based on Census conversion. Beijing Institute of Technology's journal, 2013,33 (7): 704-710.).For example gray scale difference absolute value and (AD), gray scale difference quadratic sum (SD), Adapt Weight is (referring to Yoon K, Kweon S.Locally adaptive support weight approch for visual correspondence search[J] .IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006, 28 (4): 924-931.), Segment Support is (referring to Tombari F, Mattoccia S.Segmentation based adaptive support for accurate stereo correspondence[C] .IEEE Pacific Rim Symposium on Video and Technology, 2007:427-438.) etc. can obtain the matching result of degree of precision for ideal image, but these methods are for by illumination variation, difference in exposure, the picture amplitude distortion that the factors such as the dark angle of camera cause is very responsive, therefore be difficult to use in the coupling of real scene image.The insensitive coupling cost of amplitude distortion is mainly contained to normalized crosscorrelation (NCC), gradient (Gradient) is (referring to Daniel Scharstein.View synthesis using stereo vision.Phd thesis, 1997, 23 (5): 98-109.), Rank and Census convert (referring to Ramin Zabih, John Woodfill.Non-parametric local transforms for computing visual correspondence[C] .Proceedings of European Conference on Computer Vision, 1994:151-158.) etc.
There is the selection problem of mapping window size in traditional stationary window: if window is too little, mates cost discrimination too low, easily occur mistake coupling at low texture region; If window is excessive, can occur mating at degree of depth discontinuity zone again (referring to Zhou Long, Xu Guili, Li Kaiyu etc. based on the Stereo Matching Algorithm [J] of Census conversion and improvement self-adapting window. aviation journal; by mistake 2012,33 (5): 886-892.).Fusiello and Roberto are (referring to Fusiello A, Roberto V.Efficient stereo with multiple windowing[C] .IEEE Computer Society Conference on Computer vision and Pattern Recognition, 1997:858-863.) propose to select optimum window as support window in multiple windows given in advance; Veksler (referring to Veksler O.Fast variable window for stereo correspondence using integral image[C] .IEEE Computer Society Conference on Computer vision and Pattern Recognition, 2003:556-561.) proposes pointwise self-adaptation and chooses shape and the size of support window; Zhang (referring to Zhang K.Cross-based local stereo matching using orthogonal integral images[J] .IEEE Transactions on Circuits and systems for Video Technology, 2009,19 (7): 1073-1079.), according to the adaptively selected arbitrary shape of the color relations of neighbor and big or small support window, obtain good parallax result.
Summary of the invention:
For above-mentioned coupling cost and window selection problem, the present invention proposes a kind of matching process based on improving gradient coupling cost and self-adapting window.First only comprise on the basis of amplitude information in traditional gradient coupling cost, introduce Gradient Phase information, and original match cost is converted, further eliminate exceptional value; Then utilize picture structure and color information to build that self-adapting window carries out cost polymerization and " the victor is a king " (Winner-Takes-All (WTA)) strategy carries out parallax selection; Finally, propose the histogrammic parallax refined method of a kind of local parallax, obtained high-precision disparity map.
The technical problem to be solved in the present invention is:
1. traditional local matching method is lower to picture amplitude distortion-robust, the problem that matching precision reduces rapidly under illumination distortion condition.
2. the cost polymerization of stationary window is difficult to obtain at the low texture of image and the degree of depth discontinuity zone problem of higher matching precision simultaneously.
The technical solution adopted for the present invention to solve the technical problems: based on the matching process that improves gradient coupling cost and self-adapting window, it is characterized in that comprising the following steps:
Step 1: coupling cost is calculated: coupling cost is the tolerance of corresponding point similarity between the image of left and right, utilizes two components of gradient vector in image x, y direction, mould m and the phase angle of definition gradient vector then adopt the linearity of mould and phase angle to be combined as coupling cost function, to utilize to greatest extent gradient information.Finally utilize Geman-McClure function original match cost function to be converted to eliminate the impact of abnormal cost value.
Step 2: adaptive windows outlet structure: treat the polymerization window of a self-adaptation size of each pixel structure of matching image, it is how many that the large young pathbreaker of window directly determines to participate in the neighborhood territory pixel of polymerization.The present invention adopts a kind of improved right-angled intersection self-adapting window generation method, can build self-adapting window according to the color of neighbor and spatial relation.At low texture region, provide larger window to improve matching precision; Produce less window at high texture region, to protect the detailed information such as object edge.
Step 3: cost polymerization: after determining the self-adapting window of each pixel, need carry out polymerization to the original match cost of each single pixel in window and obtain total cost, finally select to make parallax value that total Least-cost is corresponding as initial matching result.
Step 4: parallax is refined: the initial parallax obtaining by above-mentioned steps also exists some Mismatching points and insincere value with true parallax, need to carry out the parallax processing of refining.The present invention proposes one and based on the histogrammic parallax refined method of local parallax, initial parallax figure is further processed.Then, adopt left and right consistency check to detect the Mismatching point still existing, utilize the value that in adjacent available point, parallax is less to carry out assignment to Mismatching point.
Brief description of the drawings:
Fig. 1 is the process flow diagram of the inventive method.
Fig. 2 is self-adapting window construction process schematic diagram.
Fig. 3 (a) is the right experimental result of Tsukuba image.
Fig. 3 (b) is the right experimental result of Venus image.
Fig. 3 (c) is the right experimental result of Teddy image.
Fig. 3 (d) is the right experimental result of Cones image.
Fig. 4 (a) is the experimental result under same light photograph and conditions of exposure.
Fig. 4 (b) is the experimental result under different illumination conditions.
Fig. 4 (c) is the experimental result under different exposure.
Fig. 4 (d) is the experimental result under different light and conditions of exposure.
Embodiment:
Be described in further detail the present invention below in conjunction with the drawings and the specific embodiments.
The present invention proposes a kind of matching process based on improving gradient coupling cost and self-adapting window, mainly contain four steps.
Step 1: coupling cost is calculated.Concrete methods of realizing is as follows:
Image gradient is defined as the single order partial derivative of image along x and y direction:
G = G x G y = ∂ I ∂ x ∂ I ∂ y - - - ( 1 )
Wherein I is gradation of image, in practical application, and can be by the formwork calculation gradient vector of horizontal direction and vertical direction.Like this, we just can obtain the gradient map G of left and right image l=(G lx, G ly) t, G r=(G rx, G ry) t; Consider the image after proofreading and correct, establishing p (x, y) is a bit on left image, and on right image, the match point of corresponding parallax d is pd (x-d, y).
Utilize two components of gradient vector in x, y direction, mould and the phase angle of definition gradient vector:
m = G x 2 + G y 2 - - - ( 2 )
The mould m of gradient characterizes rate of gray level, phase angle direction while characterizing rate of gray level maximum, they provide the different information of neighborhood of pixels, and illumination distortion is had to different unchangeability.Input picture can affect gradient-norm to gain distortions, and phase angle can not change, but they can not be subject to bias distortion impact.Thereby, the mould of gradient and phase angle are separately considered to be more conducive to the susceptibility of control method to noise.The present invention adopts the linearity of mould and phase angle to be combined as coupling cost function, to utilize to greatest extent gradient information.Be expressed as follows:
M in formula c, represent respectively corresponding to coloured image R, G, gradient mode and the phase angle of tri-passages of B, α is weighting coefficient.Because phase angle is taking π as the cycle, need to be normalized in the monocycle, therefore definition f:
f ( x ) = x 0 &le; x &le; &pi; 2 &pi; - x &pi; < x < 2 &pi; - - - ( 5 )
Owing to having introduced weighting coefficient α, we can be by adjusting the value change method of the parameter alpha robustness to illumination distortion and noise.α is less, and the impact of phase place is larger, and α is larger, and the impact of mould value is larger.Because different images has illumination distortion in various degree, in reality, need to come by experiment to determine the reasonable value scope of α.
Due to e (p, d) represent be the original match cost of single pixel, in actual conditions, still can there are some excessive exceptional values, need to get rid of to improve matching precision.Conventional method is to adopt a truncated function, compares with a constant by e (p, d), gets its minimum value as coupling cost.The method is very little to the improvement of result, and the present invention adopts Geman-McClure function to process exceptional value:
&rho; ( x ) = x 2 x 2 + &sigma; 2 - - - ( 6 )
When input, x exceedes after certain value, and it will drop to 0 smoothly on the impact of output valve, and the coupling cost after conversion will converge to 1, and can be controlled by parameter σ.Thereby, no matter input original match cost much, after Geman-McClure functional transformation, its output valve will can not exceed 1.
Step 2: adaptive windows outlet structure.Concrete methods of realizing is as follows:
The core of method therefor of the present invention is to build self-adapting window according to the color of neighbor and spatial relation, and concrete construction process as shown in Figure 2.First, determine a right-angled intersection region of current pixel p to be matched according to picture structure and color information, this right-angled intersection district inclusion horizontal and vertical direction, uses respectively H (p) and V (p) to represent, the size in region is by the brachium of 4 directions determine, and can be according to the structure of image and color information adaptively modifying.With for example, the criterion of brachium is as follows:
1.D c(p i, p) < τ 1and D c(p i, p i+ (1,0)) < τ 1;
2.D s(p i,p)<L 1
3.D c(p i,p)<τ 2,L 2<D s(p i,p)<L 1
Wherein, D s(p i, p) be pixel p ipoor with the space length of p; D c(p i, p) be color difference, be defined as τ 1> τ 2, L 1>L 2, be default color threshold value and distance threshold.Criterion 1 not only defines p ithe color difference opposite sex with p requires p simultaneously iwith its right side neighbor p ithe color difference opposite sex of+(1,0) is less than τ 1, avoided brachium to stride across borderline region; Criterion 2 and 3 has been relaxed brachium scope, uses larger distance threshold L at low texture region 1can obtain larger window; And in the time that brachium exceedes preset value L 2time, will adopt stricter threshold tau 2ensure that brachium is only in the very close low texture region expansion of color, make high texture region and the degree of depth discontinuity zone window can be not excessive.
Utilize said method can determine respectively 4 brachiums and then obtain orthogonal right-angled intersection region H (p) and V (p):
H ( p ) = { ( x , y ) | x &Element; [ x p - h p - , x p + h p + ] , y = y p } V ( p ) = { ( x , y ) | x = x p , y &Element; [ y p - v p - , y p + v p + ] } - - - ( 7 )
Finally, along vertical direction, each pixel q in V (p) is repeated to said process, the adaptive region of trying to achieve any pixel p in image is:
U ( p ) = &cup; q &Element; V ( p ) H ( q ) - - - ( 8 )
Step 3: cost polymerization.Concrete methods of realizing is as follows:
The present invention will consider left and right image local support area separately symmetrically.For two corresponding match point p (x in the image of left and right, and pd (x-d y), y), utilize said method can generate respectively adaptive region U (p) and U'(pd), their associating public domain is defined as final support area by we:
U d(p)={(x,y)|(x,y)∈U(p),(x-d,y)∈U'(pd)} (9)
Then, in associating support area, original single pixel matching cost is carried out to polymerization, tries to achieve total cost in region:
E d ( p ) = 1 N &Sigma; q &Element; U d ( p ) e ( q , d ) - - - ( 10 )
In formula, N is zone of convergency U d(p) the total number of pixel in.Finally adopt " the victor is a king " (Winner-Takes-All (WTA)) strategy, in parallax interval, select the point of coupling Least-cost to carry out parallax selection as matching double points p point, obtain initial parallax:
d p 0 = arg min 0 &le; d &le; d max E d ( p ) - - - ( 11 )
Wherein d represents the possible parallax in disparity space, and its value is generally 0 to maximum disparity d maxbetween integer.
Step 4: parallax is refined.Concrete methods of realizing is as follows:
The present invention proposes one and based on the histogrammic parallax refined method of local parallax, initial parallax figure is further processed.For certain pixel p in disparity map, we construct a local parallax histogram centered by it within the scope of its neighborhood the number of times that in statistics field, each parallax value occurs.In histogram, will there is a peak value, represent the maximum times that parallax occurs.The parallax value that this peak value is corresponding is the optimum parallax value in statistical significance the present invention adopts this optimal value to replace the initial parallax of pixel p
This process has been utilized the self-adapting window that generates in the previous step neighborhood as pixel, thereby does not produce extra computation burden.In addition, the present invention carries out iteration three times to this process, makes optimum parallax value more accurate.
Then, adopt left and right consistency check to detect the Mismatching point still existing, be labeled as available point by the point of consistency check, otherwise be Null Spot.For the Mismatching point detecting, first available point of horizontal scan direction left and right, and utilize the value that in both, parallax is less to carry out assignment to Mismatching point.
For the validity of verification method, on VS2008 platform, to the inventive method realization of programming, and the standard stereotome of being issued by Middlebury website that adopts academic circles at present to generally acknowledge is tested and is evaluated and tested method.This website provides 4 groups of reference color images to Tsukuba, Venus, Teddy and Cones, and corresponding real depth map.Experimental result and true disparity map (Ground truth) relatively can be obtained to the matching error quantizing, thus evaluation method precision objectively.Table 1 is that the inventive method is at limits of error δ dthe mistake matched pixel number percent data of=1 o'clock.The row at Noocc, All, Disc place be respectively unshielding region mistake matched pixel ratio, always by mistake matched pixel than and degree of depth discontinuity zone mistake matched pixel ratio.And with GC+occ (referring to Kolmogorov V, Rabih R.Computing visual correspondence with occlusions using graph cuts[C] .IEEE Conference on Computer Vision, 2001.), SemiGlob (referring to Hirschm ü ller H.Accurate and efficient stereo processing by semi-global matching and mutual information[J] .IEEE Transactions on Pattern Analysis and Machine Intelligence, 2008,30 (2): 328-341.), AdaptWeight is (referring to Yoon K, Kweon S.Locally adaptive support weight approch for visual correspondence search[J] .IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006,28 (4): 924-931.) and Enhanced BP (referring to Larsen S, Mordohai P, Pollefeys M et al.Temporally consistent reconstruction from multiple video streams using enhanced belief propagation[C] .IEEE International Conference on Computer Vision, 2007:1-8.) method contrasts.
Table 1 matching result objective evaluation
Fig. 3 has reacted the precision of the inventive method operation result intuitively.(a), (b), (c), (d) are followed successively by Tsukuba, Venus, Teddy and the right experimental result of Cones image; In figure, the 1st classifies original image to be matched as; The 2nd classifies corresponding true disparity map as; The 3rd classifies the disparity map that the inventive method obtains as; The 4th classifies the mistake matched pixel figure of the inventive method as, and in figure, white bulk zone is the point that coupling is correct, and gray area and black region represent respectively the Mismatching point in occlusion area and unobstructed region.
Fig. 4 is the operation result of the present invention under illumination distortion condition, and is that the method for mating cost compares with using traditional gray scale absolute difference (AD), to verify the robustness of the inventive method to illumination distortion.As shown in Figure 4, in figure, (a), (b), (c), (d) are respectively the experimental result under same light photograph and exposure, different light, different exposure and different light and conditions of exposure to experimental result.The 1st of every group of result classified original left image as, and the 2nd classifies original right image as, and the 3rd classifies the Variable Cross method matching result that adopts SAD coupling cost as, and the 4th classifies the inventive method matching result as.Experimental result shows, the present invention, owing to having adopted the gradient information that amplitude distortion is had to repellence as coupling cost, in the situation that having illumination distortion, still can obtain the matching result that precision is higher, has good robustness.

Claims (4)

1.一种基于改进梯度和自适应窗口的立体匹配方法,其特征在于:该方法在传统梯度匹配代价仅包含幅值信息的基础上,引入梯度相位信息,并对原始匹配代价进行变换,进一步消除异常值;然后利用图像结构和色彩信息构建自适应窗口进行代价聚合及“胜者为王”(Winner-Takes-All(WTA))策略进行视差选择;最后,提出一种局部视差直方图的视差精化方法,获得了高精度的视差图。方法具体步骤如下:1. A stereo matching method based on improved gradient and adaptive window, characterized in that: the method introduces gradient phase information on the basis that the traditional gradient matching cost only includes magnitude information, and transforms the original matching cost, further Eliminate outliers; then use the image structure and color information to construct an adaptive window for cost aggregation and "Winner-Takes-All (WTA)" strategy for disparity selection; finally, a local disparity histogram is proposed The disparity refinement method obtains a high-precision disparity map. The specific steps of the method are as follows: 步骤一:匹配代价计算:匹配代价是左右图像之间对应点相似度的度量,利用梯度向量在图像x、y方向的两个分量,定义梯度向量的模m和相角然后采用模和相角的线性结合作为匹配代价函数,以便最大限度利用梯度信息。最后利用Geman-McClure函数对原始匹配代价函数进行变换以消除异常代价值的影响。Step 1: Matching cost calculation: The matching cost is a measure of the similarity of corresponding points between the left and right images. Using the two components of the gradient vector in the x and y directions of the image, define the modulus m and phase angle of the gradient vector A linear combination of magnitude and phase angle is then adopted as the matching cost function to maximize the use of gradient information. Finally, the Geman-McClure function is used to transform the original matching cost function to eliminate the influence of abnormal cost value. 步骤二:自适应窗口构造:对待匹配图像的每个像素构造一个自适应大小的聚合窗口,窗口的大小将直接决定参与聚合的邻域像素多少。本发明采用一种改进的十字交叉自适应窗口生成方法,可以根据相邻像素的色彩和空间位置关系构建自适应窗口。在低纹理区域,提供较大的窗口以提高匹配精度;而在高纹理区域则产生较小的窗口,以保护物体边缘等细节信息。Step 2: Adaptive window construction: Construct an adaptive size aggregation window for each pixel of the image to be matched, and the size of the window will directly determine the number of neighboring pixels participating in the aggregation. The invention adopts an improved cross adaptive window generation method, which can construct an adaptive window according to the color and spatial position relationship of adjacent pixels. In low-texture areas, larger windows are provided to improve matching accuracy; while in high-texture areas, smaller windows are generated to protect details such as object edges. 步骤三:代价聚合:确定每个像素的自适应窗口之后,需对窗口内每个单像素的原始匹配代价进行聚合获得总代价,最后选择使总代价最小对应的视差值作为初始匹配结果。Step 3: Cost aggregation: After determining the adaptive window for each pixel, it is necessary to aggregate the original matching cost of each single pixel in the window to obtain the total cost, and finally select the disparity value corresponding to the minimum total cost as the initial matching result. 步骤四:视差精化:通过上述步骤得到的初始视差与真实视差还存在一些误匹配点和不可信值,需要进行视差精化处理。本发明提出一种基于局部视差直方图的视差精化方法对初始视差图进行进一步处理。然后,采用左右一致性检验检测仍然存在的误匹配点,利用相邻有效点中视差较小的值对误匹配点进行赋值。Step 4: Disparity refinement: There are still some mismatching points and unreliable values between the initial disparity obtained through the above steps and the real disparity, and disparity refinement processing is required. The present invention proposes a parallax refinement method based on a local parallax histogram to further process the initial parallax map. Then, the left-right consistency test is used to detect the still existing mis-matching points, and the value of the mis-matching points is assigned with the value of the smaller parallax among the adjacent valid points. 2.根据权利要求1中所述的一种基于改进梯度和自适应窗口的立体匹配方法,其特征在于:所述步骤一的匹配代价应用改进的梯度代价,具体计算过程如下:2. according to a kind of stereo matching method based on improved gradient and adaptive window described in claim 1, it is characterized in that: the gradient cost of the matching cost application improvement of described step 1, concrete calculation process is as follows: 图像梯度定义为图像沿x和y方向的一阶偏导数:The image gradient is defined as the first-order partial derivative of the image along the x and y directions: GG == GG xx GG ythe y == &PartialD;&PartialD; II &PartialD;&PartialD; xx &PartialD;&PartialD; II &PartialD;&PartialD; ythe y 其中I为图像灰度,实际应用中,可以通过水平方向和竖直方向的模板计算梯度向量。这样,我们就可以得到左、右图像的梯度图GL=(GLx,GLy)T、GR=(GRx,GRy)T;考虑校正后的图像,设p(x,y)为左图像上一点,则右图像上对应视差d的匹配点为pd(x-d,y)。Where I is the grayscale of the image. In practical applications, the gradient vector can be calculated through templates in the horizontal and vertical directions. In this way, we can get the gradient maps of the left and right images G L =(G Lx ,G Ly ) T , G R =(G Rx ,G Ry ) T ; considering the corrected image, set p(x,y) is a point on the left image, then the matching point corresponding to the parallax d on the right image is pd(xd,y). 利用梯度向量在x、y方向的两个分量,定义梯度向量的模和相角:Using the two components of the gradient vector in the x and y directions, define the magnitude and phase angle of the gradient vector: mm == GG xx 22 ++ GG ythe y 22 梯度的模m表征灰度变化率,相角表征灰度变化率最大时的方向,它们提供了像素邻域的不同信息,并且对光照失真有不同的不变性。输入图像对增益失真会影响梯度模,而相角则不会变化,但是它们都不会受到偏置失真影响。因而,将梯度的模和相角分开考虑更有利于控制方法对噪声的敏感性。本发明采用模和相角的线性结合作为匹配代价函数,以便最大限度利用梯度信息。表达如下:The modulus m of the gradient represents the rate of change of the gray level, and the phase angle Characterizing the direction when the rate of gray change is the largest, they provide different information about the pixel neighborhood and have different invariance to illumination distortion. The input image's gain distortion affects the gradient mode, while the phase angle does not change, but neither of them is affected by the bias distortion. Therefore, it is more beneficial to control the sensitivity of the method to noise if the mode and phase angle of the gradient are considered separately. The present invention adopts the linear combination of modulus and phase angle as the matching cost function, so as to maximize the utilization of gradient information. The expression is as follows: 式中mc分别表示对应于彩色图像R,G,B三个通道的梯度向量模和相角,α是加权系数。由于相角是以π为周期,需要将其归一化到单周期内,故定义f(x):where m c , Respectively represent the gradient vector modulus and phase angle corresponding to the three channels of the color image R, G, and B, and α is the weighting coefficient. Since the phase angle is π as a period, it needs to be normalized to a single period, so define f(x): ff (( xx )) == xx 00 &le;&le; xx &le;&le; &pi;&pi; 22 &pi;&pi; -- xx &pi;&pi; << xx << 22 &pi;&pi; 由于引入了加权系数α,我们可以通过调整参数α的值改变方法对光照失真和噪声的鲁棒性。α越小,相位的影响越大,α越大,模值的影响越大。由于不同的图像会有不同程度的光照失真,实际中需要通过实验来确定α的合理取值范围。Due to the introduction of the weighting coefficient α, we can change the robustness of the method to illumination distortion and noise by adjusting the value of the parameter α. The smaller the α, the greater the influence of the phase, and the greater the α, the greater the influence of the modulus. Since different images will have different degrees of illumination distortion, it is necessary to determine the reasonable value range of α through experiments in practice. 由于e(p,d)表示的是单个像素的原始匹配代价,实际情况中仍然会存在一些过大的异常值,需要进行排除以提高匹配精度。一种常用的方法是采用截尾函数,即将e(p,d)与一个常数进行比较,取其最小值作为匹配代价。该方法对结果的改善很小,本发明采用Geman-McClure函数来处理异常值:Since e(p,d) represents the original matching cost of a single pixel, there will still be some overly large outliers in the actual situation, which need to be excluded to improve the matching accuracy. A commonly used method is to use a truncated function, that is, to compare e(p,d) with a constant, and take the minimum value as the matching cost. This method improves the result very little, and the present invention adopts the Geman-McClure function to handle outliers: &rho;&rho; (( xx )) == xx 22 xx 22 ++ &sigma;&sigma; 22 当输入x超过某个值后,其对输出值的影响将平滑地下降到0,变换后的匹配代价将收敛到1,并可由参数σ控制。因而,无论输入原始匹配代价多大,经过Geman-McClure函数变换后,其输出值将不会超过1。When the input x exceeds a certain value, its influence on the output value will smoothly drop to 0, and the transformed matching cost will converge to 1, which can be controlled by the parameter σ. Therefore, no matter how much the original matching cost of the input is, after the Geman-McClure function transformation, its output value will not exceed 1. 3.根据权利要求1中所述的一种基于改进梯度和自适应窗口的立体匹配方法,其特征在于:所述步骤二和步骤三应用改进的十字交叉自适应窗口生成方法,具体过程如下:3. according to a kind of stereo matching method based on improved gradient and adaptive window described in claim 1, it is characterized in that: described step 2 and step 3 application improved cross adaptive window generation method, concrete process is as follows: 首先,根据图像结构和色彩信息确定当前待匹配像素p的一个十字交叉区域,该十字交叉区域包含水平和垂直方向,分别用H(p)和V(p)表示,区域的大小由4个方向的臂长确定,并可根据图像的结构和色彩信息自适应地改变。以为例,臂长的判别准则如下:First, according to the image structure and color information, determine a cross area of the current pixel p to be matched. The cross area includes horizontal and vertical directions, denoted by H(p) and V(p) respectively, and the size of the area consists of four directions arm length Determined, and can be adaptively changed according to the structure and color information of the image. by For example, the criteria for judging the arm length are as follows: 1.Dc(pi,p)<τ1和Dc(pi,pi+(1,0))<τ11. D c (p i ,p)<τ 1 and D c (p i ,p i +(1,0))<τ 1 ; 2.Ds(pi,p)<L12.D s (p i ,p)<L 1 ; 3.Dc(pi,p)<τ2,L2<Ds(pi,p)<L13. D c (p i ,p)<τ 2 , L 2 <D s (p i ,p)<L 1 . 其中,Ds(pi,p)为像素pi和p的空间距离差;Dc(pi,p)是色彩差,定义为τ12,L1>L2,为预设的色彩阈值和距离阈值。准则1不仅限定了pi和p的色彩差异性,同时要求pi和其右侧相邻像素pi+(1,0)的色彩差异性小于τ1,避免了臂长跨过边界区域;准则2和3放宽了臂长范围,在低纹理区域使用较大的距离阈值L1可以获得较大的窗口;而当臂长超过预设值时L2时,将采用更严格的阈值τ2来保证臂长仅在颜色非常相近的低纹理区域扩展,使高纹理区域和深度不连续区域窗口不会过大。Among them, D s (p i ,p) is the spatial distance difference between pixels p i and p; D c (p i ,p) is the color difference, defined as τ 12 , L 1 >L 2 , are preset color thresholds and distance thresholds. Criterion 1 not only limits the color difference between p i and p, but also requires the color difference between p i and its right adjacent pixel p i + (1,0) to be less than τ 1 , so as to avoid the arm length crossing the boundary area; Criteria 2 and 3 relax the range of arm length, and a larger window can be obtained by using a larger distance threshold L 1 in low-textured areas; and when the arm length exceeds the preset value L 2 , a stricter threshold τ 2 will be used To ensure that the arm length is only extended in low-textured areas with very similar colors, so that the windows of high-textured areas and depth discontinuous areas will not be too large. 利用上述方法可分别确定4个臂长进而得到正交的十字交叉区域H(p)和V(p):Using the above method, the four arm lengths can be determined respectively In turn, the orthogonal crossing areas H(p) and V(p) are obtained: Hh (( pp )) == {{ (( xx ,, ythe y )) || xx &Element;&Element; [[ xx pp -- hh pp -- ,, xx pp ++ hh pp ++ ]] ,, ythe y == ythe y pp }} VV (( pp )) == {{ (( xx ,, ythe y )) || xx == xx pp ,, ythe y &Element;&Element; [[ ythe y pp -- vv pp -- ,, ythe y pp ++ vv pp ++ ]] }} 最后,沿着竖直方向对V(p)中每个像素q重复上述过程,求得图像中任意像素p的自适应区域为:Finally, repeat the above process for each pixel q in V(p) along the vertical direction, and obtain the adaptive area of any pixel p in the image as: Uu (( pp )) == &cup;&cup; qq &Element;&Element; VV (( pp )) Hh (( qq )) 本发明将对称地考虑左、右图像各自的局部支持区域。对于左右图像中两个对应的匹配点p(x,y)和pd(x-d,y),利用上述方法可分别生成自适应区域U(p)和U'(pd),将它们的联合公共区域确定为最终的支持区域:The present invention will symmetrically consider the respective local regions of support of the left and right images. For the two corresponding matching points p(x,y) and pd(x-d,y) in the left and right images, the above method can be used to generate adaptive regions U(p) and U'(pd) respectively, and their joint common region Areas of support identified as final: Ud(p)={(x,y)|(x,y)∈U(p),(x-d,y)∈U'(pd)}U d (p)={(x,y)|(x,y)∈U(p),(xd,y)∈U'(pd)} 然后,在联合支持区域内对原始的单像素匹配代价进行聚合,求得区域内总代价:Then, the original single-pixel matching cost is aggregated in the joint support region to obtain the total cost in the region: EE. dd (( pp )) == 11 NN &Sigma;&Sigma; qq &Element;&Element; Uu dd (( pp )) ee (( qq ,, dd )) 式中,N为聚合区域Ud(p)内的像素总个数。最后采用“胜者为王”(Winner-Takes-All(WTA))策略,在视差区间内选择匹配代价最小的点作为匹配点对p点进行视差选择,获得初始视差:In the formula, N is the total number of pixels in the aggregation area U d (p). Finally, the "Winner-Takes-All (WTA)" strategy is adopted, and the point with the smallest matching cost is selected as the matching point in the disparity interval to select the disparity of point p to obtain the initial disparity: dd pp 00 == argarg minmin 00 &le;&le; dd &le;&le; dd maxmax EE. dd (( pp )) 其中d表示视差空间中的可能视差,其取值一般为0到最大视差dmax之间的整数。Where d represents the possible disparity in the disparity space, and its value is generally an integer between 0 and the maximum disparity d max . 4.根据权利要求1中所述的一种基于改进梯度和自适应窗口的立体匹配方法,其特征在于:所述步骤四提出了基于局部视差直方图的视差精化方法,具体计算过程如下:4. according to a kind of stereo matching method based on improved gradient and adaptive window described in claim 1, it is characterized in that: described step 4 proposes the parallax refinement method based on local parallax histogram, and concrete calculation process is as follows: 对于视差图中某个像素p,以其为中心,在它的邻域范围内构造一个局部视差直方图统计领域内每个视差值出现的次数。在直方图中将出现一个峰值,表示视差出现的最大次数。该峰值对应的视差值是统计意义上的最优视差值本发明采用这一最优值代替像素p的初始视差 For a certain pixel p in the disparity map, construct a local disparity histogram in its neighborhood with it as the center Counts the number of occurrences of each disparity value within the domain. A peak will appear in the histogram, representing the maximum number of occurrences of parallax. The disparity value corresponding to this peak is the optimal disparity value in the statistical sense The present invention uses this optimal value to replace the initial disparity of pixel p 此过程利用了前一步骤中生成的自适应窗口作为像素的邻域,因而没有产生额外的计算负担。另外,本发明对这一过程进行三次迭代,使最优视差值更加准确。This process utilizes the adaptive window generated in the previous step as a neighborhood of pixels, thus incurring no additional computational burden. In addition, the present invention performs three iterations on this process to make the optimal parallax value more accurate. 然后,采用左右一致性检验检测仍然存在的误匹配点,通过一致性检验的点标记为有效点,反之则为无效点。对于检测到的误匹配点,扫描水平方向左右第一个有效点,并利用两者中视差较小的值对误匹配点进行赋值。Then, the left-right consistency test is used to detect the still existing mismatch points, and the points that pass the consistency test are marked as valid points, otherwise they are invalid points. For the detected mismatching points, scan the first effective point on the left and right in the horizontal direction, and use the value of the smaller parallax between the two to assign a value to the mismatching point.
CN201410258432.2A 2014-06-11 2014-06-11 Stereo matching method based on improved gradient and adaptive window Pending CN103996201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410258432.2A CN103996201A (en) 2014-06-11 2014-06-11 Stereo matching method based on improved gradient and adaptive window

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410258432.2A CN103996201A (en) 2014-06-11 2014-06-11 Stereo matching method based on improved gradient and adaptive window

Publications (1)

Publication Number Publication Date
CN103996201A true CN103996201A (en) 2014-08-20

Family

ID=51310356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410258432.2A Pending CN103996201A (en) 2014-06-11 2014-06-11 Stereo matching method based on improved gradient and adaptive window

Country Status (1)

Country Link
CN (1) CN103996201A (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574391A (en) * 2014-12-29 2015-04-29 西安交通大学 Stereoscopic vision matching method based on adaptive feature window
CN105513069A (en) * 2015-12-08 2016-04-20 天津大学 Stereo matching method based on guide filtering and sensitive area
CN105631887A (en) * 2016-01-18 2016-06-01 武汉理工大学 Two step parallax improvement method based on adaptive support weight matching algorithm and system
CN105787932A (en) * 2016-02-07 2016-07-20 哈尔滨师范大学 Stereo matching method based on segmentation cross trees
CN107316326A (en) * 2017-06-29 2017-11-03 海信集团有限公司 Applied to disparity map computational methods of the binocular stereo vision based on side and device
CN107397658A (en) * 2017-07-26 2017-11-28 成都快眼科技有限公司 A kind of multiple dimensioned full convolutional network and vision blind-guiding method and device
CN107481271A (en) * 2017-07-25 2017-12-15 成都通甲优博科技有限责任公司 A kind of solid matching method, system and mobile terminal
CN107578430A (en) * 2017-07-26 2018-01-12 昆明理工大学 A Stereo Matching Method Based on Adaptive Weight and Local Entropy
CN108322724A (en) * 2018-02-06 2018-07-24 上海兴芯微电子科技有限公司 Image solid matching method and binocular vision equipment
CN108682026A (en) * 2018-03-22 2018-10-19 辽宁工业大学 A kind of binocular vision solid matching method based on the fusion of more Matching units
CN109564691A (en) * 2016-06-01 2019-04-02 弗劳恩霍夫应用研究促进协会 Device and method for executing 3D estimation based on locally determining 3D information hypothesis
CN109658443A (en) * 2018-11-01 2019-04-19 北京华捷艾米科技有限公司 Stereo vision matching method and system
CN109741389A (en) * 2018-11-27 2019-05-10 华南农业大学 One kind being based on the matched sectional perspective matching process of region base
CN110246169A (en) * 2019-05-30 2019-09-17 华中科技大学 A kind of window adaptive three-dimensional matching process and system based on gradient
CN112348871A (en) * 2020-11-16 2021-02-09 长安大学 Local stereo matching method
CN113077504A (en) * 2021-04-12 2021-07-06 中国电子科技集团公司第二十八研究所 Large scene depth map generation method based on multi-granularity feature matching
CN113822915A (en) * 2021-07-30 2021-12-21 济宁安泰矿山设备制造有限公司 Image Stereo Matching Method for Fault Diagnosis of Smart Pump Chamber Endoscope
CN114332790A (en) * 2021-11-24 2022-04-12 华人运通(上海)自动驾驶科技有限公司 A binocular vision 3D target detection method, storage medium and terminal device

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104574391A (en) * 2014-12-29 2015-04-29 西安交通大学 Stereoscopic vision matching method based on adaptive feature window
CN105513069A (en) * 2015-12-08 2016-04-20 天津大学 Stereo matching method based on guide filtering and sensitive area
CN105631887A (en) * 2016-01-18 2016-06-01 武汉理工大学 Two step parallax improvement method based on adaptive support weight matching algorithm and system
CN105631887B (en) * 2016-01-18 2019-10-25 武汉理工大学 Two-step Parallax Improvement Method and System Based on Adaptive Support Weight Matching Algorithm
CN105787932A (en) * 2016-02-07 2016-07-20 哈尔滨师范大学 Stereo matching method based on segmentation cross trees
CN105787932B (en) * 2016-02-07 2019-03-29 哈尔滨师范大学 Solid matching method based on segmentation Cross-Tree
CN109564691B (en) * 2016-06-01 2023-09-01 弗劳恩霍夫应用研究促进协会 Apparatus and method for performing 3D estimation based on locally determined 3D information hypotheses
CN109564691A (en) * 2016-06-01 2019-04-02 弗劳恩霍夫应用研究促进协会 Device and method for executing 3D estimation based on locally determining 3D information hypothesis
CN107316326A (en) * 2017-06-29 2017-11-03 海信集团有限公司 Applied to disparity map computational methods of the binocular stereo vision based on side and device
CN107316326B (en) * 2017-06-29 2020-10-30 海信集团有限公司 Edge-based disparity map calculation method and device applied to binocular stereo vision
CN107481271A (en) * 2017-07-25 2017-12-15 成都通甲优博科技有限责任公司 A kind of solid matching method, system and mobile terminal
CN107481271B (en) * 2017-07-25 2020-08-11 成都通甲优博科技有限责任公司 Stereo matching method, system and mobile terminal
CN107578430B (en) * 2017-07-26 2021-01-05 昆明理工大学 Stereo matching method based on self-adaptive weight and local entropy
CN107578430A (en) * 2017-07-26 2018-01-12 昆明理工大学 A Stereo Matching Method Based on Adaptive Weight and Local Entropy
CN107397658A (en) * 2017-07-26 2017-11-28 成都快眼科技有限公司 A kind of multiple dimensioned full convolutional network and vision blind-guiding method and device
CN107397658B (en) * 2017-07-26 2020-06-19 成都快眼科技有限公司 Multi-scale full-convolution network and visual blind guiding method and device
CN108322724B (en) * 2018-02-06 2019-08-16 上海兴芯微电子科技有限公司 Image solid matching method and binocular vision equipment
CN108322724A (en) * 2018-02-06 2018-07-24 上海兴芯微电子科技有限公司 Image solid matching method and binocular vision equipment
CN108682026B (en) * 2018-03-22 2021-08-06 江大白 Binocular vision stereo matching method based on multi-matching element fusion
CN108682026A (en) * 2018-03-22 2018-10-19 辽宁工业大学 A kind of binocular vision solid matching method based on the fusion of more Matching units
CN109658443A (en) * 2018-11-01 2019-04-19 北京华捷艾米科技有限公司 Stereo vision matching method and system
CN109741389B (en) * 2018-11-27 2023-05-16 华南农业大学 A Local Stereo Matching Method Based on Region-Based Matching
CN109741389A (en) * 2018-11-27 2019-05-10 华南农业大学 One kind being based on the matched sectional perspective matching process of region base
CN110246169A (en) * 2019-05-30 2019-09-17 华中科技大学 A kind of window adaptive three-dimensional matching process and system based on gradient
CN112348871A (en) * 2020-11-16 2021-02-09 长安大学 Local stereo matching method
CN112348871B (en) * 2020-11-16 2023-02-10 长安大学 A Local Stereo Matching Method
CN113077504A (en) * 2021-04-12 2021-07-06 中国电子科技集团公司第二十八研究所 Large scene depth map generation method based on multi-granularity feature matching
CN113077504B (en) * 2021-04-12 2021-11-12 中国电子科技集团公司第二十八研究所 Depth map generation method for large scenes based on multi-granularity feature matching
CN113822915A (en) * 2021-07-30 2021-12-21 济宁安泰矿山设备制造有限公司 Image Stereo Matching Method for Fault Diagnosis of Smart Pump Chamber Endoscope
CN114332790A (en) * 2021-11-24 2022-04-12 华人运通(上海)自动驾驶科技有限公司 A binocular vision 3D target detection method, storage medium and terminal device

Similar Documents

Publication Publication Date Title
CN103996201A (en) Stereo matching method based on improved gradient and adaptive window
CN112488210B (en) A method for automatic classification of 3D point clouds based on graph convolutional neural networks
CN103996202A (en) Stereo matching method based on hybrid matching cost and adaptive window
CN102006425B (en) Method for splicing video in real time based on multiple cameras
CN104867135B (en) A kind of High Precision Stereo matching process guided based on guide image
CN109887021B (en) Stereo matching method based on cross-scale random walk
CN107506711A (en) Binocular vision obstacle detection system and method based on convolutional neural networks
CN108648161A (en) The binocular vision obstacle detection system and method for asymmetric nuclear convolutional neural networks
CN110246151B (en) A method for underwater robot target tracking based on deep learning and monocular vision
CN113763269A (en) Stereo matching method for binocular images
CN101625768A (en) Three-dimensional human face reconstruction method based on stereoscopic vision
CN105205818A (en) Method for registering infrared image and visible light image of electrical equipment
CN110111292A (en) A kind of infrared and visible light image fusion method
CN107146248A (en) A kind of solid matching method based on double-current convolutional neural networks
Zhang et al. The farther the better: Balanced stereo matching via depth-based sampling and adaptive feature refinement
Zhu et al. Stereo matching algorithm with guided filter and modified dynamic programming
CN108010075A (en) A kind of sectional perspective matching process based on multiple features combining
Liu et al. Geometry-enhanced attentive multi-view stereo for challenging matching scenarios
CN115471397A (en) Multi-modal image registration method based on parallax estimation
Wang et al. Underwater terrain image stitching based on spatial gradient feature block
CN118015059A (en) A noise-resistant stereo matching method and system based on improved Census transformation
RU2582853C2 (en) Device for determining distance and speed of objects based on stereo approach
CN118711158A (en) A template matching image ranging method based on dynamic weight multi-feature fusion
Gao et al. Joint depth and normal estimation from real-world time-of-flight raw data
Zhu et al. A Stereo Matching and Depth Map Acquisition Algorithm Based on Deep Learning and Improved Winner Takes All-Dynamic Programming

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: 20140820

RJ01 Rejection of invention patent application after publication