CN109427043A - A kind of matched smooth item calculation method of parameters of stereopsis global optimization and equipment - Google Patents
A kind of matched smooth item calculation method of parameters of stereopsis global optimization and equipment Download PDFInfo
- Publication number
- CN109427043A CN109427043A CN201710742735.5A CN201710742735A CN109427043A CN 109427043 A CN109427043 A CN 109427043A CN 201710742735 A CN201710742735 A CN 201710742735A CN 109427043 A CN109427043 A CN 109427043A
- Authority
- CN
- China
- Prior art keywords
- pixel
- message
- value
- dir
- smooth item
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000005457 optimization Methods 0.000 title claims abstract description 51
- 238000004364 calculation method Methods 0.000 title claims abstract description 36
- 238000000034 method Methods 0.000 claims abstract description 37
- 238000010586 diagram Methods 0.000 claims description 33
- 230000015654 memory Effects 0.000 claims description 26
- 230000005540 biological transmission Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 15
- 238000003860 storage Methods 0.000 claims description 11
- 238000004891 communication Methods 0.000 claims description 4
- 238000004422 calculation algorithm Methods 0.000 abstract description 23
- 230000000694 effects Effects 0.000 abstract description 8
- 230000006870 function Effects 0.000 description 6
- 230000001052 transient effect Effects 0.000 description 6
- 238000013459 approach Methods 0.000 description 4
- 230000000644 propagated effect Effects 0.000 description 4
- 230000001902 propagating effect Effects 0.000 description 4
- 239000007787 solid Substances 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 241000208340 Araliaceae Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006116 polymerization reaction Methods 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
Classifications
-
- G06T5/70—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Abstract
The present invention provides a kind of matched smooth item calculation method of parameters of stereopsis global optimization, this method includes that the second order gradient value in the neighborhood direction of each pixel is calculated according to the parallax initial value of current layer, according to the second order gradient value in the neighborhood direction, calculate the gradient of disparity in the transmitting message source direction of each pixel, according to the matching cost of the gradient of disparity in the transmitting message source direction of each pixel and corresponding previous pixel, the smooth item parameter of each matching cost of each pixel is obtained.Smooth item calculation method of parameters of the invention, second order gradient value is calculated to all neighborhood directions of each pixel, available higher matching precision and preferably matching robustness, the inclined surface matching effect of weak texture is especially apparent, solves the problems, such as that existing stereopsis global optimization matching algorithm matching precision is low.
Description
Technical field
The present invention relates to image procossings and field of machine vision, and in particular to a kind of stereopsis global optimization is matched flat
Sliding item calculation method of parameters and equipment.
Background technique
Stereopsis global optimization matching algorithm passes through the overall situation based on energy equation using global energy minimization as target
Whole matching is realized in optimization.Energy equation generally comprises data item and smooth item.Data item refers to that stereopsis corresponds to a certain parallax
Corresponding points similarity, one or more of groups such as Gray homogeneity, mutual information, related coefficient, CENSUS distance can be passed through
Closing indicates;Smooth item refers to the punishment parameter applied when the parallax of two neighboring pixel changes, smooth item and its it is corresponding entirely
Office's optimization method is the committed step for being different from local matching algorithm.
Common global optimization matching algorithm has belief propagation algorithm (Belief Propgation, BP), and figure cuts algorithm
(Graph Cuts, GC), total variation (Total Variation, TV) and broad sense total variation (Total Generalized
Variation,GTV).A kind of implicit " frontoparallel " (Frantal-Parallel) effect of traditional global optimization approach, i.e.,
More " like " or " being good at " matches the identical plane of parallax, in the region of parallax variation, the especially weak texture area of parallax variation
Domain, it may appear that step-like parallax caused by " frontoparallel " effect, rather than smooth disparity plane.The improvement occurred in recent years
The parallax of every bit is initialized as a random planar by the method for overparameterization by algorithm, by local optimum and entirely
Being applied in combination for office's optimization, achieves preferable matching effect to inclined surface.But calculation amount is dramatically increased compared with traditional method.
Global optimization matching process generallys use the energy equation of following form using global energy minimization as target:
Wherein, E (D) indicates global energy size, and D indicates that " disparity map " of whole picture image, q are the adjacent pixel of pixel p,
The intersection of Np expression pixel p adjacent pixel.Dp and Dq indicates the parallax of the two pixels.C indicate pixel p parallax be Dp when
Data item indicates that the similarity degree of left and right piece pixel, S are smooth item, indicates the punishment that Dp and Dq does not apply simultaneously.
Fig. 1 be SGM algorithm message propagation path schematic diagram, as shown in Figure 1, message along left and right, up and down and two oblique 45
Direction one way propagation is spent, each pixel only receives the message of a neighborhood territory pixel.Fig. 2 is that the message propagation path of MGM algorithm shows
It is intended to, as shown in Fig. 2, message is equally along 8 directionally independent propagation, but each pixel can receive the message of two neighborhood territory pixels.
It should be pointed out that the two neighborhood territory pixels have respectively received the message also from two neighborhood territory pixels, rather than its
The neighborhood territory pixel that his non-received message is propagated.Fig. 3 is the message propagation path schematic diagram of BP algorithm, as shown in figure 3, message is along upper
Under, left and right four direction propagate, each pixel receives the information from three non-propagating direction neighborhood territory pixels.Classical BP algorithm
Propagation of the message in whole picture image is realized by successive ignition.
Fig. 4 is the schematic diagram of smooth item parameter setting method, and smooth item parameter setting method is unrelated with global optimization approach,
I.e. same smooth item parameter setting method can be adapted for different global optimization approaches.That is, SGM, MGM, BP etc.
Message, which propagates optimization algorithm, can use similar smooth item parameter setting method with others global optimization approach such as GC.
The two-parameter smoothing model of SGM is more representational smooth item model, as shown in figure 4, with propagation path from left to right
For, k-th of matching cost of pixel P receives the method for pixel P1 message are as follows: adds the smallest match cost Lmin of pixel P1
A upper biggish punishment parameter Q2, by -1, k+1 matching cost L of kth of pixel P1k-1、Lk+1In addition one lesser is punished
Penalty parameter Q1.K-th of matching cost of pixel P1 remains unchanged.If Lmin+Q2, Lk-1+Q1、Lk+1+Q1、LkMinimum value be
Ls, the then message value that k-th of matching cost of pixel P is pixel P plus Ls-Lmin.
As can be seen that matching degree and parallax smoothness that the essence of global optimization matching algorithm is point are in entire matching area
Interior balance can obtain the result better than local matching algorithm under the conditions of most.But the calculating of global optimization matching algorithm is often deposited
In the disadvantages of computationally intensive, memory consumption is big, and global optimization will form polymerization or the effect of extension of parallax, and polymerize or extend
Direction can not necessarily be carried out along ideal direction, therefore may cause instead mistake matching result.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of matched smooth item parameter calculating sides of stereopsis global optimization
Method, to solve the problems, such as that existing stereopsis global optimization matching algorithm matching precision is low.
For this purpose, the embodiment of the invention provides following technical solutions:
The embodiment of the invention provides a kind of matched smooth item calculation method of parameters of stereopsis global optimization, including root
The second order gradient value in the neighborhood direction of each pixel is calculated according to the parallax initial value of current layer;According to two ladders in the neighborhood direction
Angle value calculates the gradient of disparity in the transmitting message source direction of each pixel;According to the transmitting message source of each pixel
The matching cost of the gradient of disparity in direction and corresponding previous pixel, obtains the smooth of each matching cost of each pixel
Item parameter.
Optionally, the second order gradient value in the neighborhood direction of each pixel is calculated in the parallax initial value according to current layer
Before step, further includes: obtain upper one layer of disparity map using pyramid matching process;It is obtained according to upper one layer of the disparity map
Take the parallax initial value of current layer.
Optionally, each pixel receives the message transmission value in eight neighborhood directions, is received according to each pixel
The message transmission value in eight neighborhood directions obtains eight message propagation path constitutional diagrams, wherein each described message propagation path
Combination includes two message directions of propagation.
Optionally, the second order gradient value according to the neighborhood direction calculates the transmitting message source of each pixel
The step of gradient of disparity in direction includes: the parallax ladder that eight transmitting message source directions of each pixel are calculated using following formula
Degree:
S(n)i,j+S(n1)i,jWhen > 1,
S(n)i,j+S(n1)i,jWhen≤1, Tn=0;
S(l)i,j+S(l1)i,jWhen > 1,
S(l)i,j+S(l1)i,jWhen≤1, Tl=0;
In formula, S (n)i,j、S(n1)i,j、S(l)i,j、S(l1)i,jThe respectively second order gradient value of the message direction of propagation, wherein
N, l is two message directions of propagation in each message propagation path constitutional diagram, n1、l1For described two message propagation sides
To opposite direction, i, j are respectively the ranks number of image, wherein
dir0,0=0, dir0,1=1
dir1,0=0, dir1,1=-1
dir2,0=1, dir2,1=0
dir3,0=-1, dir3,1=0
dir4,0=1, dir4,1=1
dir5,0=-1, dir5,1=-1
dir6,0=-1, dir6,1=1
dir7,0=1, dir7,1=-1
Dir indicates 8 directions that each 8 neighborhood of pixel represents, first subscript (n, n1,l,l1) indicate specific direction
One of, wherein n and n1For a pair of of opposite direction, l and l1It is also a pair of opposite direction, there is direction 0 and 1,2 and 3,4 and 5,6 and
7, the 2nd subscript includes two numbers, the 1st offset for line direction, the 2nd offset for column direction, dir0,0=0,
dir0,1=1 indicates to deviate a pixel, dir to the right1,0=0, dir1,1=-1 indicates to deviate a pixel, dir to the left4,0=1,
dir4,1=1 indicates to deviate a pixel to upper right (oblique 45 degree of directions).
Optionally, the gradient of disparity in the transmitting message source direction according to each pixel and corresponding previous pixel
Matching cost, obtain the smooth item parameter of each matching cost of each pixel, comprising: propagate in each message
The gradient of disparity for transmitting message source direction according to two of each pixel in combination of paths figure and corresponding previous pixel
Matching cost obtains two transmitting message values in described two transmitting message source directions;It is obtained according to described two transmitting message values
To the average value of described two message values;The average value is each pixel in each message propagation path constitutional diagram
A smooth item parameter, eight smooth item parameters are obtained in each matching cost of each pixel;By what is obtained
Described eight smooth item parameters are added, and are obtained average value, are obtained the smooth item parameter of each matching cost of each pixel.
Optionally, the gradient of disparity in the transmitting message source direction according to each pixel and corresponding previous pixel
Matching cost, obtain the smooth item parameter of each matching cost of each pixel, comprising: propagate in each message
In combination of paths figure: the smallest match cost that current pixel message propagates the previous pixel of first direction is obtained, by the minimum
Matching cost adds the first punishment parameter, obtains the first numerical value;By+1 matching cost of K ' of previous pixel, K ' -1
The second punishment parameter is added with cost, obtains second value and third value;Compare first numerical value, the second value,
The size of a matching cost of K ' of the third value and the previous pixel obtains minimum value;The minimum value is subtracted
The smallest match cost of the previous pixel obtains current pixel k-th matching cost and receives message propagation first direction transmitting
Message value;It repeats the above steps, obtains the current pixel k-th matching cost and receive message propagation second direction transmitting
Message value;Find out the message value of the received first direction transmitting of the k-th matching cost and the message value of second direction transmitting
Average value, the average value be the received message transmission value of the current pixel k-th matching cost;Obtain the current picture
All received message transmission values of matching cost of element;The wherein received message transmission value of each matching cost of the current pixel
For a smooth item parameter of the matching cost;Eight smooth item parameters are obtained in each matching cost, by what is obtained
Described eight smooth item parameters are added, and are obtained average value, are obtained the smooth item parameter of each matching cost of each pixel.
The embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, described
Above-mentioned stereopsis global optimization matched smooth item calculation method of parameters is realized when computer program is executed by processor.
The embodiment of the invention also provides a kind of computer equipments, comprising: at least one processor;And with it is described at least
The memory of one processor communication connection;Wherein, the memory be stored with can by least one described processor execute
Computer program, the computer program are executed by least one described processor, so that at least one described processor executes
The matched smooth item calculation method of parameters of above-mentioned stereopsis global optimization.
The embodiment of the present invention has the advantages that
The embodiment of the invention provides a kind of matched smooth item calculation method of parameters of stereopsis global optimization, this method
The second order gradient value that the neighborhood direction of each pixel is calculated including the parallax initial value according to current layer, according to the two of the neighborhood direction
Ladder angle value calculates the gradient of disparity in the transmitting message source direction of each pixel, according to the transmitting message source direction of each pixel
Gradient of disparity and corresponding previous pixel matching cost, obtain the smooth item parameter of each matching cost of each pixel.
The smooth item calculation method of parameters of the embodiment of the present invention calculates second order gradient value, phase to all neighborhood directions of each pixel
Each matching cost of pixel each for prior art embodiment receives the message transmission in two propagating source directions
Value, and all pixels all transmit message value, available higher matching precision and better matching robustness to next pixel,
The inclined surface matching effect of weak texture is especially apparent, solves existing stereopsis global optimization matching algorithm matching precision
Low problem.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art
Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below
Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor
It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is the message propagation path schematic diagram of SGM algorithm;
Fig. 2 is the message propagation path schematic diagram of MGM algorithm;
Fig. 3 is the message propagation path schematic diagram of BP algorithm;
Fig. 4 is the schematic diagram of smooth item parameter setting method;
Fig. 5 is the process of the matched smooth item calculation method of parameters of stereopsis global optimization according to an embodiment of the present invention
Figure;
Fig. 6 is the message of the matched smooth item calculation method of parameters of stereopsis global optimization according to an embodiment of the present invention
Propagation path schematic diagram;
Fig. 7 is the calculating of the matched smooth item calculation method of parameters of stereopsis global optimization according to an embodiment of the present invention
The hardware structural diagram of machine equipment.
Specific embodiment
Technical solution of the present invention is clearly and completely described below in conjunction with attached drawing, it is clear that described implementation
Example is a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill
Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that term " first ", " second ", " third " are used for description purposes only,
It is not understood to indicate or imply relative importance.
As long as in addition, the non-structure each other of technical characteristic involved in invention described below different embodiments
It can be combined with each other at conflict.
Embodiment 1
A kind of matched smooth item calculation method of parameters of stereopsis global optimization is provided in the present embodiment, and Fig. 5 is
The flow chart of the matched smooth item calculation method of parameters of stereopsis global optimization according to an embodiment of the present invention, as shown in figure 5,
This method comprises the following steps:
S101: the second order gradient value in the neighborhood direction of each pixel is calculated according to the parallax initial value of current layer;To three-dimensional shadow
Picture calculates the second order gradient value in all neighborhood directions of each pixel, obtains the reinforcing effect of image.
S102: according to the second order gradient value in the neighborhood direction, the parallax ladder in the transmitting message source direction of each pixel is calculated
Degree;For each pixel, all neighborhood directions can all transmit message, calculate the gradient of disparity in transmitting message source direction, obtain
More accurate Image Matching.
S103: according to the matching generation of the gradient of disparity in the transmitting message source direction of each pixel and corresponding previous pixel
Valence obtains the smooth item parameter of each matching cost of each pixel;For each pixel when transmitting message, message value is all edge
Propagation path is propagated, and the directive transmitting message value of institute received to each matching cost of each pixel is averaged, and is obtained
The smooth item parameter of each matching cost of each pixel.
Through the above steps, the second order gradient value in the neighborhood direction of each pixel is calculated according to the parallax initial value of current layer,
According to the second order gradient value in the neighborhood direction, the gradient of disparity in the transmitting message source direction of each pixel is calculated, according to each picture
The gradient of disparity in the transmitting message source direction of element and the matching cost of corresponding previous pixel, obtain each matching of each pixel
The smooth item parameter of cost calculates second order gradient value, compared with the existing technology, this hair to all neighborhood directions of each pixel
The each pixel of the smooth item calculation method of parameters of bright embodiment receives the message transmission value in two propagating source directions, and all pictures
Element all transmits message value, available higher matching precision and preferably matching robustness, to weak texture to next pixel
Inclined surface matching effect is especially apparent, and solves the problems, such as that existing stereopsis global optimization matching algorithm matching precision is low.
In a specific embodiment, the neighborhood of each pixel is calculated according to the parallax initial value of current layer in step S101
It further include that upper one layer of disparity map is obtained using pyramid matching process, according to upper one layer before the second order gradient value in direction
The parallax initial value of disparity map acquisition current layer.Elementary tactics of the embodiment of the present invention using message propagating method as global optimization,
Using pyramid matching process, the parallax matched with one layer of pyramid image is as the parallax initial value of current layer and estimation
The basic data of the local parallax gradient, it is assumed that obtained one layer of disparity map D0, current layer is obtained by linear interpolation
Parallax initial value D.
Fig. 6 is the message of the matched smooth item calculation method of parameters of stereopsis global optimization according to an embodiment of the present invention
Propagation path schematic diagram connects as shown in fig. 6, each pixel receives the message transmission value in eight neighborhood directions according to each pixel
The message transmission value for receiving eight neighborhood directions obtains eight message propagation path constitutional diagram (M1... ..., M8), wherein each disappears
Ceasing propagation path combination includes two message directions of propagation.
Above-mentioned steps S101 is related to calculating two ladders in the neighborhood direction of each pixel according to the parallax initial value of current layer
Angle value, it is assumed that the matching cost for having completed current layer calculates, and current layer calculates " the half global second order gradient in 8 neighborhood directions
The algorithm of figure " is as follows:
If current pixel ranks are Pi,j, next pixel of the pixel along 8 neighborhood directions are as follows:
Pn(i+dirn,0,j+dirn,1) (n=0,1 ..., 7) (2)
Wherein,
dir0,0=0, dir0,1=1
dir1,0=0, dir1,1=-1
dir2,0=1, dir2,1=0
dir3,0=-1, dir3,1=0
dir4,0=1, dir4,1=1
dir5,0=-1, dir5,1=-1
dir6,0=-1, dir6,1=1
dir7,0=1, dir7,1=-1
Wherein, dir indicates 8 directions that each 8 neighborhood of pixel represents, and has direction 0 and 1,2 and 3,4 and 5,6 and 7, the 2nd
A subscript includes two numbers, the 1st offset for line direction, the 2nd offset for column direction, dir0,0=0, dir0,1=
1 indicates to deviate a pixel, dir to the right1,0=0, dir1,1=-1 indicates to deviate a pixel, dir to the left4,0=1, dir4,1=
1 indicates to deviate a pixel to upper right (oblique 45 degree of directions).
" half global two-step gradient image " form is identical short for the length and width in corresponding 8 directions of 8 width and current layer image length and width
Integer " image ", the calculation method of the image greyscale are as follows:
If currently calculate be m-th of direction " half global two-step gradient image " S (m), by " the half global second order gradient
The numerical value of each point of figure " is initialized as 0, if the starting behavior si in current propagation direction, starting is classified as sj, termination behavior ei, eventually
Only be classified as ej, line direction moving step length is di, and column direction moving step length is dj, current layer image is wide, it is high be respectively w, h.It is then right
Answer m-th of direction of propagation, the setting method of the above parameter are as follows:
Si=1, ei=h, sj=1, ej=w, di=1, dj=1 (m=0,2,4)
Si=h-2, ei=-1, sj=w-2, ej=-1, di=-1, dj=-1 (m=1,3,5)
Si=1, ei=h, sj=w-2, ej=-1, di=1, dj=-1 (m=7)
Si=h-2, ei=-1, sj=1, ej=w, di=-1, dj=1 (m=6) (3)
" next " pixel row, column coordinate for receiving message can be calculated by the parameter of formula 3, it is assumed that current pixel is to work as
K-th of pixel on preceding propagation path, row, column coordinate are (i, j), and " next " pixel row, column coordinate for receiving message is
(i', j') then has following relationship:
Ei, ej indicate that the last one receives the pixel of message on current propagation path.
To each pixel Pi,j, the adjoining pixel in the direction m is Pi1,j1, wherein
I1=i-dirm,0
J1=j-dirm,1 (4)
Pi,jSecond order gradient along the direction m are as follows:
Ti,j=2Di,j-D(i-dirm,0,j-dirm,1)-D(i+dirm,0,j+dirm,1) (5)
One second order gradient thresholding mx, such as mx=0.5 are set.If current row, column is respectively i, j.Then current " half overall situation two
The calculation method of the numerical value Sm (i, j) of rank gradient map " are as follows:
S(m)i,j=S (m)i,j+1Ti1,j1> mx, Ti,j<=mx
S(m)i,j=S (m)i1,j1+1Ti1,j1<=mx, Ti,j<=mx
S(m)i,j=S (m)i,j-1Ti1,j1<=mx, Ti,j> mx
S(m)i,j=S (m)i1,j1-1Ti1,j1> mx, Ti,j> mx (6)
After the numerical value for calculating " the half global two-step gradient image " of completing current pixel, after i=i+di, j=j+dj, use is above-mentioned
Method calculates " half global two-step gradient image " numerical value of next pixel, that is, calculates the second order gradient magnitude of each pixel.
Above-mentioned steps S102 is related to the second order gradient value according to neighborhood direction, calculates the transmitting message source side of each pixel
To gradient of disparity calculate M group directional combination two gradient of disparity for transmitting source direction in a specific embodiment
Process is as follows:
The message propagation algorithm used herein uses dual path zigzag communication strategy, and dual path combination has 8 kinds, with M table
Show, as shown in fig. 6, being respectively as follows:
In formula, dir indicates 8 directions that each 8 neighborhood of pixel represents, and i, j are respectively the row, column serial number of image, use i
(or j) distinguishes two opposite directions of " it " word propagated to 2 remainders.i1、j1Then indicate the ranks started from " opposite "
Serial number.If image width, height are respectively w, h, that is, i1=h-1-i, j1=w-1-j.I', j' indicate image rotating 45
Row, column serial number after degree, the 3rd width figure above of corresponding diagram 5, at this moment the line number of each column is different, and first row only has pixel a,
Secondary series includes pixel b, c, and third column include pixel d, e, f.i1'、j1' indicate the ranks sequence started from rotation image " opposite "
Number.It should be pointed out that the setting method that " rotation " here is combined just to direction, rather than really to image into
Row rotation process.
Illustrate by taking first figure as an example, since row second from the bottom, secondary series " h " pixel, pixel e and pixel can be received
The message of g, thus the direction of propagation of secondary series pixel be it is left, under to it is right, on.Secondary series complete message propagate after, third arrange from
Pixel n starts to receive the message of pixel k and pixel m, that is to say, that the tertial direction of propagation become it is left, upper to it is right, under, with
The message of each column is propagated all so alternately afterwards.
The gradient of disparity in two transmitting message source directions is calculated each pixel, if both direction is the direction n and the side l
To the gradient of disparity of both direction is respectively TnAnd Tl, the opposite direction of both direction is respectively n1Direction and l1Direction, calculating side
Method are as follows:
S(n)i,j+S(n1)i,jWhen > 1,
S(n)i,j+S(n1)i,jWhen≤1, Tn=0;
S(l)i,j+S(l1)i,jWhen > 1, (8)
S(l)i,j+S(l1)i,jWhen≤1, Tl=0;
In formula, dir's is defined on front it is stated that S (n)i,j、S(n1)i,j、S(l)i,j、S(l1)i,jRespectively message passes
The second order gradient value in direction is broadcast, wherein n, l are two message directions of propagation in each message propagation path constitutional diagram,
n1、l1For the opposite direction of described two message directions of propagation, i, j are respectively the ranks number of image.
Above-mentioned steps S103 is related to according to the gradient of disparity in the transmitting message source direction of each pixel and corresponding previous
The matching cost of pixel obtains the smooth item parameter of each matching cost of each pixel, should in an optional embodiment
Step is included in each message propagation path constitutional diagram, and the gradient of disparity in message source direction is transmitted according to the two of each pixel
With the matching cost of corresponding previous pixel, two transmitting message values in two transmitting message source directions are obtained, are passed according to two
It passs message value and obtains the average value of two message values, which is the every of each pixel in each message propagation path constitutional diagram
The smooth item parameter of one of a matching cost, eight smooth item parameters are obtained in each matching cost, by obtain eight
Smooth item parameter is added, and is obtained average value, is obtained the smooth item parameter of each matching cost of each pixel.Specifically, every
In a message propagation path constitutional diagram, the smallest match cost that current pixel message propagates the previous pixel of first direction is obtained,
The smallest match cost is added into the first punishment parameter, obtains the first numerical value, by+1 matching cost of K ' of previous pixel, the
- 1 matching cost of K ' adds the second punishment parameter, obtains second value and third value;Compare the first numerical value, second value,
The size of a matching cost of K ' of third value and previous pixel obtains minimum value, the minimum value is subtracted previous pixel
Smallest match cost, obtain current pixel k-th matching cost receive message propagate first direction transmitting message value;
The embodiment of the present invention gives specific smooth item calculation method of parameters, according to the message propagation path group in Fig. 6
Figure is closed, to a pixel in one of constitutional diagram, seeks the smooth item calculation method of parameters in its k-th of direction matching cost n
Are as follows:
What above formula was found out is the message transmission value in the direction n, in formula, L'0、L'1、L'2Respectively current pixel K, K-1, K+
1 matching cost, Lk、Lk-1、Lk-2、Lk+1、Lk+2And LminThe respectively previous pixel K, K-1 in the message direction of propagation, K-2, K+1,
K+2 matching cost and the smallest matching cost of previous pixel, Q1、Q2For punishment parameter, T is gradient of disparity, LsendFor k-th
The received transmitting message value of matching cost.
Current pixel k-th matching cost, which is found out, according to above-mentioned formula receives the message value and l that message propagates the transmitting of the direction n
Message value is transmitted in direction, finds out the average value of the two direction message transmission values, and as current pixel k-th matching cost receives
Message transmission value, the as smooth item parameter of one of the k-th matching cost of current pixel, because there is eight message to propagate roads
Diameter constitutional diagram, so each matching cost of each pixel has eight smooth item parameters to find out its eight to each matching cost
The average value of smooth item parameter, the average value are the smooth item parameter of the matching cost, i.e., received message transmission value, each
After the reception message transmission value of matching cost is found out, continue to transmit one by one to all layers of matching cost of next pixel.
The matched smooth item calculation method of parameters of stereopsis global optimization provided in an embodiment of the present invention, can make solid
The available higher matching precision of image optimization matching strategy and preferably matching robustness match the inclined surface of weak texture
Effect is especially apparent.
Embodiment 2
The embodiment of the invention also provides a kind of computer readable storage medium, the computer storage medium is stored with meter
The stereopsis global optimization in above-mentioned any means embodiment can be performed in calculation machine executable instruction, the computer executable instructions
Matched smooth item calculation method of parameters.Wherein, the storage medium can be magnetic disk, CD, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), flash memory (Flash
Memory), hard disk (Hard Disk Drive, abbreviation: HDD) or solid state hard disk (Solid-State Drive, SSD) etc.;Institute
State the combination that storage medium can also include the memory of mentioned kind.
Embodiment 3
Fig. 7 is the calculating of the matched smooth item calculation method of parameters of stereopsis global optimization according to an embodiment of the present invention
The hardware structural diagram of machine equipment, as shown in fig. 7, the equipment includes one or more processors 710 and memory 720,
In Fig. 7 by taking a processor 710 as an example.
The equipment for executing the matched smooth item calculation method of parameters of stereopsis global optimization can also include: input unit
730 and output device 740.
Processor 710, memory 720, input unit 730 and output device 740 can pass through bus or other modes
It connects, in Fig. 7 for being connected by bus.
Processor 710 can be central processing unit (Central Processing Unit, CPU).Processor 710 may be used also
Think other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), field programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
The combination of the chips such as discrete hardware components or above-mentioned all kinds of chips.General processor can be microprocessor or the processing
Device is also possible to any conventional processor etc..
Memory 720 is used as a kind of non-transient computer readable storage medium, can be used for storing non-transient software program, non-
Transient computer executable program and module, such as the matched smooth item ginseng of the stereopsis global optimization in the embodiment of the present application
Corresponding program instruction/the module of number calculating method.The non-transient software that processor 710 is stored in memory 720 by operation
Program, instruction and module, thereby executing the various function application and data processing of server, i.e. the realization above method is implemented
The matched smooth item calculation method of parameters of stereopsis global optimization in example.
Memory 720 may include storing program area and storage data area, wherein storing program area can store operation system
Application program required for system, at least one function;Storage data area can store using for weak passwurd scanning means and be created
Data etc..In addition, memory 720 may include high-speed random access memory, it can also include non-transient memory, such as extremely
A few disk memory, flush memory device or other non-transient solid-state memories.In some embodiments, memory 720
Optional includes the memory remotely located relative to processor 710, these remote memories can pass through network connection to solid
The processing unit that the matched smooth item parameter of image global optimization calculates.The example of above-mentioned network include but is not limited to internet,
Intranet, local area network, mobile radio communication and combinations thereof.
Input unit 730 can receive the number or character information of input, and generates and match with stereopsis global optimization
Smooth item the parameter user setting and function control related key signals input of the processing unit that calculate.Output device 740
It may include that display screen etc. shows equipment.
One or more of modules are stored in the memory 720, when by one or more of processors
When 710 execution, method as shown in Figure 5 is executed.
Method provided by the embodiment of the present invention can be performed in the said goods, has the corresponding functional module of execution method and has
Beneficial effect and the not technical detail of detailed description in the present embodiment, for details, reference can be made in embodiment as shown in Figure 5 to Figure 6
Associated description.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Obviously, the above embodiments are merely examples for clarifying the description, and does not limit the embodiments.It is right
For those of ordinary skill in the art, can also make on the basis of the above description it is other it is various forms of variation or
It changes.There is no necessity and possibility to exhaust all the enbodiments.And it is extended from this it is obvious variation or
It changes still within the protection scope of the invention.
Claims (8)
1. a kind of matched smooth item calculation method of parameters of stereopsis global optimization characterized by comprising
The second order gradient value in the neighborhood direction of each pixel is calculated according to the parallax initial value of current layer;
According to the second order gradient value in the neighborhood direction, the gradient of disparity in the transmitting message source direction of each pixel is calculated;
According to the matching cost of the gradient of disparity in the transmitting message source direction of each pixel and corresponding previous pixel, obtain
The smooth item parameter of each matching cost of each pixel.
2. the matched smooth item calculation method of parameters of stereopsis global optimization according to claim 1, which is characterized in that
Before the second order gradient value in the neighborhood direction that the parallax initial value according to current layer calculates each pixel the step of, also wrap
It includes:
Upper one layer of disparity map is obtained using pyramid matching process;
The parallax initial value of current layer is obtained according to upper one layer of the disparity map.
3. the matched smooth item calculation method of parameters of stereopsis global optimization according to claim 1, which is characterized in that
Each pixel receives the message transmission value in eight neighborhood directions, receives eight neighborhood directions according to each pixel
Message transmission value obtain eight message propagation path constitutional diagrams, wherein the combination of each described message propagation path includes two
The message direction of propagation.
4. the matched smooth item calculation method of parameters of stereopsis global optimization according to claim 3, which is characterized in that
The second order gradient value according to the neighborhood direction calculates the gradient of disparity in the transmitting message source direction of each pixel
Step includes:
The gradient of disparity in eight transmitting message source directions of each pixel is calculated using following formula:
S(n)i,j+S(n1)i,jWhen > 1,
S(n)i,j+S(n1)i,jWhen≤1, Tn=0;
S(l)i,j+S(l1)i,jWhen > 1,
S(l)i,j+S(l1)i,jWhen≤1, Tl=0;
In formula, S (n)i,j、S(n1)i,j、S(l)i,j、S(l1)i,jThe respectively second order gradient value of the message direction of propagation, wherein n, l are
Two message directions of propagation in each message propagation path constitutional diagram, n1、l1For the anti-of described two message directions of propagation
Direction, i, j are respectively the ranks number of image, wherein
dir0,0=0, dir0,1=1
dir1,0=0, dir1,1=-1
dir2,0=1, dir2,1=0
dir3,0=-1, dir3,1=0
dir4,0=1, dir4,1=1
dir5,0=-1, dir5,1=-1
dir6,0=-1, dir6,1=1
dir7,0=1, dir7,1=-1
Dir indicates 8 directions that each 8 neighborhood of pixel represents, first subscript (n, n1,l,l1) indicate one of specific direction,
Wherein n and n1For a pair of of opposite direction, l and l1It is also a pair of opposite direction, there is direction 0 and 1,2 and 3,4 and 5,6 and 7, the 2nd
A subscript includes two numbers, the 1st offset for line direction, the 2nd offset for column direction, dir0,0=0, dir0,1=
1 indicates to deviate a pixel, dir to the right1,0=0, dir1,1=-1 indicates to deviate a pixel, dir to the left4,0=1, dir4,1=
1 indicates to deviate a pixel to upper right (oblique 45 degree of directions).
5. the matched smooth item calculation method of parameters of stereopsis global optimization according to claim 3, which is characterized in that
The gradient of disparity in the transmitting message source direction according to each pixel and the matching cost of corresponding previous pixel, obtain
The smooth item parameter of each matching cost of each pixel, comprising:
In each message propagation path constitutional diagram, the parallax in message source direction is transmitted according to two of each pixel
The matching cost of gradient and corresponding previous pixel obtains two transmitting message values in described two transmitting message source directions;
The average value of described two message values is obtained according to described two transmitting message values;
The average value is a smooth item parameter of each pixel in each message propagation path constitutional diagram, described
Eight smooth item parameters are obtained in each matching cost of each pixel;
Described eight obtained smooth item parameters are added, average value is obtained, obtains each matching cost of each pixel
Smooth item parameter.
6. the matched smooth item calculation method of parameters of stereopsis global optimization according to claim 5, which is characterized in that
The gradient of disparity in the transmitting message source direction according to each pixel and the matching cost of corresponding previous pixel, obtain
The smooth item parameter of each matching cost of each pixel, comprising:
In each message propagation path constitutional diagram:
The smallest match cost that current pixel message propagates the previous pixel of first direction is obtained, the smallest match cost is added
Upper first punishment parameter, obtains the first numerical value;- 1+1 matching cost of K ', K ' matching cost of previous pixel are added
Second punishment parameter, obtains second value and third value;
Compare a matching cost of K ' of first numerical value, the second value, the third value and the previous pixel
Size, obtain minimum value;
The smallest match cost that the minimum value is subtracted to the previous pixel obtains the reception of current pixel k-th matching cost
Message propagates the message value of first direction transmitting;
It repeats the above steps, obtains the current pixel k-th matching cost and receive the message that message propagates second direction transmitting
Value;
The message value that the message value and second direction for finding out the received first direction transmitting of the k-th matching cost transmit is put down
Mean value, the average value are the received message transmission value of the current pixel k-th matching cost;
Obtain the received message transmission value of all matching costs of the current pixel;Wherein each matching generation of the current pixel
The received message transmission value of valence is a smooth item parameter of the matching cost;
Eight smooth item parameters are obtained in each matching cost, and described eight obtained smooth item parameters are added, are obtained
Average value obtains the smooth item parameter of each matching cost of each pixel.
7. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
Such as stereopsis global optimization of any of claims 1-6 matched smooth item parameter meter is realized when processor executes
Calculation method.
8. a kind of computer equipment characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein, be stored with can be by described at least one for the memory
The computer program that a processor executes, the computer program are executed by least one described processor so that it is described at least
One processor perform claim requires the matched smooth item parameter calculating side of stereopsis global optimization described in any one of 1-6
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710742735.5A CN109427043B (en) | 2017-08-25 | 2017-08-25 | Method and equipment for calculating smooth item parameters of global optimization matching of stereoscopic images |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710742735.5A CN109427043B (en) | 2017-08-25 | 2017-08-25 | Method and equipment for calculating smooth item parameters of global optimization matching of stereoscopic images |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109427043A true CN109427043A (en) | 2019-03-05 |
CN109427043B CN109427043B (en) | 2023-08-01 |
Family
ID=65501548
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710742735.5A Active CN109427043B (en) | 2017-08-25 | 2017-08-25 | Method and equipment for calculating smooth item parameters of global optimization matching of stereoscopic images |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109427043B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112435267A (en) * | 2020-11-17 | 2021-03-02 | 哈尔滨工程大学 | Disparity map calculation method for high-resolution urban satellite stereo image |
CN112561832A (en) * | 2020-12-24 | 2021-03-26 | 山东省国土测绘院 | Remote sensing image data storage method and system |
CN112765095A (en) * | 2020-12-24 | 2021-05-07 | 山东省国土测绘院 | Method and system for filing image data of stereo mapping satellite |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040240725A1 (en) * | 2001-10-26 | 2004-12-02 | Li-Qun Xu | Method and apparatus for image matching |
CN102567964A (en) * | 2011-12-08 | 2012-07-11 | 北京控制工程研究所 | Filtering method for stereoscopic vision parallax image |
US20120207388A1 (en) * | 2011-02-10 | 2012-08-16 | Edge 3 Technologies, Inc. | Method and apparatus for disparity computation in stereo images |
US20140254918A1 (en) * | 2013-03-07 | 2014-09-11 | Acer Incorporated | Disparity estimation method of stereoscopic image |
US20150220805A1 (en) * | 2013-03-13 | 2015-08-06 | Beihang University | Image foreground matting method based on neighborhood and non-neighborhood smoothness priors |
US20150365696A1 (en) * | 2014-06-13 | 2015-12-17 | Texas Instruments Incorporated | Optical flow determination using pyramidal block matching |
CN105205808A (en) * | 2015-08-20 | 2015-12-30 | 武汉大学 | Multi-vision image dense coupling fusion method and system based on multiple characteristics and multiple constraints |
-
2017
- 2017-08-25 CN CN201710742735.5A patent/CN109427043B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040240725A1 (en) * | 2001-10-26 | 2004-12-02 | Li-Qun Xu | Method and apparatus for image matching |
US20120207388A1 (en) * | 2011-02-10 | 2012-08-16 | Edge 3 Technologies, Inc. | Method and apparatus for disparity computation in stereo images |
CN102567964A (en) * | 2011-12-08 | 2012-07-11 | 北京控制工程研究所 | Filtering method for stereoscopic vision parallax image |
US20140254918A1 (en) * | 2013-03-07 | 2014-09-11 | Acer Incorporated | Disparity estimation method of stereoscopic image |
US20150220805A1 (en) * | 2013-03-13 | 2015-08-06 | Beihang University | Image foreground matting method based on neighborhood and non-neighborhood smoothness priors |
US20150365696A1 (en) * | 2014-06-13 | 2015-12-17 | Texas Instruments Incorporated | Optical flow determination using pyramidal block matching |
CN105205808A (en) * | 2015-08-20 | 2015-12-30 | 武汉大学 | Multi-vision image dense coupling fusion method and system based on multiple characteristics and multiple constraints |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112435267A (en) * | 2020-11-17 | 2021-03-02 | 哈尔滨工程大学 | Disparity map calculation method for high-resolution urban satellite stereo image |
CN112561832A (en) * | 2020-12-24 | 2021-03-26 | 山东省国土测绘院 | Remote sensing image data storage method and system |
CN112765095A (en) * | 2020-12-24 | 2021-05-07 | 山东省国土测绘院 | Method and system for filing image data of stereo mapping satellite |
CN112561832B (en) * | 2020-12-24 | 2023-12-01 | 山东省国土测绘院 | Remote sensing image data storage method and system |
Also Published As
Publication number | Publication date |
---|---|
CN109427043B (en) | 2023-08-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109427043A (en) | A kind of matched smooth item calculation method of parameters of stereopsis global optimization and equipment | |
US8704875B2 (en) | Apparatus for generating real-time stereoscopic image and method thereof | |
CN103077088B (en) | Based on the dynamic feedback of load equalization methods of PKDT tree in Cluster Rendering environment | |
EP3035587B1 (en) | Hypersphere-based multivariable public key signature/verification system and method | |
CN106254885A (en) | Position block altogether is utilized to carry out estimation | |
CN102074014A (en) | Stereo matching method by utilizing graph theory-based image segmentation algorithm | |
CN109410266A (en) | Stereo Matching Algorithm based on four mould Census transformation and discrete disparity search | |
US20110050689A1 (en) | Method and Apparatus for Creating of 3D Direction Displaying | |
WO2020191731A1 (en) | Point cloud generation method and system, and computer storage medium | |
US9104904B2 (en) | Disparity estimation method of stereoscopic image | |
CN102857778A (en) | System and method for 3D (three-dimensional) video conversion and method and device for selecting key frame in 3D video conversion | |
CN111881985B (en) | Stereo matching method, device, terminal and storage medium | |
Ambrosch et al. | Hardware implementation of an SAD based stereo vision algorithm | |
Kallwies et al. | Triple-SGM: stereo processing using semi-global matching with cost fusion | |
CN106228613A (en) | Construction method, device and the stereoscopic display device of a kind of virtual three-dimensional scene | |
JP2013176052A (en) | Device and method for estimating parallax by using visibility energy model | |
CN104077561A (en) | Fingerprint automatic comparison method | |
CN108564604A (en) | Binocular vision solid matching method and device based on plane restriction and triangulation | |
CN112508996A (en) | Target tracking method and device for anchor-free twin network corner generation | |
Menant et al. | An automatized method to parameterize embedded stereo matching algorithms | |
CN113720342B (en) | Navigation path planning method and device | |
JP4998905B2 (en) | 3D terrain data high accuracy apparatus, 3D terrain data high accuracy method and program | |
CN109816711B (en) | Stereo matching method adopting adaptive structure | |
CN112465932A (en) | Image filling method, device, equipment and storage medium | |
KR101804157B1 (en) | Disparity map generating method based on enhanced semi global matching |
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 | ||
CB02 | Change of applicant information |
Address after: 100048 Beijing city Haidian District, yum Village No. 1 Applicant after: Ministry of Natural Resources Land Satellite Remote Sensing Application Center Address before: 100048 No.1 Yushengcun Hospital, Sanhuqiao North Road, Shijingshan District, Beijing Applicant before: SATELLITE SURVEYING AND MAPPING APPLICATION CENTER, NASG |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |