WO2018098891A1 - Stereo matching method and system - Google Patents

Stereo matching method and system Download PDF

Info

Publication number
WO2018098891A1
WO2018098891A1 PCT/CN2017/070639 CN2017070639W WO2018098891A1 WO 2018098891 A1 WO2018098891 A1 WO 2018098891A1 CN 2017070639 W CN2017070639 W CN 2017070639W WO 2018098891 A1 WO2018098891 A1 WO 2018098891A1
Authority
WO
WIPO (PCT)
Prior art keywords
parallax
point
points
support
pixel
Prior art date
Application number
PCT/CN2017/070639
Other languages
French (fr)
Chinese (zh)
Inventor
唐荣富
余勤力
周剑
龙学军
徐一丹
Original Assignee
成都通甲优博科技有限责任公司
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 成都通甲优博科技有限责任公司 filed Critical 成都通甲优博科技有限责任公司
Publication of WO2018098891A1 publication Critical patent/WO2018098891A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • G06F18/24155Bayesian classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Definitions

  • the present invention relates to the field of computer vision technology, and in particular, to a stereo matching method and system.
  • Stereo dense matching refers to the correspondence between the features of the same spatial physical point in different images according to the calculation of the selected features and the correspondence between the features.
  • Stereo matching is an important hotspot and difficulty in computer vision research. It is one of the key technologies in many applications such as robotics, medicine and artificial intelligence. In recent years, with the development of mobile platforms, the accuracy and real-time requirements of the stereo matching method have been continuously improved.
  • the stereo matching algorithm is decomposed into four steps: matching cost calculation, matching cost aggregation, disparity calculation, and parallax refinement. According to different constraints, the stereo matching algorithm can be divided into local matching algorithm and global matching algorithm.
  • the global stereo matching algorithm mainly estimates the parallax through the global optimization theory method, establishes the global energy function, and then obtains the optimal disparity value by minimizing the global energy function.
  • the global matching algorithm obtains higher accuracy than the local algorithm, but it is computationally intensive and time consuming, and is not suitable for real-time applications.
  • the main algorithms are graph cuts, belief propagation, semi-global matching, dynamic programing, and so on.
  • a research direction of stereo matching is a machine learning method using a convolutional neural network, which can obtain an accuracy equal to or higher than that of the classical global algorithm.
  • the local matching algorithm mainly uses the local optimization method to estimate the disparity value. Like the global stereo matching algorithm, the parallax estimation is also performed by the energy minimization method. The difference is that in the energy function, the local matching algorithm has only data items, but no smoothing. item. Because the local matching algorithm is sensitive to changes in illumination intensity and contrast, when the image has repeated texture features, weak texture and severe occlusion, the probability of false matching is high.
  • Commonly used local matching algorithms mainly include SAD (sum of absolute differences algorithm, CT (census transform) algorithm, ASW (adaptive support) Weight) algorithm, ELAS (efficient large area stereo matching) algorithm, IDR (iterative dense refinement) algorithm, and the like.
  • the SAD algorithm calculates the absolute value of the corresponding pixel difference of the local window.
  • the CT algorithm first transforms the window region, and then calculates the matching cost according to the Hamming distance metric.
  • the SAD and CT methods are simple and fast to implement, but with low accuracy.
  • the ASW algorithm changes the single weight of the SAD algorithm, introduces the idea of adaptive weight, and obtains a high matching precision, but the amount of computation caused by the adaptive weight is very large.
  • the IDR algorithm uses a two-pass approach to simplify the implementation of ASW and adds an iterative improvement method to achieve higher accuracy.
  • the IDR algorithm structure is very conducive to parallel processing. It can get high computational efficiency after optimization under CUDA architecture.
  • IDR algorithm also has two main disadvantages: it runs slowly under non-CUDA architecture, and the memory overhead is very large.
  • the ELAS algorithm adopts a completely different idea from the above method: it first uses the sobel operator to obtain the strong texture support points of the image; then uses the support point geometry to perform Delaunay triangulation on the image to obtain the parallax plane estimation of the pixel; The sobel operator measure calculates the matching cost and uses the weighting method to obtain the optimal estimate of the disparity.
  • ELAS algorithm is one of the fastest running stereo matching algorithms, and its accuracy is also very high, suitable for real-time applications.
  • the main shortcomings of the ELAS algorithm are: the algorithm structure is not conducive to parallelization, and there are some cases where pixel points cannot be calculated.
  • the object of the present invention is to provide a stereo matching method and system, which realizes fast matching to obtain a high-precision parallax map, and is particularly suitable for a mobile platform or an application field with high real-time requirements.
  • the present invention provides a stereo matching method, including:
  • the Delaunay triangle Constructing a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
  • the disparity condition probability and the parallax confidence level are calculated by using a Bayesian principle to obtain an optimal a posteriori parallax.
  • extract feature points of the left and right images, and perform feature point matching on the feature points to determine support points including:
  • the feature points are extracted from the left and right graphs by using the FAST operator, and the feature description is performed by using theRIEF;
  • the feature points are matched by the polar line constraint and the Hamming distance in the feature description, and the feature points with successful matching are used as the support points.
  • constructing a Delaunay triangle according to the support point includes:
  • Gaussian model Calculating a prior probability P(dn
  • D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle
  • ⁇ p m ⁇
  • is the variance
  • m is the constant parameter
  • dp is the disparity estimate determined by the support point
  • dp au p +bv p +c
  • the parameters a, b, c are obtained by fitting three support point planes
  • dn is the support point disparity value
  • u p and v p are the abscissa and ordinate of the pixel point, respectively.
  • the parallax calculation method is used to calculate the parallax condition probability and the parallax confidence level of the pixel points in the left image, including:
  • the parallax condition probability and the parallax confidence level of the pixel points in the left picture are calculated by using an improved census transform stereo matching algorithm.
  • the disparity condition probability and the disparity confidence level using a Bayesian principle to calculate an optimal a posteriori parallax, including:
  • f(dn) is the Hamming distance of the improved census transform stereo matching algorithm
  • f m (d) is the confidence level function of the conditional parallax
  • S is the support point
  • O is based on some local stereo matching operator.
  • Matching cost ⁇ is the weight parameter.
  • the stereo matching method further includes:
  • the left and right consistency detection method is used to detect the mismatched points in the disparity map.
  • the method further includes:
  • the disparity values of the error matching points are replaced by the disparity values on the left and right sides of the mismatching point.
  • the invention also provides a stereo matching system comprising:
  • a support point determining module configured to extract feature points of the left and right images, and perform feature point matching on the feature points to determine a support point
  • a Delaunay triangle building module configured to construct a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
  • a probability calculation module configured to calculate a parallax condition probability and a parallax confidence level of a pixel point in the left image by using a parallax calculation method
  • the a posteriori parallax calculation module is configured to calculate an optimal a posteriori parallax by using a Bayesian principle according to the Delaunay triangle, the parallax condition probability and the parallax confidence level.
  • the Delaunay triangle building module includes:
  • a splitting unit for performing Delaunay triangulation on the set of support points of the left figure by using the divide and conquer method
  • Distance calculation unit for using formulas Calculating a minimum support distance m between the pixel point and the support point of the left image
  • Prior probability calculation unit for utilizing a Gaussian model Calculating a prior probability P(dn
  • D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle
  • ⁇ p m ⁇
  • is the variance
  • m is the constant parameter
  • dp is the disparity estimate determined by the support point
  • dp au p +bv p +c
  • the parameters a, b, c are obtained by fitting three support point planes
  • dn is the support point disparity value
  • u p and v p are the abscissa and ordinate of the pixel point, respectively.
  • the a posteriori parallax calculation module specifically uses a formula Calculating a module that obtains an optimal a posteriori parallax d * ;
  • f(dn) is the Hamming distance of the improved census transform stereo matching algorithm
  • f m (d) is the confidence level function of the conditional parallax
  • S is the support point
  • O is based on some local stereo matching operator.
  • Matching cost ⁇ is the weight parameter.
  • the stereo matching method comprises: extracting feature points of the left and right images, and performing feature point matching on the feature points to determine support points; constructing a Delaunay triangle according to the support points; wherein the Delaunay triangle includes the first parallax of all the pixels in the triangle Probability and the minimum support distance between the pixel and the support point; use the disparity calculation method to calculate the parallax condition probability and the parallax confidence level of the pixel in the left picture; according to the Delaunay triangle, the disparity condition probability and the disparity confidence level, calculate by Bayesian principle The optimal a posteriori parallax is obtained.
  • the method uses fast, high-precision and adaptive stereo matching method to achieve fast matching and obtain high-precision parallax map, which is especially suitable for mobile platforms or applications with high real-time requirements.
  • a stereo matching system is provided, which has the above-mentioned beneficial effects and will not be described herein.
  • FIG. 1 is a flowchart of a stereo matching method according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a stereo matching system according to an embodiment of the present invention.
  • the core of the invention is to provide a stereo matching method and system, which realizes fast matching to obtain a high-precision parallax map, and is particularly suitable for a mobile platform or an application field with high real-time requirements.
  • the general term of stereo matching is adopted, and the left image is used as a reference image, and the left and right images have been completed to perform camera calibration and stereo rectification.
  • FIG. 1 is a flowchart of a stereo matching method according to an embodiment of the present invention; the method may include:
  • S100 Extract feature points of the left and right images, and perform feature point matching on the feature points to determine support points;
  • the step is mainly for obtaining a support point, and the embodiment does not limit the extraction and matching algorithm of the specific feature point.
  • the selected algorithm should also have the characteristics of relatively simple computational logic. For example, when feature point matching is performed, feature point matching can be quickly performed by using polar line constraints and feature point descriptors, and the matching feature points are called support points.
  • the polar constraint reduces the matching search from two-dimensional to one-dimensional, greatly simplifying the complexity and increasing the calculation speed. Suitable for mobile platforms or applications with high real-time requirements.
  • extracting the feature points of the left and right images and performing feature point matching on the feature points to determine the support points may include:
  • the feature points are extracted from the left and right graphs by using the FAST operator, and the feature description is performed by using theRIEF;
  • the feature points are extracted from the left and right graphs by using the FAST (features from accelerated segment test) operator and characterized by a BRIEF Fiction (BRIEF).
  • FAST features from accelerated segment test
  • BRIEF BRIEF Fiction
  • FAST feature point detection is recognized as a fast and effective feature point extraction method.
  • FAST feature extraction mainly includes three steps: segmentation test on pixels on a fixed radius (usually selected as three pixels) circle, and removing a large number of non-feature candidate points through logic test; based on classification of corner feature detection, utilization
  • the ID3 classifier determines whether the candidate points are corner features according to the 16 features; the non-maximum suppression is used to verify the corner feature.
  • the BRIEF descriptor is a gray-scale calculation that randomly takes a pair of points around the feature points to directly obtain a binary feature description vector.
  • the BRIEF descriptor has two distinct advantages: the descriptor requires less bytes and the memory overhead is small; the Hamming measure is very fast. fast.
  • the feature points are matched by the polar line constraint and the Hamming distance in the feature description, and the feature points with successful matching are used as the support points.
  • feature point matching is quickly performed using polar line constraints and feature point distances, and the matching feature points are called support points.
  • the polar line constraint reduces the matching search from two-dimensional to one-dimensional, greatly simplifying the complexity.
  • the matching points on the right picture of the feature points on the left picture can only be located between one cell on the corresponding outer pole line. Therefore, in this embodiment, a WTA (winner takes all) strategy can be used to select a point with the smallest matching cost as a matching point in the parallax space, and the disparity D L (p) of the p point on the corresponding left image is
  • d(d ⁇ Disp) represents a possible disparity in the disparity space Disp, which is generally an integer between 0 and the maximum disparity d max ;
  • H(.) represents a Hamming distance corresponding to the left and right pixel BRIEF descriptors.
  • Delaunay triangulation on the left image is to divide the image into triangular meshes that cover the entire image plane and are connected to each other, and describe the disparity map as a series of triangular regions with the same or similar disparity values, triangles.
  • the mesh can reflect the topological connection between the pixel and its neighboring pixels.
  • the triangle division should be large enough to reduce the ambiguity of the matching while ensuring the edge details.
  • the vertex density and number should be as small as possible to speed up the matching.
  • the number of vertices should be sufficient to better ensure the accuracy of subsequent disparity map matching.
  • Delaunay triangulation has the following advantages: good structure, simple data structure, small data redundancy, high storage efficiency, and consistent with irregular ground features, which can represent linear features and can adapt to data of various distribution densities.
  • the Delaunay triangulation algorithm may include a random increment method, a triangulation method, and a divide and conquer method.
  • the random incremental method is simple and efficient, and takes up less memory, but its time complexity is high.
  • the triangulation growth method is less efficient because of its relatively low efficiency.
  • the efficiency of the divide and conquer method is the highest, and after splitting.
  • the triangular patches are smoother while maintaining the edge features of the object.
  • the present embodiment can perform Delaunay triangulation on the set of support points using the divide and conquer method.
  • the Delaunay triangle provides information such as the prior probability of the parallax of all the pixels in the triangle and the minimum support distance of the pixel and the support point; specifically, constructing the Delaunay triangle according to the support point may include :
  • Gaussian model Calculating a prior probability P(dn
  • D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle
  • ⁇ p m ⁇
  • is the variance
  • m is a constant parameter (can be set and modified according to the empirical value)
  • dp is The disparity estimate determined by the support point
  • dp au p +bv p +c
  • the parameters a, b, c are obtained by fitting three support point planes
  • dn is the support point disparity value
  • u p and v p are respectively The abscissa and ordinate of the pixel.
  • this step is mainly for calculating the disparity condition probability and the confidence level of any pixel point in the left figure, and does not limit the specific parallax calculation method.
  • the improved census transform stereo matching algorithm has the advantages of simple structure and fast calculation speed. Therefore, Preferably, the parallax condition probability and the parallax confidence level of the pixel points in the left picture are calculated by using an improved census transform stereo matching algorithm.
  • the census transform is a non-parametric local transform.
  • the downside is that the result is too dependent on the center pixel. Therefore, the present embodiment adopts a modified census transform based on the neighborhood information for stereo matching algorithm.
  • the improved census transform stereo matching algorithm is proposed to improve the census transform stereo matching algorithm based on the correlation information of the traditional census transform in the case of parallax discontinuous region and noise interference.
  • the two-information is used to represent the gray-scale difference between the pixel and the central pixel, the pixel and the neighborhood gray-scale mean.
  • the census transform is improved, and the initial matching cost is obtained by Hamming distance calculation; the parallel layered weighted cost aggregation improves the matching precision, and Reduce the cost of aggregation calculations.
  • the improved census transform stereo matching algorithm makes the representation of the central pixel more precise; the information representation of the transformed image in the parallax discontinuous region is more abundant; and the influence of noise on the matching quality is reduced.
  • the test shows that the algorithm is simple in structure, low in complexity, high in robustness, and effectively improves matching accuracy.
  • This step uses the Hamming distance to represent the parallax conditional probability P(O
  • f(dn) is the Hamming distance of the improved census transform stereo matching algorithm
  • f m (d) is the confidence level function of the conditional disparity. From a statistical point of view, the parallax conditional probability characterizes the confidence level of the disparity dn.
  • Optimal posterior parallax is the optimal posterior estimate of parallax
  • the Bayesian principle is utilized.
  • the optimal posterior disparity is obtained, which is the best disparity of the pixel.
  • the Bayesian parameter estimation model is obtained: P(dn
  • f(dn) is the Hamming distance of the improved census transform stereo matching algorithm
  • f m (d) is the confidence level function of the conditional parallax
  • S is the support point
  • O is based on some local stereo matching operator.
  • Matching cost ⁇ is the weight parameter
  • dn is the parallax.
  • the present invention provides a Bayesian stereo matching method for optimal disparity estimation, in which the algorithm of support point extraction and conditional probability is replaceable, and the corresponding model parameters are adjusted.
  • the stereo matching method provided by the embodiment of the present invention can determine the weight parameters of the prior probability and the conditional probability according to the confidence level of the conditional parallax, the geometric topological relationship between the pixel point and the support point, and obtain a more accurate The parallax posterior estimate.
  • the method makes full use of the information contained in the a priori parallax and the conditional parallax, and the model is more reasonable.
  • the parameters are adaptive.
  • the prior probability of the parameter model and the weight parameter of the conditional probability are adaptively determined according to the confidence level and the geometric topological relationship.
  • the parametric model only needs to determine the empirical parameters ⁇ and ⁇ (which can be determined experimentally), and ⁇ p and P(O
  • the parameter model is simple in form and efficient in operation. That is to say, the method utilizes a fast, high-precision, adaptive stereo matching method to achieve fast matching to obtain a high-precision parallax map, which is particularly suitable for mobile platforms or applications requiring high real-time performance.
  • the method may further include:
  • the left and right consistency detection method is used to detect the mismatched points in the disparity map.
  • the mismatching point is detected using the left and right consistency detection method.
  • the method may further include:
  • the disparity values of the error matching points are replaced by the disparity values on the left and right sides of the mismatching point.
  • the WTA strategy can be replaced by the parallax values on the left and right sides. Improve the accuracy of stereo matching.
  • the parallax of sub-pixel precision is obtained by interpolation optimization, so that the disparity map is more complete and correct.
  • the stereo matching method uses the FAST feature extraction operator and the BRIEF description operator to construct the Bayesian prior probability model, which improves the efficiency and density of the support point.
  • the improved CT algorithm ie, the improved census transform algorithm
  • the Bayesian parameter estimation model of the method is used.
  • the geometric topology of a priori parallax and the confidence level of conditional probability are fully considered. It has the characteristics of parameter adaptability, simple form and high efficiency.
  • the stereo matching system provided by the embodiment of the present invention is described below.
  • the stereo matching system described below and the stereo matching method described above can refer to each other.
  • FIG. 2 is a structural block diagram of a stereo matching system according to an embodiment of the present invention.
  • the system may include:
  • the support point determining module 100 is configured to extract feature points of the left and right images, and perform feature point matching on the feature points to determine a support point;
  • a Delaunay triangle building block 200 configured to construct a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
  • the probability calculation module 300 is configured to calculate a parallax condition probability and a parallax confidence level of the pixel points in the left image by using a parallax calculation method;
  • the a posteriori parallax calculation module 400 is configured to calculate an optimal a posteriori parallax by using a Bayesian principle according to the Delaunay triangle, the parallax condition probability and the parallax confidence level.
  • the Delaunay triangle building module 200 may include:
  • a splitting unit for performing Delaunay triangulation on the set of support points of the left figure by using the divide and conquer method
  • Distance calculation unit for using formulas Calculating a minimum support distance m between the pixel point and the support point of the left image
  • Prior probability calculation unit for utilizing a Gaussian model Calculating a prior probability P(dn
  • D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle
  • ⁇ p m ⁇
  • is the variance
  • m is the constant parameter
  • dp is the disparity estimate determined by the support point
  • dp au p +bv p +c
  • the parameters a, b, c are obtained by fitting three support point planes
  • dn is the support point disparity value
  • u p and v p are the abscissa and ordinate of the pixel point, respectively.
  • the a posteriori parallax calculation module 400 specifically uses a formula Calculating a module that obtains an optimal a posteriori parallax d * ;
  • f(dn) is the Hamming distance of the improved census transform stereo matching algorithm
  • f m (d) is the confidence level function of the conditional parallax
  • S is the support point
  • O is based on some local stereo matching operator.
  • Matching cost ⁇ is the weight parameter.
  • system may further include:
  • the consistency detection module is configured to detect the mismatched point in the disparity map by using the left and right consistency detection method.
  • system may further include:
  • a replacement module configured to replace, by using a disparity value of the left and right sides of the mismatching point, a disparity value of the error matching point according to a WTA policy.
  • system may further include:
  • the denoising module is used to filter out using fast median filtering, and finally the parallax of sub-pixel precision is obtained by interpolation optimization, so that the disparity map is more complete and correct.
  • the stereo matching system obtaineds the parallax optimal estimation by using the idea of Bayesian maximum a posteriori estimation.
  • the system first uses the support point to quickly match to obtain parallax Prior probability (prior probability), where prior probability is related to support point parallax, pixel point geometry, minimum distance; conditional probability is calculated by improved census transform stereo matching algorithm, where conditional probability and matching cost, confidence level Correlation; Finally, the posterior probability is obtained based on the prior probability and the conditional probability, and the optimal estimate of the disparity is obtained by maximizing the posterior probability.
  • Prior probability Prior probability
  • prior probability is related to support point parallax, pixel point geometry, minimum distance
  • conditional probability is calculated by improved census transform stereo matching algorithm, where conditional probability and matching cost, confidence level Correlation
  • the posterior probability is obtained based on the prior probability and the conditional probability, and the optimal estimate of the disparity is obtained by maximizing the posterior probability.
  • the parameters in the Bayesian model used by the system are adaptive.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Abstract

A stereo matching method and system. The method comprises: extracting feature points of left and right images and performing feature point matching on the feature points to determine support points (S100); constructing a Delaunay triangle according to the support points, the Delaunay triangle comprising prior probabilities of all pixel point parallaxes within the triangle, and the minimum support distances between pixel points and the support points (S110); calculating parallax conditional probabilities and parallax confidence levels of pixel points in the left image using a parallax calculation method (S120); and calculating, according to the Delaunay triangle, the parallax conditional probabilities, and the parallax confidence levels, an optimal posterior parallax using a Bayesian method (S130). The method implements rapid matching to obtain a high precision parallax image, and is particularly suitable for a mobile platform or application fields having high requirements on real-timeliness.

Description

一种立体匹配方法及系统Stereo matching method and system
本申请要求于2016年11月30号提交中国专利局、申请号为201611079621.9、发明名称为“一种立体匹配方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. PCT Application No. No. No. No. No. No. No. No. No. No. No. No. No. No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No .
技术领域Technical field
本发明涉及计算机视觉技术领域,特别涉及一种立体匹配方法及系统。The present invention relates to the field of computer vision technology, and in particular, to a stereo matching method and system.
背景技术Background technique
立体匹配(stereo dense matching)是指根据所选特征的计算、建立特征间的对应关系,将同一个空间物理点在不同图像中的像点对应起来。立体匹配是计算机视觉研究中一个重要热点和难点,是机器人、医学、人工智能等许多应用中的关键技术之一。近年来,随着移动平台的发展,对立体匹配方法的精度及实时性要求不断提升。立体匹配算法分解为四个步骤:匹配代价计算、匹配代价聚合、视差计算、视差细化。按照约束方式的不同,立体匹配算法可分为局部匹配算法和全局匹配算法。Stereo dense matching refers to the correspondence between the features of the same spatial physical point in different images according to the calculation of the selected features and the correspondence between the features. Stereo matching is an important hotspot and difficulty in computer vision research. It is one of the key technologies in many applications such as robotics, medicine and artificial intelligence. In recent years, with the development of mobile platforms, the accuracy and real-time requirements of the stereo matching method have been continuously improved. The stereo matching algorithm is decomposed into four steps: matching cost calculation, matching cost aggregation, disparity calculation, and parallax refinement. According to different constraints, the stereo matching algorithm can be divided into local matching algorithm and global matching algorithm.
全局立体匹配算法主要是通过全局的优化理论方法估计视差,建立全局能量函数,再通过最小化全局能量函数来得到最优视差值。一般而言,全局匹配算法得到的结果精度较局部算法高,但其计算量较大、耗时较长,不适合实时应用。主要的算法有图割(graph cuts)、信念传播(belief propagation)、半全局匹配(semi-global matching)、动态规划(dynamic programing)等。目前,立体匹配的一个研究方向为采用卷积神经网络的机器学习的方法,可以获得较经典全局算法相当或更高的精度。The global stereo matching algorithm mainly estimates the parallax through the global optimization theory method, establishes the global energy function, and then obtains the optimal disparity value by minimizing the global energy function. In general, the global matching algorithm obtains higher accuracy than the local algorithm, but it is computationally intensive and time consuming, and is not suitable for real-time applications. The main algorithms are graph cuts, belief propagation, semi-global matching, dynamic programing, and so on. At present, a research direction of stereo matching is a machine learning method using a convolutional neural network, which can obtain an accuracy equal to or higher than that of the classical global algorithm.
局部匹配算法主要是采用局部优化方法进行视差值估计,与全局立体匹配算法一样,也是通过能量最小化方法进行视差估计,不同的是在能量函数中,局部匹配算法只有数据项,而没有平滑项。由于局部匹配算法对光照强度和对比度的变化比较敏感,当图像存在纹理特征重复、纹理较弱及遮挡现象比较严重的情况下会导致错误匹配概率较高。常用的局部匹配算法主要有SAD(sum of absolute differences算法、CT(census transform)算法、ASW(adaptive support  weight)算法、ELAS(efficient large area stereo matching)算法、IDR(iterative dense refinement)算法等。SAD算法是计算局部窗口的对应像素差的绝对值,CT算法是先对窗口区域进行变换,后按Hamming距离度量计算匹配代价。SAD和CT方法实现简单、快速,但精度很低。ASW算法根据生物视觉原理,改变SAD算法单一相同权重的方法,引入自适应权重的思想,获得了很高的匹配精度,但是自适应权重导致的计算量非常大。IDR算法采用双通道(two-pass)的方法简化实现ASW,并增加了迭代改进的方法,从而获得了较高的精度。IDR算法结构非常利于并行处理,在CUDA架构下优化后可以得到很高的运算效率;但IDR算法也存在两个主要不足:在非CUDA架构下运行速度较慢,且内存开销非常大。ELAS算法采用了与上述方法完全不同的思想:其首先采用sobel算子获得图像的强纹理的支撑点;然后使用支撑点几何对图像进行Delaunay三角剖分,获得像素点的视差平面估计;最后采用sobel算子测度计算匹配代价,并利用加权的方法得到视差的最优估计。ELAS算法是目前运行速度最快的立体匹配算法之一,精度也非常高,适于实时应用场合。ELAS算法的主要不足表现为:算法结构不利于并行化实现,且存在某些像素点无法计算视差的情况。The local matching algorithm mainly uses the local optimization method to estimate the disparity value. Like the global stereo matching algorithm, the parallax estimation is also performed by the energy minimization method. The difference is that in the energy function, the local matching algorithm has only data items, but no smoothing. item. Because the local matching algorithm is sensitive to changes in illumination intensity and contrast, when the image has repeated texture features, weak texture and severe occlusion, the probability of false matching is high. Commonly used local matching algorithms mainly include SAD (sum of absolute differences algorithm, CT (census transform) algorithm, ASW (adaptive support) Weight) algorithm, ELAS (efficient large area stereo matching) algorithm, IDR (iterative dense refinement) algorithm, and the like. The SAD algorithm calculates the absolute value of the corresponding pixel difference of the local window. The CT algorithm first transforms the window region, and then calculates the matching cost according to the Hamming distance metric. The SAD and CT methods are simple and fast to implement, but with low accuracy. According to the principle of biological vision, the ASW algorithm changes the single weight of the SAD algorithm, introduces the idea of adaptive weight, and obtains a high matching precision, but the amount of computation caused by the adaptive weight is very large. The IDR algorithm uses a two-pass approach to simplify the implementation of ASW and adds an iterative improvement method to achieve higher accuracy. The IDR algorithm structure is very conducive to parallel processing. It can get high computational efficiency after optimization under CUDA architecture. However, IDR algorithm also has two main disadvantages: it runs slowly under non-CUDA architecture, and the memory overhead is very large. The ELAS algorithm adopts a completely different idea from the above method: it first uses the sobel operator to obtain the strong texture support points of the image; then uses the support point geometry to perform Delaunay triangulation on the image to obtain the parallax plane estimation of the pixel; The sobel operator measure calculates the matching cost and uses the weighting method to obtain the optimal estimate of the disparity. ELAS algorithm is one of the fastest running stereo matching algorithms, and its accuracy is also very high, suitable for real-time applications. The main shortcomings of the ELAS algorithm are: the algorithm structure is not conducive to parallelization, and there are some cases where pixel points cannot be calculated.
因此,如何在保证算法精度的前提下提高运行效率,仍是立体匹配技术在移动平台应用的一个难点。Therefore, how to improve the operating efficiency under the premise of ensuring the accuracy of the algorithm is still a difficult point in the application of the stereo matching technology in the mobile platform.
发明内容Summary of the invention
本发明的目的是提供一种立体匹配方法及系统,实现了快速匹配获得高精度视差图,特别适合移动平台或实时性要求高的应用领域。The object of the present invention is to provide a stereo matching method and system, which realizes fast matching to obtain a high-precision parallax map, and is particularly suitable for a mobile platform or an application field with high real-time requirements.
为解决上述技术问题,本发明提供一种立体匹配方法,包括:To solve the above technical problem, the present invention provides a stereo matching method, including:
提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点;Extracting feature points of the left and right maps, and performing feature point matching on the feature points to determine support points;
根据所述支撑点构建Delaunay三角形;其中,所述Delaunay三角形包括三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离;Constructing a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平;Using the parallax calculation method to calculate the parallax condition probability and the parallax confidence level of the pixel points in the left image;
根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差。 According to the Delaunay triangle, the disparity condition probability and the parallax confidence level are calculated by using a Bayesian principle to obtain an optimal a posteriori parallax.
可选的,提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点,包括:Optionally, extract feature points of the left and right images, and perform feature point matching on the feature points to determine support points, including:
利用FAST算子对左右图提取特征点,并利用BRIEF进行特征描述;The feature points are extracted from the left and right graphs by using the FAST operator, and the feature description is performed by using theRIEF;
利用极线约束以及特征描述中的Hamming距离进行特征点匹配,将匹配成功的特征点作为支撑点。The feature points are matched by the polar line constraint and the Hamming distance in the feature description, and the feature points with successful matching are used as the support points.
可选的,根据所述支撑点构建Delaunay三角形,包括:Optionally, constructing a Delaunay triangle according to the support point includes:
利用分治法对左图的支撑点集合进行Delaunay三角剖分;Using the divide and conquer method to perform Delaunay triangulation on the set of support points on the left graph;
利用公式
Figure PCTCN2017070639-appb-000001
计算得到所述左图像素点与支撑点的最小支撑距离m;
Using formula
Figure PCTCN2017070639-appb-000001
Calculating a minimum support distance m between the pixel point and the support point of the left image;
利用高斯模型
Figure PCTCN2017070639-appb-000002
计算得到所述左图像素点视差的先验概率P(dn|S);
Gaussian model
Figure PCTCN2017070639-appb-000002
Calculating a prior probability P(dn|S) of the parallax of the pixel of the left picture;
其中,Dp,i为对应像素点与其所在Delaunay三角形的支撑点的欧氏距离,σp=mσ,σ为方差,m为常数参数;dp为由支撑点确定的视差估计,且dp=aup+bvp+c,参数a,b,c通过拟合三个支撑点平面获得,dn为支撑点视差值,up和vp分别为该像素点的横坐标和纵坐标。Where D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle, σ p =mσ, σ is the variance, m is the constant parameter; dp is the disparity estimate determined by the support point, and dp=au p +bv p +c, the parameters a, b, c are obtained by fitting three support point planes, dn is the support point disparity value, and u p and v p are the abscissa and ordinate of the pixel point, respectively.
可选的,利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平,包括:Optionally, the parallax calculation method is used to calculate the parallax condition probability and the parallax confidence level of the pixel points in the left image, including:
利用改进census变换立体匹配算法计算所述左图中像素点的视差条件概率及视差置信水平。The parallax condition probability and the parallax confidence level of the pixel points in the left picture are calculated by using an improved census transform stereo matching algorithm.
可选的,根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差,包括:Optionally, according to the Delaunay triangle, the disparity condition probability and the disparity confidence level, using a Bayesian principle to calculate an optimal a posteriori parallax, including:
利用公式
Figure PCTCN2017070639-appb-000003
计算得到最优后验视差d*
Using formula
Figure PCTCN2017070639-appb-000003
Calculate the optimal posterior parallax d * ;
其中,
Figure PCTCN2017070639-appb-000004
为视差后验概率,f(dn)为改进census变换立体匹配算法的Hamming距离,fm(d)为条件视差的置信水平函数,S为支撑点,O为根据某种局部立体匹配算子的匹配代价,α为权重参数。
among them,
Figure PCTCN2017070639-appb-000004
For the parallax posterior probability, f(dn) is the Hamming distance of the improved census transform stereo matching algorithm, f m (d) is the confidence level function of the conditional parallax, S is the support point, and O is based on some local stereo matching operator. Matching cost, α is the weight parameter.
可选的,该立体匹配方法还包括:Optionally, the stereo matching method further includes:
利用左右一致性检测方法检测视差图中误匹配点。The left and right consistency detection method is used to detect the mismatched points in the disparity map.
可选的,利用左右一致性检测方法检测视差图中误匹配点之后,还包括:Optionally, after detecting the mismatched point in the disparity map by using the left and right consistency detection method, the method further includes:
根据WTA策略,利用所述误匹配点左右两侧的视差值对所述误差匹配点的视差值进行替换。According to the WTA policy, the disparity values of the error matching points are replaced by the disparity values on the left and right sides of the mismatching point.
本发明还提供一种立体匹配系统,包括:The invention also provides a stereo matching system comprising:
支撑点确定模块,用于提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点;a support point determining module, configured to extract feature points of the left and right images, and perform feature point matching on the feature points to determine a support point;
Delaunay三角形构建模块,用于根据所述支撑点构建Delaunay三角形;其中,所述Delaunay三角形包括三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离;a Delaunay triangle building module, configured to construct a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
概率计算模块,用于利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平;a probability calculation module, configured to calculate a parallax condition probability and a parallax confidence level of a pixel point in the left image by using a parallax calculation method;
后验视差计算模块,用于根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差。The a posteriori parallax calculation module is configured to calculate an optimal a posteriori parallax by using a Bayesian principle according to the Delaunay triangle, the parallax condition probability and the parallax confidence level.
可选的,所述Delaunay三角形构建模块,包括:Optionally, the Delaunay triangle building module includes:
剖分单元,用于利用分治法对左图的支撑点集合进行Delaunay三角剖分;a splitting unit for performing Delaunay triangulation on the set of support points of the left figure by using the divide and conquer method;
距离计算单元,用于利用公式
Figure PCTCN2017070639-appb-000005
计算得到所述左图像素点与支撑点的最小支撑距离m;
Distance calculation unit for using formulas
Figure PCTCN2017070639-appb-000005
Calculating a minimum support distance m between the pixel point and the support point of the left image;
先验概率计算单元,用于利用高斯模型
Figure PCTCN2017070639-appb-000006
计算得到所述左图像素点视差的先验概率P(dn|S);
Prior probability calculation unit for utilizing a Gaussian model
Figure PCTCN2017070639-appb-000006
Calculating a prior probability P(dn|S) of the parallax of the pixel of the left picture;
其中,Dp,i为对应像素点与其所在Delaunay三角形的支撑点的欧氏距离,σp=mσ,σ为方差,m为常数参数;dp为由支撑点确定的视差估计,且dp=aup+bvp+c,参数a,b,c通过拟合三个支撑点平面获得,dn为支撑点视差值,up和vp分别为该像素点的横坐标和纵坐标。Where D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle, σ p =mσ, σ is the variance, m is the constant parameter; dp is the disparity estimate determined by the support point, and dp=au p +bv p +c, the parameters a, b, c are obtained by fitting three support point planes, dn is the support point disparity value, and u p and v p are the abscissa and ordinate of the pixel point, respectively.
可选的,所述后验视差计算模块具体为利用公式
Figure PCTCN2017070639-appb-000007
计算得到最优后验视差d*的模块;
Optionally, the a posteriori parallax calculation module specifically uses a formula
Figure PCTCN2017070639-appb-000007
Calculating a module that obtains an optimal a posteriori parallax d * ;
其中,
Figure PCTCN2017070639-appb-000008
为视差后验概率,f(dn)为改进census变换立体匹配算法的Hamming距离,fm(d)为条件视差的置信水平函数,S为支撑点,O为根据某种局部立体匹配算子的匹配代价,α为权重参数。
among them,
Figure PCTCN2017070639-appb-000008
For the parallax posterior probability, f(dn) is the Hamming distance of the improved census transform stereo matching algorithm, f m (d) is the confidence level function of the conditional parallax, S is the support point, and O is based on some local stereo matching operator. Matching cost, α is the weight parameter.
本发明所提供的立体匹配方法,包括:提取左右图的特征点,并对特征点进行特征点匹配确定支撑点;根据支撑点构建Delaunay三角形;其中,Delaunay三角形包括三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离;利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平;根据Delaunay三角形,视差条件概率及视差置信水平,利用贝叶斯原理计算得到最优后验视差;该方法利用快速、高精度、具有自适应性的立体匹配方法,实现了快速匹配获得高精度视差图,特别适合移动平台或实时性要求高的应用领域;本发明还提供了一种立体匹配系统,具有上述有益效果,在此不再赘述。The stereo matching method provided by the present invention comprises: extracting feature points of the left and right images, and performing feature point matching on the feature points to determine support points; constructing a Delaunay triangle according to the support points; wherein the Delaunay triangle includes the first parallax of all the pixels in the triangle Probability and the minimum support distance between the pixel and the support point; use the disparity calculation method to calculate the parallax condition probability and the parallax confidence level of the pixel in the left picture; according to the Delaunay triangle, the disparity condition probability and the disparity confidence level, calculate by Bayesian principle The optimal a posteriori parallax is obtained. The method uses fast, high-precision and adaptive stereo matching method to achieve fast matching and obtain high-precision parallax map, which is especially suitable for mobile platforms or applications with high real-time requirements. A stereo matching system is provided, which has the above-mentioned beneficial effects and will not be described herein.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is an embodiment of the present invention, and those skilled in the art can obtain other drawings according to the provided drawings without any creative work.
图1为本发明实施例所提供的立体匹配方法的流程图;FIG. 1 is a flowchart of a stereo matching method according to an embodiment of the present invention;
图2为本发明实施例所提供的立体匹配系统的结构框图。FIG. 2 is a structural block diagram of a stereo matching system according to an embodiment of the present invention.
具体实施方式detailed description
本发明的核心是提供一种立体匹配方法及系统,实现了快速匹配获得高精度视差图,特别适合移动平台或实时性要求高的应用领域。The core of the invention is to provide a stereo matching method and system, which realizes fast matching to obtain a high-precision parallax map, and is particularly suitable for a mobile platform or an application field with high real-time requirements.
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中 的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. Based on the present invention All other embodiments obtained by those skilled in the art without creative efforts are within the scope of the present invention.
在以下实施例内容的描述中,采用立体匹配的通用术语,以左图为基准图(reference image),并约定左右图已完成单目像机标定(camera calibration)和立体标定(stereo rectification)。In the description of the following embodiments, the general term of stereo matching is adopted, and the left image is used as a reference image, and the left and right images have been completed to perform camera calibration and stereo rectification.
请参考图1,图1为本发明实施例所提供的立体匹配方法的流程图;该方法可以包括:Please refer to FIG. 1. FIG. 1 is a flowchart of a stereo matching method according to an embodiment of the present invention; the method may include:
S100、提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点;S100: Extract feature points of the left and right images, and perform feature point matching on the feature points to determine support points;
具体的,该步骤主要为了获取支撑点,本实施例并不对具体特征点的提取及匹配算法进行限定。为了快速,高精度完成视差图,这里可以选用具备计算速度快,精度高的相关算法。且进一步为了使该立体匹配算法能够很好的应用于移动平台,选取的算法还应该具有计算逻辑相对简单的特点。例如在进行特征点匹配时可以利用极线约束以及特征点描述子快速进行特征点匹配,匹配成功的特征点称为支撑点(support point)。这里极线约束将匹配搜索从二维降为一维,极大简化了复杂度提高了计算速度。适合移动平台或实时性要求高的应用领域。Specifically, the step is mainly for obtaining a support point, and the embodiment does not limit the extraction and matching algorithm of the specific feature point. In order to complete the parallax map quickly and accurately, it is possible to select a correlation algorithm with high calculation speed and high precision. Furthermore, in order to make the stereo matching algorithm work well on mobile platforms, the selected algorithm should also have the characteristics of relatively simple computational logic. For example, when feature point matching is performed, feature point matching can be quickly performed by using polar line constraints and feature point descriptors, and the matching feature points are called support points. Here, the polar constraint reduces the matching search from two-dimensional to one-dimensional, greatly simplifying the complexity and increasing the calculation speed. Suitable for mobile platforms or applications with high real-time requirements.
优选的,提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点可以包括:Preferably, extracting the feature points of the left and right images and performing feature point matching on the feature points to determine the support points may include:
利用FAST算子对左右图提取特征点,并利用BRIEF进行特征描述;The feature points are extracted from the left and right graphs by using the FAST operator, and the feature description is performed by using theRIEF;
具体的,利用FAST(features from accelerated segment test)算子对左右图提取特征点并用BRIEF(binary robust independent element feature)进行特征描述。Specifically, the feature points are extracted from the left and right graphs by using the FAST (features from accelerated segment test) operator and characterized by a BRIEF Fiction (BRIEF).
其中,FAST特征点检测是公认的快速有效的特征点提取方法。FAST特征提取主要包括三个步骤:对固定半径(通常半径选为三个像素)圆上的像素进行分割测试,并通过逻辑测试去除大量的非特征候选点;基于分类的角点特征检测,利用ID3分类器根据16个特征判决候选点是否为角点特征;利用非极大值抑制进行角点特征的验证。BRIEF描述子是在特征点周边随机取点对进行灰度计算,直接获得二进制特征描述向量。BRIEF描述子具有两个明显优势:描述子所需字节少,内存开销小;利用Hamming测度进行匹配运算速度非常 快。Among them, FAST feature point detection is recognized as a fast and effective feature point extraction method. FAST feature extraction mainly includes three steps: segmentation test on pixels on a fixed radius (usually selected as three pixels) circle, and removing a large number of non-feature candidate points through logic test; based on classification of corner feature detection, utilization The ID3 classifier determines whether the candidate points are corner features according to the 16 features; the non-maximum suppression is used to verify the corner feature. The BRIEF descriptor is a gray-scale calculation that randomly takes a pair of points around the feature points to directly obtain a binary feature description vector. The BRIEF descriptor has two distinct advantages: the descriptor requires less bytes and the memory overhead is small; the Hamming measure is very fast. fast.
利用极线约束以及特征描述中的Hamming距离进行特征点匹配,将匹配成功的特征点作为支撑点。The feature points are matched by the polar line constraint and the Hamming distance in the feature description, and the feature points with successful matching are used as the support points.
具体的,使用极线约束以及特征点距离快速进行特征点匹配,匹配成功的特征点称为支撑点(support point)。Specifically, feature point matching is quickly performed using polar line constraints and feature point distances, and the matching feature points are called support points.
其中,极线约束将匹配搜索从二维降为一维,极大简化了复杂度。考虑到视差空间(Disp)的限制,左图特征点在右图上的匹配点只能位于对应外极线上的一个小区间。因此,本实施例可以使用WTA(winner takes all)策略,在视差空间内选择匹配代价最小的点作为匹配点,对应的左图像上p点的视差DL(p)为
Figure PCTCN2017070639-appb-000009
Among them, the polar line constraint reduces the matching search from two-dimensional to one-dimensional, greatly simplifying the complexity. Considering the limitation of the disparity space (Disp), the matching points on the right picture of the feature points on the left picture can only be located between one cell on the corresponding outer pole line. Therefore, in this embodiment, a WTA (winner takes all) strategy can be used to select a point with the smallest matching cost as a matching point in the parallax space, and the disparity D L (p) of the p point on the corresponding left image is
Figure PCTCN2017070639-appb-000009
其中:d(d∈Disp)表示视差空间Disp中的可能视差,其取值一般为0到最大视差dmax之间的整数;H(.)表示对应左右像素BRIEF描述子的Hamming距离。Where: d(d∈Disp) represents a possible disparity in the disparity space Disp, which is generally an integer between 0 and the maximum disparity d max ; H(.) represents a Hamming distance corresponding to the left and right pixel BRIEF descriptors.
S110、根据所述支撑点构建Delaunay三角形;其中,所述Delaunay三角形包括三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离;S110. Construct a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
具体的,对左图进行Delaunay三角剖分的目的是将图像分割成覆盖整幅图像平面且彼此相连的三角形网格,将视差图描述为一系列具有相同或者相近视差值的三角形区域,三角形网格可以反映出像素点与其邻近像素点间的拓扑连接关系。对于视差平滑区域,在保证边缘细节的前提下,三角形划分应该足够大以减少匹配的歧义性。在视差连续区域,顶点密度、数量应尽量少,以加快匹配速度。在视差不连续区域,为了正确描述物体的形状,顶点数量应该足够多,以便能更好地保证后续视差图匹配的精度。Specifically, the purpose of Delaunay triangulation on the left image is to divide the image into triangular meshes that cover the entire image plane and are connected to each other, and describe the disparity map as a series of triangular regions with the same or similar disparity values, triangles. The mesh can reflect the topological connection between the pixel and its neighboring pixels. For the parallax smoothing region, the triangle division should be large enough to reduce the ambiguity of the matching while ensuring the edge details. In the continuous parallax area, the vertex density and number should be as small as possible to speed up the matching. In the parallax discontinuous area, in order to correctly describe the shape of the object, the number of vertices should be sufficient to better ensure the accuracy of subsequent disparity map matching.
其中,Delaunay三角网具有以下优点:结构良好,数据结构简单,数据冗余度小,存储效率高,与不规则的地面特征和谐一致,可以表示线性特征,可适应各种分布密度的数据等。Among them, Delaunay triangulation has the following advantages: good structure, simple data structure, small data redundancy, high storage efficiency, and consistent with irregular ground features, which can represent linear features and can adapt to data of various distribution densities.
本实施例并不对进行Delaunay三角剖分算法进行限定,用户可以根据自 身对结果的要求进行选择,在算法选择时可以考虑计算平台硬件水平,对结果精度和计算速度的需求等。该Delaunay三角剖分算法可以包括有随机增量法、三角网生长法和分治法等。其中,随机增量法的实现简单高效,占用内存较小,但其时间复杂度高;三角网生长法由于效率相对较低,目前采用较少;分治法的效率最高,而且剖分后的三角面片较为平滑,同时很好地保持了物体的边缘特征。因此优选的,本实施例可以使用分治法对支撑点集合进行Delaunay三角剖分。本实施例中Delaunay三角形提供了该三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离(minimum support distance)等信息;具体的,根据所述支撑点构建Delaunay三角形可以包括:This embodiment does not limit the Delaunay triangulation algorithm, and the user can The choice of the result is selected, and the hardware level of the calculation platform, the requirements for the accuracy of the result and the calculation speed can be considered in the algorithm selection. The Delaunay triangulation algorithm may include a random increment method, a triangulation method, and a divide and conquer method. Among them, the random incremental method is simple and efficient, and takes up less memory, but its time complexity is high. The triangulation growth method is less efficient because of its relatively low efficiency. The efficiency of the divide and conquer method is the highest, and after splitting. The triangular patches are smoother while maintaining the edge features of the object. Therefore, it is preferable that the present embodiment can perform Delaunay triangulation on the set of support points using the divide and conquer method. In this embodiment, the Delaunay triangle provides information such as the prior probability of the parallax of all the pixels in the triangle and the minimum support distance of the pixel and the support point; specifically, constructing the Delaunay triangle according to the support point may include :
利用分治法对左图的支撑点集合进行Delaunay三角剖分;Using the divide and conquer method to perform Delaunay triangulation on the set of support points on the left graph;
利用公式
Figure PCTCN2017070639-appb-000010
计算得到所述左图像素点与支撑点的最小支撑距离m;
Using formula
Figure PCTCN2017070639-appb-000010
Calculating a minimum support distance m between the pixel point and the support point of the left image;
利用高斯模型
Figure PCTCN2017070639-appb-000011
计算得到所述左图像素点视差的先验概率P(dn|S);
Gaussian model
Figure PCTCN2017070639-appb-000011
Calculating a prior probability P(dn|S) of the parallax of the pixel of the left picture;
其中,Dp,i为对应像素点与其所在Delaunay三角形的支撑点的欧氏距离,σp=mσ,σ为方差,m为常数参数(可以依据经验值进行设定和修改);dp为由支撑点确定的视差估计,且dp=aup+bvp+c,参数a,b,c通过拟合三个支撑点平面获得,dn为支撑点视差值,up和vp分别为该像素点的横坐标和纵坐标。Where D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle, σ p =mσ, σ is the variance, m is a constant parameter (can be set and modified according to the empirical value); dp is The disparity estimate determined by the support point, and dp=au p +bv p +c, the parameters a, b, c are obtained by fitting three support point planes, dn is the support point disparity value, u p and v p are respectively The abscissa and ordinate of the pixel.
具体的,在利用分治法对左图的支撑点集合进行Delaunay三角剖分后,由于已知所有支撑点视差值,因此可在每一个三角形确定的平面内估计包含其中的任一像素点的视差初值dp,并通过几何关系得到该像素与相邻三个支撑点的最小支撑距离m(minimum support distance)。Specifically, after performing the Delaunay triangulation on the support point set of the left graph by using the divide and conquer method, since all the support point disparity values are known, it is possible to estimate any pixel point included in the plane determined by each triangle. The initial value of the parallax dp, and the minimum support distance m (minimum support distance) of the pixel and the adjacent three support points is obtained by geometric relationship.
S120、利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平;S120. Calculate a parallax condition probability and a parallax confidence level of the pixel point in the left figure by using a parallax calculation method;
具体的,该步骤主要为了计算得到左图中任意像素点的视差条件概率及视差置信水平(confidence level),并不对具体的视差计算方法进行限定。由于改进census变换立体匹配算法计算具有结构简单,计算速度快等优点。因此, 优选的,利用改进census变换立体匹配算法计算所述左图中像素点的视差条件概率及视差置信水平。Specifically, this step is mainly for calculating the disparity condition probability and the confidence level of any pixel point in the left figure, and does not limit the specific parallax calculation method. The improved census transform stereo matching algorithm has the advantages of simple structure and fast calculation speed. Therefore, Preferably, the parallax condition probability and the parallax confidence level of the pixel points in the left picture are calculated by using an improved census transform stereo matching algorithm.
具体的,census变换是一种非参数局部变换。它的缺点是结果过于依赖于中心像素。因此本实施例采用基于邻域信息的改进census变换立体匹配算法(a modified census transform based on the neighborhood information for stereo matching algorithm)。该改进census变换立体匹配算法针对传统census变换在视差不连续区域和噪声干扰情况下误匹配率较高的情况,提出了一种利用邻域相关信息的改进census变换立体匹配算法。应用两位信息来表示像素与中心像素、像素与邻域灰度均值的灰度差异对census变换进行了改进,通过Hamming距计算得到初始匹配代价;经过并行分层权重代价聚合提高匹配精度,并降低代价聚合计算复杂度。Specifically, the census transform is a non-parametric local transform. The downside is that the result is too dependent on the center pixel. Therefore, the present embodiment adopts a modified census transform based on the neighborhood information for stereo matching algorithm. The improved census transform stereo matching algorithm is proposed to improve the census transform stereo matching algorithm based on the correlation information of the traditional census transform in the case of parallax discontinuous region and noise interference. The two-information is used to represent the gray-scale difference between the pixel and the central pixel, the pixel and the neighborhood gray-scale mean. The census transform is improved, and the initial matching cost is obtained by Hamming distance calculation; the parallel layered weighted cost aggregation improves the matching precision, and Reduce the cost of aggregation calculations.
该改进census变换立体匹配算法使中心像素的表示更加精确;使变换后的图像在视差不连续区域的信息表示更为丰富;同时减少了噪声对匹配质量的影响。经测试表明,该算法结构简单,复杂度低,具有较高的鲁棒性,有效地提高了匹配精度。该步骤采用Hamming距离来表示视差条件概率P(O|dn):The improved census transform stereo matching algorithm makes the representation of the central pixel more precise; the information representation of the transformed image in the parallax discontinuous region is more abundant; and the influence of noise on the matching quality is reduced. The test shows that the algorithm is simple in structure, low in complexity, high in robustness, and effectively improves matching accuracy. This step uses the Hamming distance to represent the parallax conditional probability P(O|dn):
Figure PCTCN2017070639-appb-000012
Figure PCTCN2017070639-appb-000012
其中,f(dn)为改进census变换立体匹配算法的Hamming距离,fm(d)为条件视差的置信水平函数。从统计学的角度看,视差条件概率表征了视差dn的置信水平。Where f(dn) is the Hamming distance of the improved census transform stereo matching algorithm, and f m (d) is the confidence level function of the conditional disparity. From a statistical point of view, the parallax conditional probability characterizes the confidence level of the disparity dn.
S130、根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差。最优后验视差即为视差的最优后验估计S130. Calculate an optimal a posteriori parallax by using a Bayesian principle according to the Delaunay triangle, the disparity condition probability, and the disparity confidence level. Optimal posterior parallax is the optimal posterior estimate of parallax
具体的,根据Delaunay三角形中的先验概率,最小支撑距离以及视差条件概率及视差置信水平,利用贝叶斯原理
Figure PCTCN2017070639-appb-000013
获得最优的后验视差(posterior disparity),即为该像素的最佳视差。根据视差先验概率模型及条件概率模型得到贝叶斯参数估计模型:P(dn|S,O)∝P(dn|S)*P(O|dn),可得 如下结果:
Specifically, according to the prior probability, the minimum support distance, the disparity condition probability and the parallax confidence level in the Delaunay triangle, the Bayesian principle is utilized.
Figure PCTCN2017070639-appb-000013
The optimal posterior disparity is obtained, which is the best disparity of the pixel. According to the parallax prior probability model and the conditional probability model, the Bayesian parameter estimation model is obtained: P(dn|S, O) ∝ P(dn|S)*P(O|dn), and the following results are obtained:
Figure PCTCN2017070639-appb-000014
Figure PCTCN2017070639-appb-000014
Figure PCTCN2017070639-appb-000015
Figure PCTCN2017070639-appb-000015
其中,
Figure PCTCN2017070639-appb-000016
为视差后验概率,f(dn)为改进census变换立体匹配算法的Hamming距离,fm(d)为条件视差的置信水平函数,S为支撑点,O为根据某种局部立体匹配算子的匹配代价,α为权重参数,dn为视差。
among them,
Figure PCTCN2017070639-appb-000016
For the parallax posterior probability, f(dn) is the Hamming distance of the improved census transform stereo matching algorithm, f m (d) is the confidence level function of the conditional parallax, S is the support point, and O is based on some local stereo matching operator. Matching cost, α is the weight parameter, and dn is the parallax.
需要特别说明的是,本发明提供了最优视差估计的一种贝叶斯立体匹配方法,其中的支撑点提取以及条件概率的算法是可替换的,并调整相应的模型参数。It should be particularly noted that the present invention provides a Bayesian stereo matching method for optimal disparity estimation, in which the algorithm of support point extraction and conditional probability is replaceable, and the corresponding model parameters are adjusted.
基于上述技术方案,本发明实施例提供的立体匹配方法,该方法根据条件视差的置信水平、像素点与支撑点的几何拓扑关系,确定先验概率和条件概率的权重参数,可以获得更为精确的视差后验估计。相比与现有技术中ELAS算法经验固化权重参数相比,该方法充分利用了先验视差和条件视差的所包含的信息,模型更加合理。参数具有自适应性。该方法中参数模型的先验概率和条件概率的权重参数是根据置信水平、几何拓扑关系自适应确定的。事实上,参数模型只需要确定经验参数α和σ(可根据试验测定),σp和P(O|dn)是自适应变化的,更具有灵活性。参数模型形式简单,运算高效。即该方法利用快速、高精度、具有自适应性的立体匹配方法,实现了快速匹配获得高精度视差图,特别适合移动平台或实时性要求高的应用领域。Based on the foregoing technical solution, the stereo matching method provided by the embodiment of the present invention can determine the weight parameters of the prior probability and the conditional probability according to the confidence level of the conditional parallax, the geometric topological relationship between the pixel point and the support point, and obtain a more accurate The parallax posterior estimate. Compared with the ELAS algorithm experience curing weight parameter in the prior art, the method makes full use of the information contained in the a priori parallax and the conditional parallax, and the model is more reasonable. The parameters are adaptive. In this method, the prior probability of the parameter model and the weight parameter of the conditional probability are adaptively determined according to the confidence level and the geometric topological relationship. In fact, the parametric model only needs to determine the empirical parameters α and σ (which can be determined experimentally), and σ p and P(O|dn) are adaptively varied and more flexible. The parameter model is simple in form and efficient in operation. That is to say, the method utilizes a fast, high-precision, adaptive stereo matching method to achieve fast matching to obtain a high-precision parallax map, which is particularly suitable for mobile platforms or applications requiring high real-time performance.
基于上述技术方案,为了提高立体匹配的精度,该方法还可以包括:Based on the foregoing technical solution, in order to improve the accuracy of the stereo matching, the method may further include:
利用左右一致性检测方法检测视差图中误匹配点。The left and right consistency detection method is used to detect the mismatched points in the disparity map.
具体的,使用左右一致性检测方法检测出误匹配点。利用上述实施例得到的左图和右图的视差图,如果右视差图中的像素点向左偏移与视差值大小相同 的单位像素后,与左视差图中相应位置像素点的值相同,则为可靠匹配点,否则为误匹配点。在检测到误匹配点后该方法还可以包括:Specifically, the mismatching point is detected using the left and right consistency detection method. Using the disparity maps of the left and right images obtained in the above embodiment, if the pixel points in the right disparity map are shifted to the left and the disparity values are the same After the unit pixel is the same as the value of the corresponding pixel in the left disparity map, it is a reliable matching point, otherwise it is a mismatching point. After detecting the mismatch point, the method may further include:
根据WTA策略,利用所述误匹配点左右两侧的视差值对所述误差匹配点的视差值进行替换。According to the WTA policy, the disparity values of the error matching points are replaced by the disparity values on the left and right sides of the mismatching point.
具体的,对于计算出来的误匹配点,通过WTA策略用左右两侧的视差值替换即可。提高立体匹配的精度。Specifically, for the calculated mismatch point, the WTA strategy can be replaced by the parallax values on the left and right sides. Improve the accuracy of stereo matching.
进一步,此时视差图可能仍然存在少数噪点,需要进一步除噪,可以使用快速中值滤波滤除,最后通过插值优化得到亚像素精度的视差,使得视差图更为完整、正确。Further, at this time, there may still be a small amount of noise in the disparity map, and further denoising is needed, and the fast median filtering can be used to filter out. Finally, the parallax of sub-pixel precision is obtained by interpolation optimization, so that the disparity map is more complete and correct.
基于上述技术方案,本发明实施例提供的立体匹配方法,该方法在构建贝叶斯先验概率模型时,采用了FAST特征提取算子和BRIEF描述算子,提升了支撑点的效率和稠密度,使得先验概率更为精确;在构建贝叶斯条件概率模型时,采用改进CT算法(即改进census变换算法),更加快速精确;更为重要的是,该方法的贝叶斯参数估计模型充分考虑了先验视差的几何拓扑结构和条件概率的置信水平,具有参数自适应性、形式简单、运算高效的特点。Based on the above technical solution, the stereo matching method provided by the embodiment of the present invention uses the FAST feature extraction operator and the BRIEF description operator to construct the Bayesian prior probability model, which improves the efficiency and density of the support point. To make the prior probability more accurate; when constructing the Bayesian conditional probability model, the improved CT algorithm (ie, the improved census transform algorithm) is more fast and accurate; more importantly, the Bayesian parameter estimation model of the method is used. The geometric topology of a priori parallax and the confidence level of conditional probability are fully considered. It has the characteristics of parameter adaptability, simple form and high efficiency.
下面对本发明实施例提供的立体匹配系统进行介绍,下文描述的立体匹配系统与上文描述的立体匹配方法可相互对应参照。The stereo matching system provided by the embodiment of the present invention is described below. The stereo matching system described below and the stereo matching method described above can refer to each other.
请参考图2,图2为本发明实施例所提供的立体匹配系统的结构框图;该系统可以包括:Please refer to FIG. 2. FIG. 2 is a structural block diagram of a stereo matching system according to an embodiment of the present invention; the system may include:
支撑点确定模块100,用于提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点;The support point determining module 100 is configured to extract feature points of the left and right images, and perform feature point matching on the feature points to determine a support point;
Delaunay三角形构建模块200,用于根据所述支撑点构建Delaunay三角形;其中,所述Delaunay三角形包括三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离;a Delaunay triangle building block 200, configured to construct a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
概率计算模块300,用于利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平;The probability calculation module 300 is configured to calculate a parallax condition probability and a parallax confidence level of the pixel points in the left image by using a parallax calculation method;
后验视差计算模块400,用于根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差。 The a posteriori parallax calculation module 400 is configured to calculate an optimal a posteriori parallax by using a Bayesian principle according to the Delaunay triangle, the parallax condition probability and the parallax confidence level.
基于上述实施例,所述Delaunay三角形构建模块200可以包括:Based on the above embodiment, the Delaunay triangle building module 200 may include:
剖分单元,用于利用分治法对左图的支撑点集合进行Delaunay三角剖分;a splitting unit for performing Delaunay triangulation on the set of support points of the left figure by using the divide and conquer method;
距离计算单元,用于利用公式
Figure PCTCN2017070639-appb-000017
计算得到所述左图像素点与支撑点的最小支撑距离m;
Distance calculation unit for using formulas
Figure PCTCN2017070639-appb-000017
Calculating a minimum support distance m between the pixel point and the support point of the left image;
先验概率计算单元,用于利用高斯模型
Figure PCTCN2017070639-appb-000018
计算得到所述左图像素点视差的先验概率P(dn|S);
Prior probability calculation unit for utilizing a Gaussian model
Figure PCTCN2017070639-appb-000018
Calculating a prior probability P(dn|S) of the parallax of the pixel of the left picture;
其中,Dp,i为对应像素点与其所在Delaunay三角形的支撑点的欧氏距离,σp=mσ,σ为方差,m为常数参数;dp为由支撑点确定的视差估计,且dp=aup+bvp+c,参数a,b,c通过拟合三个支撑点平面获得,dn为支撑点视差值,up和vp分别为该像素点的横坐标和纵坐标。Where D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle, σ p =mσ, σ is the variance, m is the constant parameter; dp is the disparity estimate determined by the support point, and dp=au p +bv p +c, the parameters a, b, c are obtained by fitting three support point planes, dn is the support point disparity value, and u p and v p are the abscissa and ordinate of the pixel point, respectively.
基于上述实施例,所述后验视差计算模块400具体为利用公式
Figure PCTCN2017070639-appb-000019
计算得到最优后验视差d*的模块;
Based on the above embodiment, the a posteriori parallax calculation module 400 specifically uses a formula
Figure PCTCN2017070639-appb-000019
Calculating a module that obtains an optimal a posteriori parallax d * ;
其中,
Figure PCTCN2017070639-appb-000020
为视差后验概率,f(dn)为改进census变换立体匹配算法的Hamming距离,fm(d)为条件视差的置信水平函数,S为支撑点,O为根据某种局部立体匹配算子的匹配代价,α为权重参数。
among them,
Figure PCTCN2017070639-appb-000020
For the parallax posterior probability, f(dn) is the Hamming distance of the improved census transform stereo matching algorithm, f m (d) is the confidence level function of the conditional parallax, S is the support point, and O is based on some local stereo matching operator. Matching cost, α is the weight parameter.
基于上述任意实施例,该系统还可以包括:Based on any of the above embodiments, the system may further include:
一致性检测模块,用于利用左右一致性检测方法检测视差图中误匹配点。The consistency detection module is configured to detect the mismatched point in the disparity map by using the left and right consistency detection method.
基于上述任意实施例,该系统还可以包括:Based on any of the above embodiments, the system may further include:
替换模块,用于根据WTA策略,利用所述误匹配点左右两侧的视差值对所述误差匹配点的视差值进行替换。And a replacement module, configured to replace, by using a disparity value of the left and right sides of the mismatching point, a disparity value of the error matching point according to a WTA policy.
基于上述任意实施例,该系统还可以包括:Based on any of the above embodiments, the system may further include:
除噪模块,用于使用快速中值滤波滤除,最后通过插值优化得到亚像素精度的视差,使得视差图更为完整、正确。The denoising module is used to filter out using fast median filtering, and finally the parallax of sub-pixel precision is obtained by interpolation optimization, so that the disparity map is more complete and correct.
基于上述技术方案,本发明实施例提供的立体匹配系统,采用贝叶斯最大后验估计的思想获得视差最优估计。该系统首先利用支撑点快速匹配获得视差 的先验概率(prior probability),其中先验概率与支撑点视差、像素点几何、最小距离相关;通过改进census变换立体匹配算法计算条件概率(conditional probability),其中条件概率与匹配代价、置信水平相关;最后,根据先验概率和条件概率获得后验概率(posterior probability),通过最大化后验概率获得视差的最优估计。特别地,该系统使用的贝叶斯模型中的参数具有自适应性。Based on the above technical solution, the stereo matching system provided by the embodiment of the present invention obtains the parallax optimal estimation by using the idea of Bayesian maximum a posteriori estimation. The system first uses the support point to quickly match to obtain parallax Prior probability (prior probability), where prior probability is related to support point parallax, pixel point geometry, minimum distance; conditional probability is calculated by improved census transform stereo matching algorithm, where conditional probability and matching cost, confidence level Correlation; Finally, the posterior probability is obtained based on the prior probability and the conditional probability, and the optimal estimate of the disparity is obtained by maximizing the posterior probability. In particular, the parameters in the Bayesian model used by the system are adaptive.
说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。A person skilled in the art will further appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate the hardware and software. Interchangeability, the composition and steps of the various examples have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented directly in hardware, a software module executed by a processor, or a combination of both. The software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.
以上对本发明所提供的立体匹配方法及系统进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。 The stereo matching method and system provided by the present invention are described in detail above. The principles and embodiments of the present invention have been described herein with reference to specific examples, and the description of the above embodiments is only to assist in understanding the method of the present invention and its core idea. It should be noted that those skilled in the art can make various modifications and changes to the present invention without departing from the spirit and scope of the invention.

Claims (10)

  1. 一种立体匹配方法,其特征在于,包括:A stereo matching method, comprising:
    提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点;Extracting feature points of the left and right maps, and performing feature point matching on the feature points to determine support points;
    根据所述支撑点构建Delaunay三角形;其中,所述Delaunay三角形包括三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离;Constructing a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
    利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平;Using the parallax calculation method to calculate the parallax condition probability and the parallax confidence level of the pixel points in the left image;
    根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差。According to the Delaunay triangle, the disparity condition probability and the parallax confidence level are calculated by using a Bayesian principle to obtain an optimal a posteriori parallax.
  2. 根据权利要求1所述的立体匹配方法,其特征在于,提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点,包括:The stereo matching method according to claim 1, wherein extracting feature points of the left and right images and performing feature point matching on the feature points to determine support points comprises:
    利用FAST算子对左右图提取特征点,并利用BRIEF进行特征描述;The feature points are extracted from the left and right graphs by using the FAST operator, and the feature description is performed by using theRIEF;
    利用极线约束以及特征描述中的Hamming距离进行特征点匹配,将匹配成功的特征点作为支撑点。The feature points are matched by the polar line constraint and the Hamming distance in the feature description, and the feature points with successful matching are used as the support points.
  3. 根据权利要求2所述的立体匹配方法,其特征在于,根据所述支撑点构建Delaunay三角形,包括:The stereo matching method according to claim 2, wherein constructing a Delaunay triangle according to the support point comprises:
    利用分治法对左图的支撑点集合进行Delaunay三角剖分;Using the divide and conquer method to perform Delaunay triangulation on the set of support points on the left graph;
    利用公式
    Figure PCTCN2017070639-appb-100001
    计算得到所述左图像素点与支撑点的最小支撑距离m;
    Using formula
    Figure PCTCN2017070639-appb-100001
    Calculating a minimum support distance m between the pixel point and the support point of the left image;
    利用高斯模型
    Figure PCTCN2017070639-appb-100002
    计算得到所述左图像素点视差的先验概率P(dn|S);
    Gaussian model
    Figure PCTCN2017070639-appb-100002
    Calculating a prior probability P(dn|S) of the parallax of the pixel of the left picture;
    其中,Dp,i为对应像素点与其所在Delaunay三角形的支撑点的欧氏距离,σp=mσ,σ为方差,m为常数参数;dp为由支撑点确定的视差估计,且dp=aup+bvp+c,参数a,b,c通过拟合三个支撑点平面获得,dn为支撑点视差值,up和vp分别为该像素点的横坐标和纵坐标。Where D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle, σ p =mσ, σ is the variance, m is the constant parameter; dp is the disparity estimate determined by the support point, and dp=au p +bv p +c, the parameters a, b, c are obtained by fitting three support point planes, dn is the support point disparity value, and u p and v p are the abscissa and ordinate of the pixel point, respectively.
  4. 根据权利要求3所述的立体匹配方法,其特征在于,利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平,包括: The stereo matching method according to claim 3, wherein the parallax condition probability and the parallax confidence level of the pixel points in the left image are calculated by using a parallax calculation method, including:
    利用改进census变换立体匹配算法计算所述左图中像素点的视差条件概率及视差置信水平。The parallax condition probability and the parallax confidence level of the pixel points in the left picture are calculated by using an improved census transform stereo matching algorithm.
  5. 根据权利要求4所述的立体匹配方法,其特征在于,根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差,包括:The stereo matching method according to claim 4, wherein the parallax conditional probability and the parallax confidence level are calculated according to the Delaunay triangle, and the optimal a posteriori parallax is calculated by using a Bayesian principle, including:
    利用公式
    Figure PCTCN2017070639-appb-100003
    计算得到最优后验视差d*
    Using formula
    Figure PCTCN2017070639-appb-100003
    Calculate the optimal posterior parallax d * ;
    其中,
    Figure PCTCN2017070639-appb-100004
    为视差后验概率,f(dn)为改进census变换立体匹配算法的Hamming距离,fm(d)为条件视差的置信水平函数,S为支撑点,O为根据某种局部立体匹配算子的匹配代价,α为权重参数。
    among them,
    Figure PCTCN2017070639-appb-100004
    For the parallax posterior probability, f(dn) is the Hamming distance of the improved census transform stereo matching algorithm, f m (d) is the confidence level function of the conditional parallax, S is the support point, and O is based on some local stereo matching operator. Matching cost, α is the weight parameter.
  6. 根据权利要求1-5任一项所述的立体匹配方法,其特征在于,还包括:The stereo matching method according to any one of claims 1 to 5, further comprising:
    利用左右一致性检测方法检测视差图中误匹配点。The left and right consistency detection method is used to detect the mismatched points in the disparity map.
  7. 根据权利要求6所述的立体匹配方法,其特征在于,利用左右一致性检测方法检测视差图中误匹配点之后,还包括:The stereo matching method according to claim 6, wherein after detecting the mismatching point in the disparity map by using the left and right consistency detecting method, the method further comprises:
    根据WTA策略,利用所述误匹配点左右两侧的视差值对所述误差匹配点的视差值进行替换。According to the WTA policy, the disparity values of the error matching points are replaced by the disparity values on the left and right sides of the mismatching point.
  8. 一种立体匹配系统,其特征在于,包括:A stereo matching system, comprising:
    支撑点确定模块,用于提取左右图的特征点,并对所述特征点进行特征点匹配确定支撑点;a support point determining module, configured to extract feature points of the left and right images, and perform feature point matching on the feature points to determine a support point;
    Delaunay三角形构建模块,用于根据所述支撑点构建Delaunay三角形;其中,所述Delaunay三角形包括三角形内所有像素点视差的先验概率以及像素点与支撑点的最小支撑距离;a Delaunay triangle building module, configured to construct a Delaunay triangle according to the support point; wherein the Delaunay triangle includes a prior probability of parallax of all pixel points in the triangle and a minimum support distance of the pixel point and the support point;
    概率计算模块,用于利用视差计算方法计算左图中像素点的视差条件概率及视差置信水平;a probability calculation module, configured to calculate a parallax condition probability and a parallax confidence level of a pixel point in the left image by using a parallax calculation method;
    后验视差计算模块,用于根据所述Delaunay三角形,所述视差条件概率及所述视差置信水平,利用贝叶斯原理计算得到最优后验视差。The a posteriori parallax calculation module is configured to calculate an optimal a posteriori parallax by using a Bayesian principle according to the Delaunay triangle, the parallax condition probability and the parallax confidence level.
  9. 根据权利要求8所述的立体匹配方法,其特征在于,所述Delaunay三角形构建模块,包括: The stereo matching method according to claim 8, wherein the Delaunay triangle building module comprises:
    剖分单元,用于利用分治法对左图的支撑点集合进行Delaunay三角剖分;a splitting unit for performing Delaunay triangulation on the set of support points of the left figure by using the divide and conquer method;
    距离计算单元,用于利用公式
    Figure PCTCN2017070639-appb-100005
    计算得到所述左图像素点与支撑点的最小支撑距离m;
    Distance calculation unit for using formulas
    Figure PCTCN2017070639-appb-100005
    Calculating a minimum support distance m between the pixel point and the support point of the left image;
    先验概率计算单元,用于利用高斯模型
    Figure PCTCN2017070639-appb-100006
    计算得到所述左图像素点视差的先验概率P(dn|S);
    Prior probability calculation unit for utilizing a Gaussian model
    Figure PCTCN2017070639-appb-100006
    Calculating a prior probability P(dn|S) of the parallax of the pixel of the left picture;
    其中,Dp,i为对应像素点与其所在Delaunay三角形的支撑点的欧氏距离,σp=mσ,σ为方差,m为常数参数;dp为由支撑点确定的视差估计,且dp=aup+bvp+c,参数a,b,c通过拟合三个支撑点平面获得,dn为支撑点视差值,up和vp分别为该像素点的横坐标和纵坐标。Where D p,i is the Euclidean distance of the corresponding pixel point and the support point of its Delaunay triangle, σ p =mσ, σ is the variance, m is the constant parameter; dp is the disparity estimate determined by the support point, and dp=au p +bv p +c, the parameters a, b, c are obtained by fitting three support point planes, dn is the support point disparity value, and u p and v p are the abscissa and ordinate of the pixel point, respectively.
  10. 根据权利要求8所述的立体匹配方法,其特征在于,所述后验视差计算模块具体为利用公式d*=argminP(dn|S,O)计算得到最优后验视差d*的模块;The stereo matching method according to claim 8, wherein the a posteriori parallax calculation module is specifically configured to calculate an optimal a posteriori parallax d * by using a formula d * =argminP(dn|S, O);
    其中,
    Figure PCTCN2017070639-appb-100007
    为视差后验概率,f(dn)为改进census变换立体匹配算法的Hamming距离,fm(d)为条件视差的置信水平函数,S为支撑点,O为根据某种局部立体匹配算子的匹配代价,α为权重参数。
    among them,
    Figure PCTCN2017070639-appb-100007
    For the parallax posterior probability, f(dn) is the Hamming distance of the improved census transform stereo matching algorithm, f m (d) is the confidence level function of the conditional parallax, S is the support point, and O is based on some local stereo matching operator. Matching cost, α is the weight parameter.
PCT/CN2017/070639 2016-11-30 2017-01-09 Stereo matching method and system WO2018098891A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611079621.9 2016-11-30
CN201611079621.9A CN106780442B (en) 2016-11-30 2016-11-30 Stereo matching method and system

Publications (1)

Publication Number Publication Date
WO2018098891A1 true WO2018098891A1 (en) 2018-06-07

Family

ID=58901184

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/070639 WO2018098891A1 (en) 2016-11-30 2017-01-09 Stereo matching method and system

Country Status (2)

Country Link
CN (1) CN106780442B (en)
WO (1) WO2018098891A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109887021A (en) * 2019-01-19 2019-06-14 天津大学 Based on the random walk solid matching method across scale
CN109961092A (en) * 2019-03-04 2019-07-02 北京大学深圳研究生院 A kind of binocular vision solid matching method and system based on parallax anchor point
CN109978934A (en) * 2019-03-04 2019-07-05 北京大学深圳研究生院 A kind of binocular vision solid matching method and system based on matching cost weighting
CN110533711A (en) * 2019-09-04 2019-12-03 云南电网有限责任公司带电作业分公司 A kind of efficient large scale Stereo Matching Algorithm based on acceleration robust feature
CN110599478A (en) * 2019-09-16 2019-12-20 中山大学 Image area copying and pasting tampering detection method
CN111439889A (en) * 2020-04-01 2020-07-24 吉林建筑大学 Water circulation treatment method for cooperatively removing iron, manganese, ammonia nitrogen and organic matters in underground water
CN111476837A (en) * 2019-01-23 2020-07-31 上海科技大学 Adaptive stereo matching optimization method and device, equipment and storage medium thereof
CN111784753A (en) * 2020-07-03 2020-10-16 江苏科技大学 Three-dimensional reconstruction stereo matching method for autonomous underwater robot recovery butt joint foreground view field
CN111833393A (en) * 2020-07-05 2020-10-27 桂林电子科技大学 Binocular stereo matching method based on edge information
CN112116640A (en) * 2020-09-11 2020-12-22 南京理工大学智能计算成像研究院有限公司 Binocular stereo matching method based on OpenCL
CN112163622A (en) * 2020-09-30 2021-01-01 山东建筑大学 Overall situation and local fusion constrained line segment feature matching method for aviation wide-baseline stereopair
CN112308897A (en) * 2020-10-30 2021-02-02 江苏大学 Three-dimensional matching method based on neighborhood information constraint and self-adaptive window
CN112435282A (en) * 2020-10-28 2021-03-02 西安交通大学 Real-time binocular stereo matching method based on self-adaptive candidate parallax prediction network
CN113129313A (en) * 2021-03-22 2021-07-16 北京中科慧眼科技有限公司 Dense matching algorithm, system and intelligent terminal based on superpixel

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107248179A (en) * 2017-06-08 2017-10-13 爱佩仪中测(成都)精密仪器有限公司 Three-dimensional matching method for building up for disparity computation
CN108876841B (en) * 2017-07-25 2023-04-28 成都通甲优博科技有限责任公司 Interpolation method and system in parallax refinement of parallax map
CN107730543B (en) * 2017-09-08 2021-05-14 成都通甲优博科技有限责任公司 Rapid iterative computation method for semi-dense stereo matching
CN107945217B (en) * 2017-11-20 2020-07-14 北京宇航系统工程研究所 Image characteristic point pair rapid screening method and system suitable for automatic assembly
CN109816710B (en) * 2018-12-13 2023-08-29 中山大学 Parallax calculation method for binocular vision system with high precision and no smear

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110007948A1 (en) * 2004-04-02 2011-01-13 The Boeing Company System and method for automatic stereo measurement of a point of interest in a scene
CN102609936A (en) * 2012-01-10 2012-07-25 四川长虹电器股份有限公司 Stereo image matching method based on belief propagation
CN103440653A (en) * 2013-08-27 2013-12-11 北京航空航天大学 Binocular vision stereo matching method
CN104091339A (en) * 2014-07-17 2014-10-08 清华大学深圳研究生院 Rapid image three-dimensional matching method and device
CN106097336A (en) * 2016-06-07 2016-11-09 重庆科技学院 Based on scape solid matching method before and after belief propagation and self similarity divergence measurement

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110007948A1 (en) * 2004-04-02 2011-01-13 The Boeing Company System and method for automatic stereo measurement of a point of interest in a scene
CN102609936A (en) * 2012-01-10 2012-07-25 四川长虹电器股份有限公司 Stereo image matching method based on belief propagation
CN103440653A (en) * 2013-08-27 2013-12-11 北京航空航天大学 Binocular vision stereo matching method
CN104091339A (en) * 2014-07-17 2014-10-08 清华大学深圳研究生院 Rapid image three-dimensional matching method and device
CN106097336A (en) * 2016-06-07 2016-11-09 重庆科技学院 Based on scape solid matching method before and after belief propagation and self similarity divergence measurement

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIANG, FENG ET AL.: "Fast Stereo Matching Algorithm Based on Bayesian Model", COMPUTER ENGINEERING AND DESIGN, vol. 36, no. 4, 16 April 2015 (2015-04-16), pages 956 - 961, ISSN: 1000-7024 *

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109887021A (en) * 2019-01-19 2019-06-14 天津大学 Based on the random walk solid matching method across scale
CN109887021B (en) * 2019-01-19 2023-06-06 天津大学 Cross-scale-based random walk stereo matching method
CN111476837A (en) * 2019-01-23 2020-07-31 上海科技大学 Adaptive stereo matching optimization method and device, equipment and storage medium thereof
CN111476837B (en) * 2019-01-23 2023-02-24 上海科技大学 Adaptive stereo matching optimization method and device, equipment and storage medium thereof
CN109961092B (en) * 2019-03-04 2022-11-01 北京大学深圳研究生院 Binocular vision stereo matching method and system based on parallax anchor point
CN109961092A (en) * 2019-03-04 2019-07-02 北京大学深圳研究生院 A kind of binocular vision solid matching method and system based on parallax anchor point
CN109978934A (en) * 2019-03-04 2019-07-05 北京大学深圳研究生院 A kind of binocular vision solid matching method and system based on matching cost weighting
CN109978934B (en) * 2019-03-04 2023-01-10 北京大学深圳研究生院 Binocular vision stereo matching method and system based on matching cost weighting
CN110533711A (en) * 2019-09-04 2019-12-03 云南电网有限责任公司带电作业分公司 A kind of efficient large scale Stereo Matching Algorithm based on acceleration robust feature
CN110599478A (en) * 2019-09-16 2019-12-20 中山大学 Image area copying and pasting tampering detection method
CN110599478B (en) * 2019-09-16 2023-02-03 中山大学 Image area copying and pasting tampering detection method
CN111439889A (en) * 2020-04-01 2020-07-24 吉林建筑大学 Water circulation treatment method for cooperatively removing iron, manganese, ammonia nitrogen and organic matters in underground water
CN111784753A (en) * 2020-07-03 2020-10-16 江苏科技大学 Three-dimensional reconstruction stereo matching method for autonomous underwater robot recovery butt joint foreground view field
CN111784753B (en) * 2020-07-03 2023-12-05 江苏科技大学 Jing Shichang three-dimensional reconstruction stereo matching method before recovery and docking of autonomous underwater robot
CN111833393A (en) * 2020-07-05 2020-10-27 桂林电子科技大学 Binocular stereo matching method based on edge information
CN112116640A (en) * 2020-09-11 2020-12-22 南京理工大学智能计算成像研究院有限公司 Binocular stereo matching method based on OpenCL
CN112116640B (en) * 2020-09-11 2024-02-23 南京理工大学智能计算成像研究院有限公司 Binocular stereo matching method based on OpenCL
CN112163622A (en) * 2020-09-30 2021-01-01 山东建筑大学 Overall situation and local fusion constrained line segment feature matching method for aviation wide-baseline stereopair
CN112435282A (en) * 2020-10-28 2021-03-02 西安交通大学 Real-time binocular stereo matching method based on self-adaptive candidate parallax prediction network
CN112435282B (en) * 2020-10-28 2023-09-12 西安交通大学 Real-time binocular stereo matching method based on self-adaptive candidate parallax prediction network
CN112308897A (en) * 2020-10-30 2021-02-02 江苏大学 Three-dimensional matching method based on neighborhood information constraint and self-adaptive window
CN113129313A (en) * 2021-03-22 2021-07-16 北京中科慧眼科技有限公司 Dense matching algorithm, system and intelligent terminal based on superpixel

Also Published As

Publication number Publication date
CN106780442A (en) 2017-05-31
CN106780442B (en) 2019-12-24

Similar Documents

Publication Publication Date Title
WO2018098891A1 (en) Stereo matching method and system
US9754377B2 (en) Multi-resolution depth estimation using modified census transform for advanced driver assistance systems
CN107220997B (en) Stereo matching method and system
Schonberger et al. Learning to fuse proposals from multiple scanline optimizations in semi-global matching
US8199977B2 (en) System and method for extraction of features from a 3-D point cloud
CN110009663B (en) Target tracking method, device, equipment and computer readable storage medium
CN109658378B (en) Pore identification method and system based on soil CT image
Kong et al. Local stereo matching using adaptive cross-region-based guided image filtering with orthogonal weights
Mordohai The self-aware matching measure for stereo
Psota et al. A local iterative refinement method for adaptive support-weight stereo matching
CN107122782B (en) Balanced semi-dense stereo matching method
CN111179327B (en) Depth map calculation method
Geetha et al. An improved method for segmentation of point cloud using minimum spanning tree
Oh et al. Probabilistic Correspondence Matching using Random Walk with Restart.
Zhou et al. Multiple point sets registration based on Expectation Maximization algorithm
Chen et al. Patch-based stereo matching using 3D convolutional neural networks
CN113344989B (en) NCC and Census minimum spanning tree aerial image binocular stereo matching method
Morreale et al. Dense 3D visual mapping via semantic simplification
Ibrahim et al. Adaptive colour‐guided non‐local means algorithm for compound noise reduction of depth maps
Saygili et al. Stereo similarity metric fusion using stereo confidence
Lefebvre et al. A 1D approach to correlation-based stereo matching
Navarro et al. Filtering and interpolation of inaccurate and incomplete depth maps
Zhang et al. Image edge based efficient stereo matching
CN114511673B (en) Improved ICP-based seabed local environment preliminary construction method
Sun et al. A new object scene flow algorithm based on support points selection and robust moving object proposal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17875104

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17875104

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17875104

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.02.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17875104

Country of ref document: EP

Kind code of ref document: A1