CN107578429B - Stereo image dense matching method based on dynamic programming and global cost accumulation path - Google Patents

Stereo image dense matching method based on dynamic programming and global cost accumulation path Download PDF

Info

Publication number
CN107578429B
CN107578429B CN201710576951.7A CN201710576951A CN107578429B CN 107578429 B CN107578429 B CN 107578429B CN 201710576951 A CN201710576951 A CN 201710576951A CN 107578429 B CN107578429 B CN 107578429B
Authority
CN
China
Prior art keywords
cost
pixel
matching
theta
reference image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710576951.7A
Other languages
Chinese (zh)
Other versions
CN107578429A (en
Inventor
黄旭
周刚
高其双
陆正武
蔡刚山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WUHAN ENGINEERING SCIENCE & TECHNOLOGY INSTITUTE
Original Assignee
WUHAN ENGINEERING SCIENCE & TECHNOLOGY INSTITUTE
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 WUHAN ENGINEERING SCIENCE & TECHNOLOGY INSTITUTE filed Critical WUHAN ENGINEERING SCIENCE & TECHNOLOGY INSTITUTE
Priority to CN201710576951.7A priority Critical patent/CN107578429B/en
Publication of CN107578429A publication Critical patent/CN107578429A/en
Application granted granted Critical
Publication of CN107578429B publication Critical patent/CN107578429B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a stereo image dense matching method based on dynamic programming and a global cost cumulative path, which comprises the following steps: 1. selecting a reference image and a reference image according to an input stereoscopic image; 2. selecting matching measure and calculating a matching cost matrix; 3. designing a global cost accumulation path, and adopting a dynamic programming method to accumulate the cost along the global path to obtain a cost accumulation matrix; 4. and calculating the dense matching disparity map according to the cost accumulation matrix. The method can solve the problem that the matching result of the traditional semi-global dense matching algorithm is not robust, can solve the problem that the time complexity of the traditional global matching algorithm is high, can quickly obtain a robust and accurate dense matching disparity map, and can provide technical support for applications such as digital photogrammetry and remote sensing, computer vision, virtual reality, digital earth and the like.

Description

Stereo image dense matching method based on dynamic programming and global cost accumulation path
Technical Field
The invention relates to the technical field of stereo image dense matching, in particular to a stereo image dense matching method based on dynamic programming and a global cost cumulative path.
Background
The existing stereo image dense matching algorithm converts the stereo image dense matching problem into a 'number' problem, and searches a number for each pixel on a reference image, thereby achieving the purpose of matching the homonymy point between two images pixel by pixel. The dense matching of the stereo images is one of core technologies in the fields of photogrammetry, remote sensing, computer vision, virtual reality, three-dimensional reconstruction and the like, and can be applied to smart cities, intelligent transportation, national resource investigation, national defense construction, game animation and the like.
According to different optimization methods, the stereo image dense matching method can be divided into: local dense matching, semi-global dense matching, and global dense matching. The local dense matching algorithm assumes that a pixel to be matched is taken as a center, and parallaxes of pixels in a certain surrounding area (regular or irregular) are consistent, so that a single-point matching problem is converted into a problem of comparing similarity of two areas. The local dense matching algorithm is simplest, high in matching efficiency and high in calculation speed, but the matching precision of the local dense matching algorithm is low, and the matching result is not robust. The semi-global dense matching algorithm converts the dense matching problem into a calculation problem of the optimal solution of the global energy function, and obtains the approximate optimal solution of the global energy function as the final dense matching result through one-dimensional dynamic planning in multiple directions. The semi-global dense matching algorithm is also high in matching efficiency, but the dynamically planned path is one-dimensional, namely the cost accumulation of each pixel is only related to the pixels in the scanning line direction, so that the matching result of the semi-global dense matching algorithm is not robust enough, and the matching point cloud is rough. The global matching algorithm converts the matching problem into the number problem of the two-dimensional regular grid, and obtains a global optimal solution through optimization ideas such as a maximum flow-minimum cut theory, a belief propagation theory and the like. The method has strong robustness to noise, stable matching result and high precision; however, the algorithm complexity is high, and the matching efficiency is low.
Disclosure of Invention
The invention aims to provide a stereo image dense matching method based on dynamic programming and a global cost accumulation path. The method can give consideration to matching precision and matching efficiency, and finally, the dense high-precision matching disparity map can be quickly generated to serve applications such as three-dimensional modeling.
In order to solve the technical problem, the method for densely matching stereoscopic images based on dynamic programming and global cost cumulative paths is characterized by comprising the following steps of:
step 1: selecting a reference image and a reference image according to an input stereoscopic image;
the stereo images form two stereoscopic vision images, the stereo images comprise a satellite image, an aerial image, an unmanned aerial vehicle image and a close-range image, before matching, a reference image and a reference image are required to be selected, a left-view image is selected as the reference image, a right-view image is selected as the reference image, and the stereo images are corrected into a epipolar stereopair by adopting an epipolar correction method;
step 2: selecting matching measure and calculating a matching cost matrix;
the matching measure is a description operator of the gray features of the pixels and the neighborhood thereof, a good matching measure can accurately describe the gray features of the pixels and the neighborhood thereof, the matching cost is the difference of the matching measures between the two pixels and is used for describing the similarity of the two pixels, and the smaller the matching cost is, the higher the possibility that the two pixels are homonymous pixels is; otherwise, the higher the matching cost is, the lower the possibility that the two pixels are the same-name pixels is, and the HOG operator is selected as the matching measure, as shown in the following formula:
VHOG(p)=(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11)T
wherein p represents a pixel on the reference image; bi(i ═ 0 to 11) represent the value of each bin on the HOG gradient histogram; vHOG(p) represents the HOG match measure for pixel p, T being the transposed symbol;
the distance between the HOG matching measures of two pixels is taken as the matching cost, as shown in the following formula:
Figure BDA0001351197640000031
wherein p represents one pixel on the reference image; d represents a parallax; epl (p, d) indicates the pixels of the same name on the reference image calculated from the pixel p and the disparity d; cHOG(p, d) represents the matching cost of the pixel p corresponding to the disparity d;
Figure BDA0001351197640000032
representing a pixel p on a reference imageHOG matching measure of;
Figure BDA0001351197640000033
representing the matching measure of the corresponding homonymous point on the reference image;
according to the formula, the matching cost of each pixel on the reference image is calculated in sequence, so that a matching cost matrix can be constructed;
and step 3: designing a global cost accumulation path, and adopting a dynamic programming method to accumulate the cost along the global path to obtain a cost accumulation matrix;
the method comprises the steps of designing a global cost accumulation path based on orthogonal scanning lines, namely cost transmission paths exist between any two pixels on a reference image, and realizing cost transmission between any two pixels on the reference image, wherein the scanning line direction is theta, and the vertical scanning line direction is theta(ii) a Firstly, according to the scanning line direction θ, a dynamic programming method is adopted to accumulate the cost, as shown in the following formula:
Figure BDA0001351197640000034
Figure BDA0001351197640000041
Sθ(p,d)=Lθ(p,d)+Lθ'(p,d)
wherein p represents one pixel on the reference image; p-theta represents the previous pixel of pixel p on the scan line theta; p + θ represents a pixel subsequent to the pixel p on the scanning line θ; d represents the current disparity; θ represents the direction of the scan line; cHOG(p, d) represents the matching cost of the pixel p corresponding to the disparity d; l isθ(p,d)、Lθ(p-θ,d)、Lθ(p-θ,d-1)、Lθ(p-theta, d +1) respectively represents the accumulated costs of the pixels p and p-theta corresponding to the parallaxes d, d-1 and d +1 along the positive direction of the scanning line theta; l isθ'(p,d)、Lθ'(p+θ,d)、Lθ'(p+θ,d-1)、Lθ'(p+ θ, d +1) represents the cumulative cost of the corresponding disparities d, d-1 and d +1 for pixel p and pixel p + θ, respectively, in the opposite direction along scan line θ; sθ(p, d) represents the total accumulated cost of the pixel p on the scan line θ corresponding to the parallax d; p1And P2Denotes a penalty factor, P2Is greater than P1(ii) a k represents any parallax within the parallax range;
Figure BDA0001351197640000042
it is shown that, among all the accumulated costs of the pixel p + theta, a minimum accumulated cost is taken,
Figure BDA0001351197640000043
taking the smallest cumulative cost from all the cumulative costs representing the pixels p-theta;
then, the cumulative cost S in the theta directionθ(p, d) as a new matching cost, and then according to the scanning line direction thetaAnd carrying out cost accumulation by adopting a dynamic programming method, wherein the cost accumulation is shown as the following formula:
Figure BDA0001351197640000051
Figure BDA0001351197640000052
Figure BDA0001351197640000053
wherein p represents one pixel on the reference image; p-thetaIs shown at the scanning line thetaUp, the previous pixel of pixel p; p + thetaIs shown at the scanning line thetaUp, the next pixel of pixel p; d represents the current disparity; thetaRepresents a direction perpendicular to the scan line; sθ(p, d) represents the cumulative cost of the corresponding disparity d on the scan line θ;
Figure BDA0001351197640000054
Figure BDA0001351197640000055
respectively representing a pixel p and a pixel p-thetaAlong the scan line thetaThe positive direction corresponds to the cumulative cost of the parallaxes d, d-1 and d + 1;
Figure BDA0001351197640000056
Figure BDA0001351197640000057
respectively representing a pixel p and a pixel p + thetaAlong the scan line thetaCumulative costs corresponding to disparities d, d-1, and d +1 in the opposite direction;
Figure BDA0001351197640000058
is shown at the scanning line thetaUpper, total cumulative cost; p1And P2Denotes a penalty factor, P2Is greater than P1(ii) a k represents any parallax within the parallax range;
Figure BDA0001351197640000061
is shown at pixel p + thetaOf all the cumulative costs of (a), the smallest cumulative cost is taken,
Figure BDA0001351197640000062
representing a pixel p-thetaTaking a minimum cumulative cost from all the cumulative costs;
through the global cost accumulation based on the orthogonal scanning lines, the cost accumulation path between any two pixels on the reference image can be composed of the orthogonal scanning lines, the scanning line directions include a horizontal scanning line direction, a vertical scanning line direction and a diagonal scanning line direction, in order to reduce the accumulated errors in different directions and improve the precision of dense matching, the cost accumulation results in all directions need to be added, as shown in the following formula:
Figure BDA0001351197640000063
wherein S (p, d) represents the total accumulated cost of the pixel p on the reference image corresponding to the parallax d,
Figure BDA0001351197640000064
is shown at the scanning line thetaUpper, total cumulative cost;
sequentially calculating the total accumulated cost of each pixel on the reference image, thereby constructing a cost accumulated matrix;
and 4, step 4: calculating a dense matching disparity map according to the cost accumulation matrix;
according to the cost accumulation matrix S (p, d), sequentially finding the disparity corresponding to the minimum accumulated cost of each pixel as the final disparity of the pixel, as shown in the following formula:
Figure BDA0001351197640000065
wherein, the pixel p represented by D (p) is the final parallax; k represents a value within the range of parallax, any one parallax,
Figure BDA0001351197640000066
representing the minimum cost in the cumulative cost S (p, k) corresponding to the pixel p, and d represents the parallax;
and sequentially calculating the final parallax of each pixel on the reference image to obtain a dense matching parallax image.
The invention has the beneficial effects that:
the invention can design a global cost accumulation path, adopts a dynamic programming method to realize rapid matching, can solve the problem that the matching result of the traditional semi-global matching method is not robust, can solve the problem that the matching time of the global matching method is high in complexity, finally realizes high-precision, rapid and robust dense matching, and can serve the application of three-dimensional modeling and the like.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a schematic diagram of a global cost accumulation path θ direction;
FIG. 3 is a graph of a global cost accumulation path θA schematic view of the direction;
Detailed Description
The invention is described in further detail below with reference to the following figures and specific examples:
the invention relates to a stereo image dense matching method based on dynamic programming and a global cost cumulative path, which comprises the following steps:
step 1: selecting a reference image and a reference image according to an input stereoscopic image;
the stereo images form two stereoscopic vision images, the stereo images comprise a satellite image, an aerial image, an unmanned aerial vehicle image and a close-range image, before matching, a reference image and a reference image need to be selected, a left-view image is selected as the reference image, a right-view image is selected as the reference image, the stereo images are corrected into a epipolar stereopair by adopting an epipolar correction method, and the epipolar correction method can adopt an inituridorrectifymap () function in an open-source code library OpenCV;
step 2: selecting matching measure and calculating a matching cost matrix;
the matching measure is a description operator of the gray features of the pixels and the neighborhood thereof, a good matching measure can accurately describe the gray features of the pixels and the neighborhood thereof, the matching cost is the difference of the matching measures between the two pixels and is used for describing the similarity of the two pixels, and the smaller the matching cost is, the higher the possibility that the two pixels are homonymous pixels is; otherwise, the higher the matching cost, the lower the probability that the two pixels are the same-name pixels, and select an hog (histogram of ordered gradient) operator as the matching measure, as shown in the following formula:
VHOG(p)=(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11)T
wherein p represents a pixel on the reference image; bi(i ═ 0 to 11) represent the value of each bin on the HOG gradient histogram; vHOG(p) HOG match test for pixel pDegree, T is a transposed symbol;
the HOG matching measure is a mature technology, and is not repeated in the invention;
the distance between the HOG matching measures of two pixels is taken as the matching cost, as shown in the following formula:
Figure BDA0001351197640000081
wherein p represents one pixel on the reference image; d represents a parallax; epl (p, d) indicates the pixels of the same name on the reference image calculated from the pixel p and the disparity d; cHOG(p, d) represents the matching cost of the pixel p corresponding to the disparity d;
Figure BDA0001351197640000082
representing the HOG matching measure of a pixel p on a reference image;
Figure BDA0001351197640000083
representing the matching measure of the corresponding homonymous point on the reference image;
according to the formula, the matching cost of each pixel on the reference image is calculated in sequence, so that a matching cost matrix can be constructed;
and step 3: designing a global cost accumulation path, and adopting a dynamic programming method to accumulate the cost along the global path to obtain a cost accumulation matrix;
the method comprises the steps of designing a global cost accumulation path based on orthogonal scanning lines, namely cost transmission paths exist between any two pixels on a reference image, and realizing cost transmission between any two pixels on the reference image, wherein the scanning line direction is theta, and the vertical scanning line direction is theta(ii) a Firstly, according to the scanning line direction θ, performing cost accumulation by using a dynamic programming method, as shown in fig. 2, each square represents one pixel; dark squares represent pixels where the current cost accumulates; the arrow direction represents the direction of the scan line, and fig. 2 shows the path of the accumulated matching cost when θ is 0 °. At this time, the generation of each pixelThe price accumulation is only related to the pixels in the scanning line direction, and has no relation with the pixels outside the scanning line;
the specific cost accumulation formula is shown as follows:
Figure BDA0001351197640000091
Figure BDA0001351197640000092
Sθ(p,d)=Lθ(p,d)+Lθ'(p,d)
wherein p represents one pixel on the reference image; p-theta represents the previous pixel of pixel p on the scan line theta; p + θ represents a pixel subsequent to the pixel p on the scanning line θ; d represents the current disparity; θ represents the direction of the scan line; cHOG(p, d) represents the matching cost of the pixel p corresponding to the disparity d; l isθ(p,d)、Lθ(p-θ,d)、Lθ(p-θ,d-1)、Lθ(p-theta, d +1) respectively represents the accumulated costs of the pixels p and p-theta corresponding to the parallaxes d, d-1 and d +1 along the positive direction of the scanning line theta; l isθ'(p,d)、Lθ'(p+θ,d)、Lθ'(p+θ,d-1)、Lθ' (p + θ, d +1) represents the cumulative costs of the corresponding disparities d, d-1, and d +1 along the scan line θ in the opposite direction to the pixel p and the pixel p + θ, respectively; sθ(p, d) represents the total accumulated cost of the pixel p on the scan line θ corresponding to the parallax d; p1And P2Denotes a penalty factor, P2Is greater than P1(ii) a k represents any parallax within the parallax range;
Figure BDA0001351197640000093
it is shown that, among all the accumulated costs of the pixel p + theta, a minimum accumulated cost is taken,
Figure BDA0001351197640000101
taking the smallest cumulative cost from all the cumulative costs representing the pixels p-theta;
then, the cumulative cost S in the theta directionθ(p, d) as a new matching cost, and then according to the scanning line direction thetaAnd performing cost accumulation by using a dynamic programming method, as shown in fig. 3, p represents a pixel of current cost accumulation, and a white arrow represents a direction θAs can be seen from fig. 3, after the scan lines in the vertical direction are added, the cost accumulation between any two points on the reference image, specifically, the sum of θThe formula for the directional cost accumulation is shown as follows:
Figure BDA0001351197640000102
Figure BDA0001351197640000103
Figure BDA0001351197640000104
wherein p represents one pixel on the reference image; p-thetaIs shown at the scanning line thetaUp, the previous pixel of pixel p; p + thetaIs shown at the scanning line thetaUp, the next pixel of pixel p; d represents the current disparity; thetaRepresents a direction perpendicular to the scan line; sθ(p, d) represents the cumulative cost of the corresponding disparity d on the scan line θ;
Figure BDA0001351197640000105
Figure BDA0001351197640000111
respectively representing a pixel p and a pixel p-thetaAlong the scan line thetaThe positive direction corresponds to the cumulative cost of the parallaxes d, d-1 and d + 1;
Figure BDA0001351197640000112
Figure BDA0001351197640000113
respectively representing a pixel p and a pixel p + thetaAlong the scan line thetaCumulative costs corresponding to disparities d, d-1, and d +1 in the opposite direction;
Figure BDA0001351197640000114
is shown at the scanning line thetaUpper, total cumulative cost; p1And P2Denotes a penalty factor, P2Is greater than P1(ii) a k represents any parallax within the parallax range;
Figure BDA0001351197640000115
is shown at pixel p + thetaOf all the cumulative costs of (a), the smallest cumulative cost is taken,
Figure BDA0001351197640000116
representing a pixel p-thetaTaking a minimum cumulative cost from all the cumulative costs;
through the global cost accumulation based on the orthogonal scanning lines, the cost accumulation path between any two pixels on the reference image can be composed of the orthogonal scanning lines, the scanning line directions include a horizontal scanning line direction (0 ° direction), a vertical scanning line direction (90 ° direction) and diagonal scanning line directions (45 ° and 135 ° directions), in order to reduce the accumulated errors in different directions and improve the precision of dense matching, the cost accumulation results in all directions need to be added, as shown in the following formula:
Figure BDA0001351197640000117
wherein S (p, d) represents the total accumulated cost of the pixel p on the reference image corresponding to the parallax d,
Figure BDA0001351197640000118
is shown at the scanning line thetaUpper, total cumulative cost;
sequentially calculating the total accumulated cost of each pixel on the reference image, thereby constructing a cost accumulated matrix;
and 4, step 4: calculating a dense matching disparity map according to the cost accumulation matrix;
according to the cost accumulation matrix S (p, d), sequentially finding the disparity corresponding to the minimum accumulated cost of each pixel as the final disparity of the pixel, as shown in the following formula:
Figure BDA0001351197640000121
wherein, the pixel p represented by D (p) is the final parallax; k represents a value within the range of parallax, any one parallax,
Figure BDA0001351197640000122
representing the minimum cost in the cumulative cost S (p, k) corresponding to the pixel p, and d represents the parallax;
and sequentially calculating the final parallax of each pixel on the reference image to obtain a dense matching parallax image.
In step 2 of the above technical solution, the size of the HOG matching measure window is 5.
In step 2 of the above technical solution, the pixel p corresponds to the matching cost C of the parallax dHOGAnd (p, d) normalization processing is required, so that subsequent dense matching calculation is facilitated.
In step 3 of the above technical scheme, a penalty factor P1And P2The values of (A) are 0.3 and 0.5 respectively.
The invention designs a global cost accumulation path, can generate a robust dense matching result, fully utilizes the high-efficiency calculation characteristic of dynamic programming, finally realizes the fast, high-precision and high-robustness dense matching of the three-dimensional images, and can provide technical support for the application of digital cities, smart cities and the like.
Details not described in this specification are within the skill of the art that are well known to those skilled in the art.

Claims (2)

1. A stereo image dense matching method based on dynamic programming and global cost cumulative path is characterized by comprising the following steps:
step 1: selecting a reference image and a reference image according to an input stereoscopic image;
the stereo images form two stereoscopic vision images, the stereo images comprise a satellite image, an aerial image, an unmanned aerial vehicle image and a close-range image, before matching, a reference image and a reference image are required to be selected, a left-view image is selected as the reference image, a right-view image is selected as the reference image, and the stereo images are corrected into a epipolar stereopair by adopting an epipolar correction method; the epipolar correction method can adopt an initUnderistortRectfyMap () function in an open-source code library OpenCV;
step 2: selecting matching measure and calculating a matching cost matrix;
the matching measure is a description operator of the gray features of the pixels and the neighborhood thereof, a good matching measure can accurately describe the gray features of the pixels and the neighborhood thereof, the matching cost is the difference of the matching measures between the two pixels and is used for describing the similarity of the two pixels, and the smaller the matching cost is, the higher the possibility that the two pixels are homonymous pixels is; otherwise, the higher the matching cost is, the lower the possibility that the two pixels are the same-name pixels is, and the HOG operator is selected as the matching measure, as shown in the following formula:
VHOG(p)=(b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11)T
wherein p represents a pixel on the reference image; bi(i ═ 0 to 11) represent the value of each bin on the HOG gradient histogram; vHOG(p) represents the HOG match measure for pixel p, T being the transposed symbol;
the distance between the HOG matching measures of two pixels is taken as the matching cost, as shown in the following formula:
Figure FDA0002776639930000011
wherein p represents one pixel on the reference image; d represents a parallax;epl (p, d) indicates the pixels of the same name on the reference image calculated from the pixel p and the disparity d; cHOG(p, d) represents the matching cost of the pixel p corresponding to the disparity d;
Figure FDA0002776639930000012
representing the HOG matching measure of a pixel p on a reference image;
Figure FDA0002776639930000021
representing the matching measure of the corresponding homonymous point on the reference image;
according to the formula, the matching cost of each pixel on the reference image is calculated in sequence, so that a matching cost matrix can be constructed;
and step 3: designing a global cost accumulation path, and adopting a dynamic programming method to accumulate the cost along the global path to obtain a cost accumulation matrix;
the method comprises the steps of designing a global cost accumulation path based on orthogonal scanning lines, namely cost transmission paths exist between any two pixels on a reference image, and realizing cost transmission between any two pixels on the reference image, wherein the scanning line direction is theta, and the vertical scanning line direction is theta(ii) a Firstly, according to the scanning line direction θ, a dynamic programming method is adopted to accumulate the cost, as shown in the following formula:
Figure FDA0002776639930000022
Figure FDA0002776639930000023
Sθ(p,d)=Lθ(p,d)+Lθ'(p,d)
wherein p represents one pixel on the reference image; p-theta represents the previous pixel of pixel p on the scan line theta; p + θ represents a pixel subsequent to the pixel p on the scanning line θ; d represents the current disparity; theta denotes sweepThe direction of the line; cHOG(p, d) represents the matching cost of the pixel p corresponding to the disparity d; l isθ(p,d)、Lθ(p-θ,d)、Lθ(p-θ,d-1)、Lθ(p-theta, d +1) respectively represents the accumulated costs of the pixels p and p-theta corresponding to the parallaxes d, d-1 and d +1 along the positive direction of the scanning line theta;
Figure FDA0002776639930000036
Lθ'(p+θ,d)、Lθ'(p+θ,d-1)、Lθ' (p + θ, d +1) represents the cumulative costs of the corresponding disparities d, d-1, and d +1 along the scan line θ in the opposite direction to the pixel p and the pixel p + θ, respectively; sθ(p, d) represents the total accumulated cost of the pixel p on the scan line θ corresponding to the parallax d; p1And P2Denotes a penalty factor, P2Is greater than P1(ii) a k represents any parallax within the parallax range;
Figure FDA0002776639930000031
it is shown that, among all the accumulated costs of the pixel p + theta, a minimum accumulated cost is taken,
Figure FDA0002776639930000032
taking the smallest cumulative cost from all the cumulative costs representing the pixels p-theta;
then, the cumulative cost S in the theta directionθ(p, d) as a new matching cost, and then according to the scanning line direction thetaAnd carrying out cost accumulation by adopting a dynamic programming method, wherein the cost accumulation is shown as the following formula:
Figure FDA0002776639930000033
Figure FDA0002776639930000034
Figure FDA0002776639930000035
wherein p represents one pixel on the reference image; p-thetaIs shown at the scanning line thetaUp, the previous pixel of pixel p; p + thetaIs shown at the scanning line thetaUp, the next pixel of pixel p; d represents the current disparity; thetaRepresents a direction perpendicular to the scan line; sθ(p, d) represents the cumulative cost of the corresponding disparity d on the scan line θ;
Figure FDA0002776639930000041
Figure FDA0002776639930000042
respectively representing a pixel p and a pixel p-thetaAlong the scan line thetaThe positive direction corresponds to the cumulative cost of the parallaxes d, d-1 and d + 1;
Figure FDA0002776639930000043
Figure FDA0002776639930000044
respectively representing a pixel p and a pixel p + thetaAlong the scan line thetaCumulative costs corresponding to disparities d, d-1, and d +1 in the opposite direction;
Figure FDA0002776639930000045
is shown at the scanning line thetaUpper, total cumulative cost; p1And P2Denotes a penalty factor, P2Is greater than P1(ii) a k represents any parallax within the parallax range;
Figure FDA0002776639930000046
is shown at pixel p + thetaOf all the cumulative costs of (a), the smallest cumulative cost is taken,
Figure FDA0002776639930000047
representing a pixel p-thetaTaking a minimum cumulative cost from all the cumulative costs;
through the global cost accumulation based on the orthogonal scanning lines, the cost accumulation path between any two pixels on the reference image can be composed of the orthogonal scanning lines, the scanning line directions include a horizontal scanning line direction, a vertical scanning line direction and a diagonal scanning line direction, in order to reduce the accumulated errors in different directions and improve the precision of dense matching, the cost accumulation results in all directions need to be added, as shown in the following formula:
Figure FDA0002776639930000048
wherein S (p, d) represents the total accumulated cost of the pixel p on the reference image corresponding to the parallax d,
Figure FDA0002776639930000051
is shown at the scanning line thetaUpper, total cumulative cost;
sequentially calculating the total accumulated cost of each pixel on the reference image, thereby constructing a cost accumulated matrix;
and 4, step 4: calculating a dense matching disparity map according to the cost accumulation matrix;
according to the cost accumulation matrix S (p, d), sequentially finding the disparity corresponding to the minimum accumulated cost of each pixel as the final disparity of the pixel, as shown in the following formula:
Figure FDA0002776639930000052
wherein, the pixel p represented by D (p) is the final parallax; k represents a value within the range of parallax, any one parallax,
Figure FDA0002776639930000053
representing the minimum cost in the cumulative cost S (p, k) corresponding to the pixel p, and d represents the parallax;
sequentially calculating the final parallax of each pixel on the reference image to obtain a dense matching parallax image;
in the step 2, the matching cost C of the pixel p corresponding to the parallax dHOG(p, d) normalization processing is needed, so that subsequent dense matching calculation is facilitated;
in said step 3, a penalty factor P1And P2The values of (A) are 0.3 and 0.5 respectively.
2. The method for dense matching of stereo images based on dynamic programming and global cost accumulation according to claim 1, wherein: in step 2, the size of the HOG matching measure window is 5.
CN201710576951.7A 2017-07-14 2017-07-14 Stereo image dense matching method based on dynamic programming and global cost accumulation path Active CN107578429B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710576951.7A CN107578429B (en) 2017-07-14 2017-07-14 Stereo image dense matching method based on dynamic programming and global cost accumulation path

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710576951.7A CN107578429B (en) 2017-07-14 2017-07-14 Stereo image dense matching method based on dynamic programming and global cost accumulation path

Publications (2)

Publication Number Publication Date
CN107578429A CN107578429A (en) 2018-01-12
CN107578429B true CN107578429B (en) 2021-07-20

Family

ID=61050085

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710576951.7A Active CN107578429B (en) 2017-07-14 2017-07-14 Stereo image dense matching method based on dynamic programming and global cost accumulation path

Country Status (1)

Country Link
CN (1) CN107578429B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060283B (en) * 2019-04-17 2020-10-30 武汉大学 Multi-measure semi-global dense matching method
CN111462195B (en) * 2020-04-09 2022-06-07 武汉大学 Irregular angle direction cost aggregation path determination method based on dominant line constraint
CN113902875A (en) * 2021-11-23 2022-01-07 北京智创华科半导体研究院有限公司 Multi-view image global dense matching three-dimensional reconstruction method and device for target object

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8897546B2 (en) * 2011-09-29 2014-11-25 Texas Instruments Incorporated Semi-global stereo correspondence processing with lossless image decomposition
CN104331890B (en) * 2014-10-30 2017-06-16 北京大学深圳研究生院 A kind of global disparity method of estimation and system
CN104318576B (en) * 2014-11-05 2017-04-12 浙江工业大学 Super-pixel-level image global matching method
CN106815594A (en) * 2015-11-30 2017-06-09 展讯通信(上海)有限公司 Solid matching method and device
CN106530337A (en) * 2016-10-31 2017-03-22 武汉市工程科学技术研究院 Non local stereopair dense matching method based on image gray scale guiding

Also Published As

Publication number Publication date
CN107578429A (en) 2018-01-12

Similar Documents

Publication Publication Date Title
CN112132972B (en) Three-dimensional reconstruction method and system for fusing laser and image data
KR102096673B1 (en) Backfilling points in a point cloud
Bosch et al. A multiple view stereo benchmark for satellite imagery
CN103123727B (en) Instant location and map constructing method and equipment
CN105160702B (en) The stereopsis dense Stereo Matching method and system aided in based on LiDAR point cloud
CN111126148B (en) DSM (digital communication system) generation method based on video satellite images
CN105205808B (en) Multi-view images dense Stereo Matching fusion method and system based on multiple features multiple constraint
CN104134216B (en) The laser point cloud autoegistration method described based on 16 dimensional features and system
CN103426165A (en) Precise registration method of ground laser-point clouds and unmanned aerial vehicle image reconstruction point clouds
Chen et al. Transforming a 3-d lidar point cloud into a 2-d dense depth map through a parameter self-adaptive framework
CN103900583A (en) Device and method used for real-time positioning and map building
CN107578429B (en) Stereo image dense matching method based on dynamic programming and global cost accumulation path
CN108399631B (en) Scale invariance oblique image multi-view dense matching method
CN104820991A (en) Multi-soft-constraint stereo matching method based on cost matrix
Tao et al. Stereo priori RCNN based car detection on point level for autonomous driving
CN110889899A (en) Method and device for generating digital earth surface model
CN112435267B (en) Disparity map calculation method for high-resolution urban satellite stereo image
CN108876861B (en) Stereo matching method for extraterrestrial celestial body patrolling device
CN103985154A (en) Three-dimensional model reestablishment method based on global linear method
CN105469386A (en) Method and device for determining height and pitch angle of stereo camera
Stucker et al. ResDepth: Learned residual stereo reconstruction
Parmehr et al. Automatic registration of optical imagery with 3d lidar data using local combined mutual information
CN117132737B (en) Three-dimensional building model construction method, system and equipment
CN115880555A (en) Target detection method, model training method, device, equipment and medium
CN107194334B (en) Video satellite image dense Stereo Matching method and system based on optical flow estimation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant