CN106228605A - A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming - Google Patents

A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming Download PDF

Info

Publication number
CN106228605A
CN106228605A CN201610617983.2A CN201610617983A CN106228605A CN 106228605 A CN106228605 A CN 106228605A CN 201610617983 A CN201610617983 A CN 201610617983A CN 106228605 A CN106228605 A CN 106228605A
Authority
CN
China
Prior art keywords
image
pixel
point
parallax
npi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610617983.2A
Other languages
Chinese (zh)
Inventor
达飞鹏
程思培
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN201610617983.2A priority Critical patent/CN106228605A/en
Publication of CN106228605A publication Critical patent/CN106228605A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/08Indexing scheme for image data processing or generation, in general involving all processing steps from image acquisition to 3D model generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20228Disparity calculation for image-based rendering

Abstract

The invention discloses a kind of Stereo matching three-dimensional rebuilding method based on dynamic programming, this system is made up of two video cameras, implementation step is: (1) is by adjusting the position of two video cameras, three-dimension measuring system is demarcated by the imaging plane the most parallel (2) making two video cameras: obtain the internal reference of two video cameras and outer ginseng, obtains the corresponding relation of the pixel coordinate on image and world coordinate system.(3) epipolar geom etry correction and image conversion (4) are utilized Stereo Matching Algorithm based on dynamic programming, draw disparity map.(5) parallax correction (6), according to camera calibration parameter and disparity map, obtains three-dimensional point cloud by space Convergence method.Disparity map precision of the present invention is high, real-time is high, and can accurate fast automatic reconstruction image three-dimensional point cloud.

Description

A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming
Technical field
The invention belongs to technique of binocular stereoscopic vision field, the problem relating to process image based on Stereo matching.
Background technology
Technique of binocular stereoscopic vision is the method for three-dimensional measurement of a kind of passive type, and its implementation is flexible, to environmental requirement Low, man-machine interaction is friendly, is a kind of technology popular in three-dimensional reconstruction algorithm.It is double that binocular stereo vision is intended to simulating human The mechanism of the other scene three-dimensional information of outlook, obtains the two dimensional image of scenes from two angles, further according to set up between image Joining reconstruction of relations threedimensional model, mainly include camera calibration, image is to main process such as coupling, three-dimensional information reduction.Set up The process of two width image pixel point correspondences is exactly the process of Stereo matching, and it is the core of technique of binocular stereoscopic vision, main Wanting task is to first pass through binocular or many mesh images match obtains disparity map, is then obtained the scape of object by triangulation relation Deeply.
The main task of Stereo matching is to obtain smooth dense disparity map true to nature, and Stereo Matching Algorithm is broadly divided into local Algorithm and Global Algorithm, local algorithm utilizes the neighborhood information of pixel to mate, and computation complexity is relatively low, but matching precision The highest, easily produce mistake at low texture, parallax discontinuity zone especially.Flatness cost is added Matching power flow by Global Algorithm Calculating in, make coupling be converted into global optimum's process of energy function, mainly have figure to cut algorithm, belief propagation algorithm and dynamic State planning algorithm.Wherein dynamic programming algorithm computation complexity is minimum, fastest, but easily produces strip flaw problem, puts It is higher that reliability propagation algorithm and figure cut algorithmic match precision, calculated disparity map edge region and degree of depth discontinuity zone Effect preferable, comparatively speaking, it is time-consumingly long that figure cuts algorithm, and real-time performance is to be improved.
The shortcoming that existing three-dimensional reconstruction algorithm based on binocular stereo vision exists the following aspects:
(1) building the key that suitable neighborhood window is local algorithm, window is the least, then cannot comprise pixel to be matched Enough neighborhood informations, window is too big, then will comprise the neighborhood information without directive significance in the calculating of Matching power flow, these The generation of erroneous matching will be caused.
(2) global energy optimization is confined to one-dimensional by the dynamic programming algorithm that Global Algorithm complexity is relatively low Scan line in, lost the slickness constraint in other directions, can produce travers, and real-time can not get improving.Figure Cutting algorithm time-consuming relatively long, be difficult to meet the requirement of real-time of real scene shooting 3-dimensional reconstruction, belief propagation algorithm is indiscriminately Between neighborhood territory pixel, propagate confidence level, and disparity continuity may be unsatisfactory for about between parallax discontinuity zone neighborhood territory pixel Bundle, result causes reconstruction point cloud obscure boundary clear.
Owing to there is disadvantage mentioned above, existing three-dimensional reconstruction algorithm based on Stereo matching can not obtain in actual applications To gratifying result.Although it addition, in recent years, Stereo Matching Algorithm is studied by a large amount of scholars, more and more higher The method of precision is suggested.But a lot of algorithms are difficult to the double requirements reaching precision with real-time.
Summary of the invention
Goal of the invention: easily produce travers and the inadequate problem of real-time for conventional dynamic planning algorithm, this A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming of bright offer, the present invention uses a kind of new self adaptation correlation function Calculate Matching power flow, merged colour and the gradient information of picture, then used matched filtering.Disparity map precision is improved, again Use hierarchical algorithm and control point method that real-time is improved, and can accurate fast automatic reconstruction image three-dimensional point Cloud.
Technical scheme: for achieving the above object, the technical solution used in the present invention is:
A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming, comprises the following steps:
Step 1: Image Acquisition, uses two, the left and right video camera of binocular camera respectively to shoot piece image, wherein simultaneously The shooting of left video camera for left image, the shooting of right video camera for right image;
Two video cameras are demarcated, are set up camera review location of pixels and field by step 2: camera calibration respectively Relation between scape position, it is thus achieved that the Intrinsic Matrix A of left video cameraL, the Intrinsic Matrix A of right video cameraRWith left video camera Outer parameter matrix [RL tL], the outer parameter matrix [R of right video cameraR tR];
Step 3: polar curve is corrected by image, according to the inside and outside parameter matrix utilization pole of left and right two video cameras that step 2 obtains Line bearing calibration carries out polar curve correction and obtains run-in index binocular vision model the left and right image captured by step 1, makes coupling picture Element is to having identical vertical coordinate;Left image and right image after correction are designated as I respectivelylAnd Ir
Step 4: utilize dynamic programming algorithm Stereo matching obtain disparity map, the left image corrected according to step 3 and Right image determines disparity range, with the left image I after correctionlOn the basis of image, with correction after right image IrFor registrating image, Use adaptive weighting windowhood method that each pixel in benchmark image is calculated Matching power flow and to obtain initial left view poor Figure, then, with the right image I after correctionrOn the basis of image, with correction after left image IlFor registrating image, in benchmark image Each pixel calculate Matching power flow obtain initial right disparity map;After having calculated Matching power flow, generate disparity space image; Use dynamic programming to ask for optimal path in disparity space image to be optimized, disparity map must be taken;
Step 5: parallax correction, it is judged that in benchmark image, whether pixel p is reliable point, and make the p obtained in step 4 Point final parallax value Dispartiy (p)=dl(Npi), dl(Npi) it is the parallax value of Npi, coordinate in image on the basis of Npi (x, The pixel of parallax unreliable pixel p eight neighborhood y), and then obtain final disparity map;
Step 6: the final disparity map D that the camera interior and exterior parameter matrix obtained according to step 2 and step 5 obtain, The three-dimensional point cloud model of whole object it is calculated by space Convergence method.
Preferred: in described step 4 before generating disparity space image, use local linear filtering that two width images are filtered Ripple.
Preferred: described local linear filtering method is the left image corrected step 3 and right image carries out height respectively This filtering, eliminates influence of noise.
Preferred: the method utilizing the Stereo matching of dynamic programming algorithm to obtain disparity map in described step 4 includes following Step:
Step 4.1: determine disparity range according to left and right two width image;
D=(dmin,dmax),
Wherein, dminFor minimum parallax, dmin=0, dmaxFor maximum disparity, by labelling benchmark image and registration image it Between matched pixel point to trying to achieve;
Step 4.2: calculate Matching power flow, with the left image I after correctionlOn the basis of image, with correction after right image IrFor Registration image, at the beginning of using adaptive weighting windowhood method each pixel in benchmark image to calculate Matching power flow and obtains Begin left disparity map, then, with the right image I after correctionrOn the basis of image, with correction after left image IlFor registrating image, to base Each pixel in quasi-image calculates Matching power flow and obtains initial right disparity map:
C (p, d)=δ * CTAD(p,d)+(1-δ)*CGradient(p,d)
C T A D ( p , d ) = m i n { Σ i = R , G , B | R i ′ ( p d ) - R i ( p ) , τ A D | }
C G r a d i e n t ( p , d ) = min { Σ i = R , G , B | ▿ x R i ′ ( p d ) - ▿ x R i ( p ) , τ ▿ x | } + min { Σ i = R , G , B | ▿ y R i ′ ( p d ) - ▿ y R i ( p ) , τ ▿ y | }
Wherein, p is pixel, and d is the parallax value of this pixel, and R is coloured image, and parameter δ is used for balancing colour information CTAD(p, d) with gradient information CGradient(p, d) between proportionate relationship;Ri'(pd) it is the right image pixel at p point i passage Value, RiP () is the left image pixel value at p point i passage,For Grad on x direction,For Grad, τ on y directionADTable Show coloured image space R, G, the interceptive value of channel B component;CGradient(p, d) represents along x and y direction, logical to R, G, B tri- Road carries out the calculating of phase threshold gradient;WithRepresent the interceptive value in x and y direction respectively;pdFor at left image pixel Plus the pixel value of (in the rightest image) p point after parallax d in value;
Step 4.3: Matching power flow is filtered
Employing local linear filters, and for any one pixel p, filtered Matching power flow is:
C ^ p ( d ) = Σ q W p , q × C q ( d ) ;
Wherein, Wp,qFor kernel function,
W p , q = 1 | w 2 | Σ k : ( p , q ) ∈ ω k ( 1 + ( I p - μ k ) T ( Σ k + ϵ U ) - 1 ( I q - μ k ) )
Above formula is the weights filter function of coloured image R, Ip, IqAnd μkRepresent 3 × 1 vectors of colouring information, ωkFor greatly The rectangular window of little 3 × 3, ∑kRepresenting the covariance matrix of 3 × 3, U is the unit matrix of 3 × 3, and q is the neighborhood territory pixel of p
After having calculated Matching power flow and having been filtered by Matching power flow, generate disparity space image;
Step 4.4: use dynamic programming to ask for optimal path in disparity space image and be optimized, disparity map must be taken.
Preferred: by the matched pixel point between labelling benchmark image and registration image to trying to achieve in described step 4.1 The method of maximum disparity:
Randomly select ten pixels in benchmark image pl1, pl2, pl3 ..., pl10}, in registration image respectively Find with pl1, pl2, pl3 ..., pl10} has ten estimation matched pixel points of identical vertical coordinate and similar color information Pr1, pr2, pr3 ..., pr10}, then obtain ten groups estimation matched pixel to (pl1, pr1), (pl2, pr2), (pl3, Pr3) ..., (pl10, pr10) }, the difference of each group of matched pixel abscissa to calculating two pixels thoroughly deserved one group Parallax value d1, d2, d3 ..., and d10}, maximum disparity dmax=max{d1, d2 ..., d10}+5
Preferred: described step 4.4 to use in disparity space image dynamic programming ask for optimal path and be optimized, The method taking disparity map: the Matching power flow in every scan line is added up by dynamic programming, finds smallest match from left to right Cost value path, thus obtain the parallax value of each pixel;On the basis of left images, image calculates left disparity map D respectivelyl, right Disparity map Dr, use left and right conformance criteria, will meet | dl(p)-dr(q) | the point of≤1 is labeled as the reliable point of parallax, and makes Dispartiy (p)=(dl(p)+dr(q))/2;Otherwise it is labeled as the unreliable point of parallax and is designated as Dispartiy (p)=0;Wherein p Pixel in image on the basis of Dian, q point is the match point of p point, d in registration imagel(p)∈DlFor the parallax value of pixel p, dr (q)∈DrFor the parallax of pixel q, Dispartiy (p) is the p final parallax value of point.
Preferred: the method obtaining final disparity map in described step 5:
By coordinate in benchmark image, (x, the pixel of parallax unreliable pixel p eight neighborhood y) is labeled as Npi, wherein (xi,yi) it is the image coordinate of Npi,The gray value of Npi is subtracted each other with p point gray value, obtains gray scale difference Value, and by gray scale difference value by order sequence from small to large;According to suitable to maximum pixel of the pixel minimum from gray scale difference value It is the reliable point of parallax that sequence judges whether that pixel Npi meets following three condition (1) Npi successively;(2)Npi∈Sp, wherein SpWindow ranges for pixel place;(3)|Il(xi,yi)-Ir(xi+dl(Npi),yi) |≤s, wherein Il(), Ir() represents The gray value of pixel, d in benchmark image and registration imagel(Npi)∈DlFor the parallax value of Npi, s is the threshold value set;
If there is Npi to meet three conditions above, p point being labeled as reliable point, and makes Dispartiy (p)=dl (Npi);Otherwise condition (3) is replaced with | Il(x,y)-Il(x+m, y+n) |≤s recalculates condition (1) (2) (3), if deposited Meet condition at Npi p is then labeled as parallax reliably to put and make parallax Dispartiy (p)=dl(Npi);Wherein m, n ∈ (-1, 0,1) it is, 0 during m, n difference;Final disparity map is obtained through this step.
Beneficial effect: a kind of based on dynamic programming the Stereo matching three-dimensional rebuilding method that the present invention provides, compares existing Technology, has the advantages that
Propose a kind of self adaptation similarity measure function, introduce colour information and the gradient information of RGB image, improve Disparity map precision.The complexity of auto-adaptive function makes efficiency of algorithm reduce, the present invention use again control point hierarchical algorithm with Improve arithmetic speed.Through comparing, the present invention all reaches requirement in precision with real-time.
Accompanying drawing explanation
Fig. 1 is the whole process flow diagram flow chart of the present invention.
Fig. 2 is system model and principle schematic.
Fig. 3 is that polar curve polar curve corrects schematic diagram.
Fig. 4 is disparity space image schematic diagram.
Fig. 5 is searching route schematic diagram.
Fig. 6 is calculated the 3 d space coordinate schematic diagram of object point on image by matching relationship and nominal data.
Detailed description of the invention
Below in conjunction with the accompanying drawings and specific embodiment, it is further elucidated with the present invention, it should be understood that these examples are merely to illustrate this Invention rather than limit the scope of the present invention, after having read the present invention, various to the present invention of those skilled in the art The amendment of the equivalent form of value all falls within the application claims limited range.
With reference to the accompanying drawings, specific embodiments of the present invention are done more detailed description.Programming realization tools selection Visual Studio2013, in selection Middlebury java standard library, image is as coupling image.
Fig. 1 is the entire flow of the present invention.
Fig. 2 is system model and the principle schematic of the present invention.Use two CCD the most each from two different angles respectively Shoot a width building image, OL、ORIt is respectively the photocentre of two video cameras, IL、IRThe imaging being respectively two video cameras is put down Face, P is a dimensional target point on building to be reconstructed, PL, PRThe institute in two video camera imaging planes respectively for object point P The picture point become.This by the same space object point on different cameras imaging plane formed picture point be a pair match point.Appoint and take Wherein image on the basis of a width, another width is registration image, on the basis of each pixel in image search in alignment image The process of corresponding match point is referred to as Stereo matching.After obtaining the matching relationship of pixel, according to system model, in conjunction with demarcating The camera interior and exterior parameter arrived, carries out reverse operation, so that it may obtains the 3 d space coordinate of corresponding object point, thus realizes image Three-dimensionalreconstruction.
It is that polar curve is corrected schematic diagram as shown in Figure 3.The inside and outside parameter obtained according to calibration process in step 2, uses ginseng Examine document " A compact algorithm for rectification of stereo pairs.Machine Vision And Applications " polar curve of proposition in (Fusiello A, Trucco E, Verri A.2000,12 (1): 16-22) Captured left images is carried out correcting, polar curve if the pixel coordinate after Bian Huan in image corresponds to former by bearing calibration Time in non-integer coordinates in beginning image, then carry out by gray scale bilinear interpolation, finally obtain run-in index binocular vision model, Make matched pixel to being in same scan line, reduce coupling space complexity, corrected after image undistorted, correction Accuracy rate is high, and error is less than a pixel.
Its purpose of the present invention, for generating a secondary final parallax, is carried out scene by the camera parameters of disparity map and acquisition Three-dimensional reconstruction.First gather two width colour real scene shooting images, carry out camera calibration, carry out polar curve is corrected according to nominal data Convert with image, then ask for the disparity space image of image pair, use a kind of self adaptation similarity to survey in disparity space image Degree function calculates Matching power flow and carries out cost filtering.Dynamic programming algorithm is used to find optimal path in disparity space image again Ask for parallax, after parallax correction, finally utilize nominal data and matching result rebuild three-dimensional point cloud and show.
The present invention to be embodied as step as follows:
Step 1: Image Acquisition
Use binocular camera to obtain image, first adjust binocular camera and make its optical axis substantially parallel and make left and right pitch-angle Degree is in suitable position, then respectively shoots piece image simultaneously, the most left lens shooting for left image, right lens shooting For right image;
Step 2: camera calibration
Respectively two video cameras are demarcated, set up the relation between camera review location of pixels and scene location, Obtain the Intrinsic Matrix A of the video camera on the left sideL, the Intrinsic Matrix A of video camera on the rightROuter ginseng with the video camera on the left side Matrix number [RL tL], the outer parameter matrix [R of the video camera on the rightR tR];
Step 3: polar curve is corrected by image
The camera interior and exterior parameter obtained according to step 2 uses method for correcting polar line that captured left images is carried out pole Line correction obtain run-in index binocular vision model, make matched pixel to having identical vertical coordinate, even if matched pixel is to being in With in scan line.Left image and right image after correction are designated as I respectivelylAnd Ir
Step 4: utilize the Stereo matching of dynamic programming algorithm to obtain disparity map
Step 4.1 carries out gaussian filtering to two width images, eliminates influence of noise and improves picture quality;
Step 4.2: the initial matching cost of two width images about calculating, sets up disparity space image (DSI)
Step 4.2.1: determine disparity range
D=(dmin,dmax),
Wherein dminFor minimum parallax, dmin=0, dmaxFor maximum disparity, by between labelling benchmark image and registration image Matched pixel point to trying to achieve:
Randomly select ten pixels in benchmark image pl1, pl2, pl3 ..., pl10}, in registration image respectively Find with pl1, pl2, pl3 ..., pl10} has ten estimation matched pixel points of identical vertical coordinate and similar color information Pr1, pr2, pr3 ..., pr10}, then obtain ten groups estimation matched pixel to (pl1, pr1), (pl2, pr2), (pl3, Pr3) ..., (pl10, pr10) }, the difference of each group of matched pixel abscissa to calculating two pixels thoroughly deserved one group Parallax value d1, d2, d3 ..., and d10}, maximum disparity dmax=max{d1, d2 ..., d10}+5
Step 4.2.2: calculate Matching power flow
With the left image I after correctionlOn the basis of image, with correction after right image IrFor registration image, use self adaptation power Weight windowhood method calculates Matching power flow to each pixel in benchmark image and obtains initial left disparity map, then, with school Right image I after justrOn the basis of image, with correction after left image IlFor registrating image, to each pixel in benchmark image Point calculates Matching power flow and obtains initial right disparity map:
C (p, d)=δ * CTAD(p,d)+(1-δ)*CGradient(p,d)
C T A D ( p , d ) = m i n { Σ i = R , G , B | R i ′ ( p d ) - R i ( p ) , τ A D | }
C G r a d i e n t ( p , d ) = min { Σ i = R , G , B | ▿ x R i ′ ( p d ) - ▿ x R i ( p ) , τ ▿ x | } + min { Σ i = R , G , B | ▿ y R i ′ ( p d ) - ▿ y R i ( p ) , τ ▿ y | }
Wherein, p is pixel, and d is the parallax value of this pixel, and R is coloured image, and parameter δ is used for balancing colour information CTAD(p, d) with gradient information CGradient(p, d) between proportionate relationship;Ri'(pd) it is the right image pixel at p point i passage Value, RiP () is the left image pixel value at p point i passage,For Grad on x direction,For Grad, τ on y directionADTable Show coloured image space R, G, the interceptive value of channel B component;CGradient(p, d) represents along x and y direction, logical to R, G, B tri- Road carries out the calculating of phase threshold gradient;WithRepresent the interceptive value in x and y direction respectively;pdFor at left image pixel Plus the pixel value of (in the rightest image) p point after parallax d in value;
Step 4.2.3: Matching power flow is filtered:
Employing local linear filters, and for any one pixel p, filtered Matching power flow is:
C ^ p ( d ) = Σ q W p , q × C q ( d )
Wherein, Wp,qFor kernel function,
W p , q = 1 | w 2 | Σ k : ( p , q ) ∈ ω k ( 1 + ( I p - μ k ) T ( Σ k + ϵ U ) - 1 ( I q - μ k ) )
Above formula is the weights filter function of coloured image R, Ip, IqAnd μkRepresent 3 × 1 vectors of colouring information, ωkFor greatly The rectangular window of little 3 × 3, ∑kRepresenting the covariance matrix of 3 × 3, U is the unit matrix of 3 × 3, and q is the neighborhood territory pixel of p.Meter After having calculated Matching power flow and having been filtered by Matching power flow, disparity space image can be generated.
Step 4.3: use dynamic programming to ask for optimal path in disparity space image and be optimized, disparity map must be taken.Dynamic Matching power flow in every scan line is added up by state planning, finds smallest match cost value path from left to right, thus obtains Take the parallax value of each pixel.On the basis of left images, image calculates disparity map D respectivelyl, Dr, use left and right conformance criteria, To meet | dl(p)-dr(q) | the point of≤1 is labeled as the reliable point of parallax, and makes Dispartiy (p)=(dl(p)+dr(q))/2; Otherwise it is labeled as the unreliable point of parallax and is designated as Dispartiy (p)=0;
Wherein pixel in image on the basis of p point, q point is the match point of p point, d in registration imagel(p)∈DlFor pixel The parallax value of p, dr(q)∈DrFor the parallax of pixel q, Dispartiy (p) is the p final parallax value of point;
Step 5: parallax correction
Step 5.1: fill the unreliable point of parallax
By coordinate in benchmark image, (x, the pixel of parallax unreliable pixel p eight neighborhood y) is labeled as Npi, wherein (xi,yi) it is the image coordinate of Npi,The gray value of Npi is subtracted each other with p point gray value, obtains gray scale difference Value, and by gray scale difference value by order sequence from small to large;According to suitable to maximum pixel of the pixel minimum from gray scale difference value It is the reliable point of parallax that sequence judges whether that pixel Npi meets following three condition (1) Npi successively;(2)Npi∈Sp, wherein SpWindow ranges for pixel place;(3)|Il(xi,yi)-Ir(xi+dl(Npi),yi) |≤s, wherein Il(), Ir() represents The gray value of pixel, d in benchmark image and registration imagel(Npi)∈DlFor the parallax value of Npi, s is the threshold value set;
If there is Npi to meet three conditions above, p point being labeled as reliable point, and makes Dispartiy (p)=dl (Npi);Otherwise condition (3) is replaced with | Il(x,y)-Il(x+m, y+n) |≤s recalculates condition (1) (2) (3), if deposited Meet condition at Npi p is then labeled as parallax reliably to put and make parallax Dispartiy (p)=dl(Npi);Wherein m, n ∈ (-1, 0,1) it is, 0 during m, n difference;Final disparity map is obtained through this step;
Step 6: according to camera calibration parameter and disparity map, obtain three-dimensional point cloud model by space Convergence method
The camera interior and exterior parameter matrix A obtained according to step 2L、AR[RL tL]、[RR tR], and step 5 obtains Disparity map D, is calculated the three-dimensional point cloud model of whole object by space Convergence method.
Hierarchical mode is added conventional dynamic planing method by the present invention, provides with low pixel level for high pixel level and controls Point set, and use a kind of self adaptation relevance measure function in Matching power flow calculates, in addition Matching power flow filtering, improve algorithm Degree of accuracy and real-time also obtain high accuracy disparity map, then utilized space Convergence method to enter by acquired disparity map and camera parameter Row three-dimensional reconstruction.
The above is only the preferred embodiment of the present invention, it should be pointed out that: for the ordinary skill people of the art For Yuan, under the premise without departing from the principles of the invention, it is also possible to make some improvements and modifications, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (7)

1. a Stereo matching three-dimensional rebuilding method based on dynamic programming, it is characterised in that comprise the following steps:
Step 1: Image Acquisition, uses two, the left and right video camera of binocular camera respectively to shoot piece image simultaneously, and wherein a left side is taken the photograph Camera shooting for left image, the shooting of right video camera for right image;
Two video cameras are demarcated, are set up camera review location of pixels and scene bit by step 2: camera calibration respectively Relation between putting, it is thus achieved that the Intrinsic Matrix A of left video cameraL, the Intrinsic Matrix A of right video cameraROuter ginseng with left video camera Matrix number [RL tL], the outer parameter matrix [R of right video cameraR tR];
Step 3: polar curve is corrected by image, according to the inside and outside parameter matrix utilization polar curve school of left and right two video cameras that step 2 obtains Correction method carries out polar curve correction and obtains run-in index binocular vision model the left and right image captured by step 1, makes matched pixel pair There is identical vertical coordinate;Left image and right image after correction are designated as I respectivelylAnd Ir
Step 4: utilize the Stereo matching of dynamic programming algorithm to obtain disparity map, the left image corrected according to step 3 and right figure As determining disparity range, with the left image I after correctionlOn the basis of image, with correction after right image IrFor registration image, use Adaptive weighting windowhood method calculates Matching power flow to each pixel in benchmark image and obtains initial left disparity map, so After, with the right image I after correctionrOn the basis of image, with correction after left image IlFor registration image, every in benchmark image One pixel calculates Matching power flow and obtains initial right disparity map;After having calculated Matching power flow, generate disparity space image;Regarding Difference space figure uses dynamic programming ask for optimal path to be optimized, disparity map must be taken;
Step 5: parallax correction, it is judged that in benchmark image, whether pixel p is reliable point, and make the p point that obtains in step 4 Whole parallax value Dispartiy (p)=dl(Npi), dl(Npi) it is the parallax value of Npi, coordinate in image on the basis of Npi (x, y) The pixel of parallax unreliable pixel p eight neighborhood, and then obtain final disparity map;
Step 6: the final disparity map D that the camera interior and exterior parameter matrix obtained according to step 2 and step 5 obtain, passes through Space Convergence method is calculated the three-dimensional point cloud model of whole object.
Stereo matching three-dimensional rebuilding method based on dynamic programming the most according to claim 1, it is characterised in that: described step In rapid 4 before generating disparity space image, use local linear filtering that two width images are filtered.
Stereo matching three-dimensional rebuilding method based on dynamic programming the most according to claim 2, it is characterised in that: described office Portion's linear filter method is the left image corrected step 3 and right image carries out gaussian filtering respectively, eliminates influence of noise.
Stereo matching three-dimensional rebuilding method based on dynamic programming the most according to claim 3, it is characterised in that: described step The Stereo matching utilizing dynamic programming algorithm in rapid 4 obtains the method for disparity map and comprises the following steps:
Step 4.1: determine disparity range according to left and right two width image;
D=(dmin,dmax),
Wherein, dminFor minimum parallax, dmin=0, dmaxFor maximum disparity, by between labelling benchmark image and registration image Matched pixel point is to trying to achieve;
Step 4.2: calculate Matching power flow, with the left image I after correctionlOn the basis of image, with correction after right image IrFor registration Image, uses adaptive weighting windowhood method each pixel in benchmark image is calculated Matching power flow and obtains an initial left side Disparity map, then, with the right image I after correctionrOn the basis of image, with correction after left image IlFor registrating image, to reference map Each pixel in Xiang calculates Matching power flow and obtains initial right disparity map:
C (p, d)=δ * CTAD(p,d)+(1-δ)*CGradient(p,d)
C T A D ( p , d ) = m i n { Σ i = R , G , B | R i ′ ( p d ) - R i ( p ) , τ A D | }
C G r a d i e n t ( p , d ) = min { Σ i = R , G , B | ▿ x R i ′ ( p d ) - ▿ x R i ( p ) , τ ▿ x | } + min { Σ i = R , G , B | ▿ y R i ′ ( p d ) - ▿ y R i ( p ) , τ ▿ y | }
Wherein, p is pixel, and d is the parallax value of this pixel, and R is coloured image, and parameter δ is used for balancing colour information CTAD (p, d) with gradient information CGradient(p, d) between proportionate relationship;Ri'(pd) it is the right image pixel value at p point i passage, Ri P () is the left image pixel value at p point i passage,For Grad on x direction,For Grad, τ on y directionADRepresent coloured silk Color image space R, G, the interceptive value of channel B component;CGradient(p d) represents along x and y direction, to R, tri-passages of G, B enter The calculating of row order section threshold gradient;WithRepresent the interceptive value in x and y direction respectively;pdFor on left image pixel value Plus the pixel value of p point (in the rightest image) after parallax d;
Step 4.3: Matching power flow is filtered
Employing local linear filters, and for any one pixel p, filtered Matching power flow is:
C ^ p ( d ) = Σ q W p , q × C q ( d ) ;
Wherein, Wp,qFor kernel function,
W p , q = 1 | w 2 | Σ k : ( p , q ) ∈ ω k ( 1 + ( I p - μ k ) T ( Σ k + ϵ U ) - 1 ( - I q - μ k ) )
Above formula is the weights filter function of coloured image R, Ip, IqAnd μkRepresent 3 × 1 vectors of colouring information, ωkSized by 3 × 3 Rectangular window, ∑kRepresenting the covariance matrix of 3 × 3, U is the unit matrix of 3 × 3, and q is the neighborhood territory pixel of p;
After having calculated Matching power flow and having been filtered by Matching power flow, generate disparity space image;
Step 4.4: use dynamic programming to ask for optimal path in disparity space image and be optimized, disparity map must be taken.
Stereo matching three-dimensional rebuilding method based on dynamic programming the most according to claim 4, it is characterised in that: described step By the matched pixel point method to trying to achieve maximum disparity between labelling benchmark image and registration image in rapid 4.1:
Randomly select ten pixels in benchmark image pl1, pl2, pl3 ..., pl10}, find respectively in registration image With pl1, pl2, pl3 ..., pl10} have identical vertical coordinate and similar color information ten estimation matched pixel points pr1, Pr2, pr3 ..., pr10}, then obtain ten groups estimation matched pixel to (pl1, pr1), (pl2, pr2), (pl3, pr3) ..., (pl10, pr10) }, the difference of each group of matched pixel abscissa to calculating two pixels thoroughly deserved one group of parallax value D1, d2, d3 ..., and d10}, maximum disparity dmax=max{d1, d2 ..., d10}+5.
Stereo matching three-dimensional rebuilding method based on dynamic programming the most according to claim 5, it is characterised in that: described step Use dynamic programming to ask for optimal path in rapid 4.4 in disparity space image to be optimized, the method that disparity map must be taken: dynamically advise Draw and the Matching power flow in every scan line is added up, find smallest match cost value path from left to right, thus obtain every The parallax value of one pixel;On the basis of left images, image calculates left disparity map D respectivelyl, right disparity map Dr, consistent about utilization Property criterion, will meet | dl(p)-dr(q) | the point of≤1 is labeled as the reliable point of parallax, and makes Dispartiy (p)=(dl(p)+dr (q))/2;Otherwise it is labeled as the unreliable point of parallax and is designated as Dispartiy (p)=0;Wherein pixel, q in image on the basis of p point Point is the match point of p point, d in registration imagel(p)∈DlFor the parallax value of pixel p, dr(q)∈DrFor the parallax of pixel q, Dispartiy (p) is the p final parallax value of point.
Stereo matching three-dimensional rebuilding method based on dynamic programming the most according to claim 2, it is characterised in that: described step The method obtaining final disparity map in rapid 5:
By coordinate in benchmark image, (x, the pixel of parallax unreliable pixel p eight neighborhood y) is labeled as Npi, wherein (xi, yi) it is the image coordinate of Npi,The gray value of Npi is subtracted each other with p point gray value, obtains gray scale difference value, and By gray scale difference value by order sequence from small to large;Depend on to the order of maximum pixel according to the pixel minimum from gray scale difference value It is secondary that to judge whether that pixel Npi meets following three condition (1) Npi be the reliable point of parallax;(2)Npi∈Sp, wherein SpFor picture The window ranges at element place;(3)|Il(xi,yi)-Ir(xi+dl(Npi),yi) |≤s, wherein Il(), Ir() represents reference map The gray value of pixel, d in picture and registration imagel(Npi)∈DlFor the parallax value of Npi, s is the threshold value set;
If there is Npi to meet three conditions above, p point being labeled as reliable point, and makes Dispartiy (p)=dl(Npi);No Then condition (3) is replaced with | Il(x,y)-Il(x+m, y+n) |≤s recalculates condition (1) (2) (3), meets if there is Npi P is then labeled as parallax and reliably puts and make parallax Dispartiy (p)=d by conditionl(Npi);Wherein m, n ∈ (-1,0,1), m, n It is asynchronously 0;Final disparity map is obtained through this step.
CN201610617983.2A 2016-07-29 2016-07-29 A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming Pending CN106228605A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610617983.2A CN106228605A (en) 2016-07-29 2016-07-29 A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610617983.2A CN106228605A (en) 2016-07-29 2016-07-29 A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming

Publications (1)

Publication Number Publication Date
CN106228605A true CN106228605A (en) 2016-12-14

Family

ID=57536339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610617983.2A Pending CN106228605A (en) 2016-07-29 2016-07-29 A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming

Country Status (1)

Country Link
CN (1) CN106228605A (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106846290A (en) * 2017-01-19 2017-06-13 西安电子科技大学 Stereoscopic parallax optimization method based on anti-texture cross and weights cross
CN106875472A (en) * 2017-01-16 2017-06-20 成都信息工程大学 A kind of 3D dental imagings modeling method
CN106920276A (en) * 2017-02-23 2017-07-04 华中科技大学 A kind of three-dimensional rebuilding method and system
CN106952304A (en) * 2017-03-22 2017-07-14 南京大学 A kind of depth image computational methods of utilization video sequence interframe correlation
CN106950985A (en) * 2017-03-20 2017-07-14 成都通甲优博科技有限责任公司 A kind of automatic delivery method and device
CN107240149A (en) * 2017-06-14 2017-10-10 广东工业大学 Object dimensional model building method based on image procossing
CN107248179A (en) * 2017-06-08 2017-10-13 爱佩仪中测(成都)精密仪器有限公司 Three-dimensional matching method for building up for disparity computation
CN107992871A (en) * 2017-12-21 2018-05-04 陕西伟景机器人科技有限公司 The automatic accounting method in dining room based on image recognition
CN107990878A (en) * 2017-11-08 2018-05-04 中国科学院西安光学精密机械研究所 Range-measurement system and distance measuring method based on low-light binocular camera
CN108734776A (en) * 2018-05-23 2018-11-02 四川川大智胜软件股份有限公司 A kind of three-dimensional facial reconstruction method and equipment based on speckle
CN108917633A (en) * 2018-05-18 2018-11-30 中国科学院光电技术研究所 Fuel assembly deformation detection system based on underwater binocular vision
CN109903379A (en) * 2019-03-05 2019-06-18 电子科技大学 A kind of three-dimensional rebuilding method based on spots cloud optimization sampling
CN110853151A (en) * 2019-10-15 2020-02-28 西安理工大学 Three-dimensional point set recovery method based on video
CN111127474A (en) * 2019-11-08 2020-05-08 武汉大学 Airborne LiDAR point cloud assisted orthophoto mosaic line automatic selection method and system
WO2020134254A1 (en) * 2018-12-27 2020-07-02 南京芊玥机器人科技有限公司 Method employing reinforcement learning to optimize trajectory of spray painting robot
CN111649694A (en) * 2020-06-04 2020-09-11 四川大学 Implicit phase-parallax mapping binocular measurement missing point cloud interpolation method
CN112348871A (en) * 2020-11-16 2021-02-09 长安大学 Local stereo matching method
WO2021138993A1 (en) * 2020-01-10 2021-07-15 大连理工大学 Parallax image fusion method for multi-band stereo camera
CN114998532A (en) * 2022-08-05 2022-09-02 中通服建设有限公司 Three-dimensional image visual transmission optimization method based on digital image reconstruction
CN115514877A (en) * 2021-06-22 2022-12-23 爱思开海力士有限公司 Apparatus and method for noise reduction from multi-view image

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887589A (en) * 2010-06-13 2010-11-17 东南大学 Stereoscopic vision-based real low-texture image reconstruction method
CN101908230A (en) * 2010-07-23 2010-12-08 东南大学 Regional depth edge detection and binocular stereo matching-based three-dimensional reconstruction method
CN101976455A (en) * 2010-10-08 2011-02-16 东南大学 Color image three-dimensional reconstruction method based on three-dimensional matching
US20120032951A1 (en) * 2010-08-03 2012-02-09 Samsung Electronics Co., Ltd. Apparatus and method for rendering object in 3d graphic terminal
CN104574404A (en) * 2015-01-14 2015-04-29 宁波大学 Three-dimensional image relocation method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101887589A (en) * 2010-06-13 2010-11-17 东南大学 Stereoscopic vision-based real low-texture image reconstruction method
CN101908230A (en) * 2010-07-23 2010-12-08 东南大学 Regional depth edge detection and binocular stereo matching-based three-dimensional reconstruction method
US20120032951A1 (en) * 2010-08-03 2012-02-09 Samsung Electronics Co., Ltd. Apparatus and method for rendering object in 3d graphic terminal
CN101976455A (en) * 2010-10-08 2011-02-16 东南大学 Color image three-dimensional reconstruction method based on three-dimensional matching
CN104574404A (en) * 2015-01-14 2015-04-29 宁波大学 Three-dimensional image relocation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龚文: "基于动态规划的立体匹配算法研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106875472A (en) * 2017-01-16 2017-06-20 成都信息工程大学 A kind of 3D dental imagings modeling method
CN106846290A (en) * 2017-01-19 2017-06-13 西安电子科技大学 Stereoscopic parallax optimization method based on anti-texture cross and weights cross
CN106846290B (en) * 2017-01-19 2019-10-11 西安电子科技大学 Stereoscopic parallax optimization method based on anti-texture cross and weight cross
CN106920276B (en) * 2017-02-23 2019-05-14 华中科技大学 A kind of three-dimensional rebuilding method and system
CN106920276A (en) * 2017-02-23 2017-07-04 华中科技大学 A kind of three-dimensional rebuilding method and system
CN106950985A (en) * 2017-03-20 2017-07-14 成都通甲优博科技有限责任公司 A kind of automatic delivery method and device
CN106950985B (en) * 2017-03-20 2020-07-03 成都通甲优博科技有限责任公司 Automatic delivery method and device
CN106952304A (en) * 2017-03-22 2017-07-14 南京大学 A kind of depth image computational methods of utilization video sequence interframe correlation
CN106952304B (en) * 2017-03-22 2019-09-20 南京大学 A kind of depth image calculation method using video sequence interframe correlation
CN107248179A (en) * 2017-06-08 2017-10-13 爱佩仪中测(成都)精密仪器有限公司 Three-dimensional matching method for building up for disparity computation
CN107240149A (en) * 2017-06-14 2017-10-10 广东工业大学 Object dimensional model building method based on image procossing
CN107990878A (en) * 2017-11-08 2018-05-04 中国科学院西安光学精密机械研究所 Range-measurement system and distance measuring method based on low-light binocular camera
CN107990878B (en) * 2017-11-08 2019-08-27 中国科学院西安光学精密机械研究所 Range-measurement system and distance measuring method based on low-light binocular camera
CN107992871A (en) * 2017-12-21 2018-05-04 陕西伟景机器人科技有限公司 The automatic accounting method in dining room based on image recognition
WO2019119525A1 (en) * 2017-12-21 2019-06-27 陕西伟景机器人科技有限公司 Image recognition based method for self-checkout in restaurant
CN108917633A (en) * 2018-05-18 2018-11-30 中国科学院光电技术研究所 Fuel assembly deformation detection system based on underwater binocular vision
CN108734776A (en) * 2018-05-23 2018-11-02 四川川大智胜软件股份有限公司 A kind of three-dimensional facial reconstruction method and equipment based on speckle
CN108734776B (en) * 2018-05-23 2022-03-25 四川川大智胜软件股份有限公司 Speckle-based three-dimensional face reconstruction method and equipment
WO2020134254A1 (en) * 2018-12-27 2020-07-02 南京芊玥机器人科技有限公司 Method employing reinforcement learning to optimize trajectory of spray painting robot
CN109903379A (en) * 2019-03-05 2019-06-18 电子科技大学 A kind of three-dimensional rebuilding method based on spots cloud optimization sampling
CN110853151A (en) * 2019-10-15 2020-02-28 西安理工大学 Three-dimensional point set recovery method based on video
CN110853151B (en) * 2019-10-15 2024-02-09 西安理工大学 Video-based three-dimensional point set recovery method
CN111127474A (en) * 2019-11-08 2020-05-08 武汉大学 Airborne LiDAR point cloud assisted orthophoto mosaic line automatic selection method and system
CN111127474B (en) * 2019-11-08 2022-08-05 武汉大学 Airborne LiDAR point cloud assisted orthophoto mosaic line automatic selection method and system
WO2021138993A1 (en) * 2020-01-10 2021-07-15 大连理工大学 Parallax image fusion method for multi-band stereo camera
US11948333B2 (en) 2020-01-10 2024-04-02 Dalian University Of Technology Disparity image fusion method for multiband stereo cameras
CN111649694A (en) * 2020-06-04 2020-09-11 四川大学 Implicit phase-parallax mapping binocular measurement missing point cloud interpolation method
CN111649694B (en) * 2020-06-04 2021-05-04 四川大学 Implicit phase-parallax mapping binocular measurement missing point cloud interpolation method
CN112348871A (en) * 2020-11-16 2021-02-09 长安大学 Local stereo matching method
CN112348871B (en) * 2020-11-16 2023-02-10 长安大学 Local stereo matching method
CN115514877A (en) * 2021-06-22 2022-12-23 爱思开海力士有限公司 Apparatus and method for noise reduction from multi-view image
CN115514877B (en) * 2021-06-22 2024-03-19 爱思开海力士有限公司 Image processing apparatus and noise reduction method
CN114998532B (en) * 2022-08-05 2022-11-01 中通服建设有限公司 Three-dimensional image visual transmission optimization method based on digital image reconstruction
CN114998532A (en) * 2022-08-05 2022-09-02 中通服建设有限公司 Three-dimensional image visual transmission optimization method based on digital image reconstruction

Similar Documents

Publication Publication Date Title
CN106228605A (en) A kind of Stereo matching three-dimensional rebuilding method based on dynamic programming
CN112435325B (en) VI-SLAM and depth estimation network-based unmanned aerial vehicle scene density reconstruction method
CN101887589B (en) Stereoscopic vision-based real low-texture image reconstruction method
CN101976455B (en) Color image three-dimensional reconstruction method based on three-dimensional matching
CN101625768B (en) Three-dimensional human face reconstruction method based on stereoscopic vision
CN104661010B (en) Method and device for establishing three-dimensional model
CN113362247B (en) Semantic real scene three-dimensional reconstruction method and system for laser fusion multi-view camera
KR101681095B1 (en) Apparatus and method for generating depth image that have same viewpoint and same resolution with color image
CN105160680A (en) Design method of camera with no interference depth based on structured light
CN103310421B (en) The quick stereo matching process right for high-definition image and disparity map acquisition methods
CN105528785A (en) Binocular visual image stereo matching method
CN106600632B (en) A kind of three-dimensional image matching method improving matching cost polymerization
CN114067197B (en) Pipeline defect identification and positioning method based on target detection and binocular vision
CN107170000B (en) Stereopsis dense Stereo Matching method based on the optimization of global block
CN115272271A (en) Pipeline defect detecting and positioning ranging system based on binocular stereo vision
CN106447718B (en) A kind of 2D turns 3D depth estimation method
CN109840922A (en) Depth acquisition methods and system based on binocular light-field camera
CN104182968A (en) Method for segmenting fuzzy moving targets by wide-baseline multi-array optical detection system
Shivakumar et al. Real time dense depth estimation by fusing stereo with sparse depth measurements
CN105701787B (en) Depth map fusion method based on confidence level
CN102263957A (en) Search-window adaptive parallax estimation method
CN105574875A (en) Fish-eye image dense stereo algorithm based on polar curve geometry
JP2019220099A (en) Stereo matching processing device, stereo matching processing method, and program
CN115661702B (en) Sea state real-time estimation method and system based on smart phone
CN114998532B (en) Three-dimensional image visual transmission optimization method based on digital image reconstruction

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20161214

RJ01 Rejection of invention patent application after publication