A kind of method for reconstructing three-dimensional scene based on RAPTechnical field
The present invention relates to computer vision fields, more particularly to a kind of method for reconstructing three-dimensional scene based on RAP.
Background technology
Three-dimensional reconstruction is exactly the process for the mathematical model that suitable computer expression and processing are set up to three-dimension object, andThree-dimension object in objective world is really reproduced to key technology in a computer.It is applied to cultural heritage protection,, there is extensive development in the fields such as computer vision, Medical Image Processing, reverse-engineering, Digital Media creation and virtual realityForeground and application value.
Three-dimensional reconstruction applies upper work in human-computer interaction, augmented reality, historical relic's protection, video display amusement, reverse-engineering, medicine etc.It plays an important role for core technology.
Point cloud information is readily available now, they can record the environmental information of indoor or outdoors, including a large amount of sampleProduct.Under the background of data analysis, a kind of explanation of scene rebuilding is to disclose global scene feature, rather than it is thin to pay close attention to partSection, such as by the information of a complete surface reconstruction acquisition, under the background of artificial scene, it is observed that the spy of sceneSign is usually encoded into inside and the relation form between object.Since many objects are mainly made of plane face, artificial fieldScape can be abstracted as the set of plane and the correlation between them well.With noise, incomplete and differentUnder the data cases of constant value, the correlation gone to balance between each plane becomes a prodigious challenge.
Current most common cloud reconstructing method is that the RANSAC used in 2007 by Schnabel et al. is gradually extractedMost suitable primitive or its mutation.This method is attractive, because of its simplicity, scalability and probability guarantorCard.However, such part and incremental analysis are easy to ignore global scene level structure.Various improvement are proposed later, howeverThese algorithms are all largely dependent upon initial primitive collection.
Therefore, applicant proposes a kind of method for reconstructing three-dimensional scene based on RAP, using method of overall importance come simultaneouslyOne group of plane and its relationship, the not individual primitive of extraction is selected to extract primitive set.This method can withNoise, sampling still have preferable robustness in the case of changing with shortage of data.
Invention content
In view of the drawbacks described above of the prior art, technical problem to be solved by the invention is to provide a kind of based on RAP'sMethod for reconstructing three-dimensional scene.
To achieve the above object, the present invention provides a kind of scene reconstruction methods based on RAP methods, including following stepSuddenly:
S1, plane monitoring-network;
The generation of S2, candidate plane;
S3, RAP are selected.
As a further improvement on the present invention, S1, plane monitoring-network, include the following steps:
S11, point set S is divided by region growth method, it is therefore an objective to there will be point near consistent normal to be divided in one piece, and makeS is divided into one group of point and converged { Si } by the point set that S is converted into one group of orientation with local PCA analyses completely since bottom;
The direction of point j in the Euclidean distance ρ of S12, such as fruit dot i is differed with the direction put in Si is less than T, then is classified asPoint Si;
S13, S12 is repeated, region of search is expanded in group in the Euclidean distance ρ of any new point, in each iteration, meterThe least square fitting of local flatness Pi is calculated, these planes have limited range, then clip to one based on the projection in SiBounding box;
As a further improvement on the present invention, the generation of S2, candidate plane, includes the following steps:
S21, plane Pj is created in initial setting up P, to be fitted an orientation point set Sj, however come from global angleIt sees, Sj may be explained preferably by another plane, this plane, which comes from, rotates plane Pi and moved to Sj acquisitionsOne new plane;
S22, by the new planar representation obtained in S31 at Pi→j, it can be used as initial p j=Pj→jAlternative, becauseThis each point set Sj now with one group of { P1→j, P2→j...Associated;Here Pj=Pj→j, can be again fixed according to the point in SjThe other P in positioni→jLimited range;
S23, possible interplanar relationship quantity further increase the number for the mode that each Pi can be rotated on SjAmount, but we select most suitable one, ultimately generate Candidate SetAbundant candidate is provided for the configuration of RAPCollection;
The plane that initialization rank detects is to be based on local fit, it is thus possible to be influenced by noise and exceptional value.It is singleRelationship and rule between pure these noise shape segments of detection are difficult, and deviation is possible to increase with the increase of distanceGreatly.On the contrary, according to the plane relation in expection, display generates additional plane, as one group of plane of supposition, arranges oppositeWith initial set.These most of planes speculated are eventually dropped, but their helpful some lack samplings of recovery orNoisy plane.Together with the plane initialized, it is good to enable us to searching one for this widened candidate plane setGlobal RAP is as a select permeability.
As a further improvement on the present invention, S3, RAP are selected, and are included the following steps:
RAP select permeabilities can be used as one from abundant candidate collection P~The problem of middle selection subset, if it is right with oneBinary system indicator variable x_ (i → j) ∈ { 0,1 } answered indicates any one candidate selection P_ (i → j) ∈ P~.Binary systemVectorial [x_ (i → j) ...] corresponds to the selection of candidate plane, i.e. RAP;
Value is set to minimize using RAP extraction problems as by using binary system selection variable, this case is with data with one kindThis mode balances this scene, and selects a kind of possible plane figure.
S41, the weighted array by RAP extraction representations in the form of three kinds:
λ ∈ [0,1], in order to ensure we give each point set SjDistribute at least one original candidate target Pi→j, needFor example, λ=1, all x_ (j → j)=1, j=1,2 ..., its remaining dependent variable is 0, only initiallyThe suitable flat of part is selected.
S42, total data error of fitting is calculated, as the summation of individual data items error of fitting, with Ed (Pi→j,Sj) carry out tableShow by Pi→jExtract point set SjError function, therefore
Edata:=∑j∑ixi→jEd(Pi→j,Sj) (2)
Even the plane selection of mistake can also meet constraints and the data volume of needs is small.In order to promote planeThe systematicness of arrangement establishes a undirected irregular measurement Irr, by E in RAP per between a pair of of planeirrIt is expressed as:
Eirr:=∑j,i,l,kxi→jxk→lIrr(Pi→j,Pk→l) (3)
We have redesigned E_irr functions herein, it is clear that, it should the cluster of the plane or object that individually adjust is simultaneouslyDo not know in advance.So introducing the target variable of the second level.For the coordinate system of each internal rule, in optimizationIncrease a binary auxiliary variable xi∈ [0,1], therefore irregular item can be expressed as:
Eirr*:=∑i,kxixkIrr(Pi→i,Pk→k) (4)
Initial indicator variable xi→jWhich plane is selected as frame, therefore xi=maxjxi→j, substantially, it is new notRule measures EirrIn, select the cost of a new frame to become to be less dependent on object-oriented similar in solutionQuantity, if any candidate plane created in candidate generation step is all selected, corresponding auxiliary variable is answeredThis is activated;We encode this behavior with following constraint:
If any candidate plane { Pi→jIt is plane { P by initializing selectioni→iGenerate, then auxiliary node xiIndicate contributions of the frame i to scrambling;
To the plane i in each initialization direction, maximal condition is encoded to a single quadratic equation and constrained by weForm:
Therefore, final formula has been obtained:
λ ∈ [0,1], byWith the limitation of (5) two conditions of equation, it is noted that minimum produces RAP and carriesIt takes, i.e. selected one group of plane and its correlation.
As a further improvement on the present invention, our main contributions are the regulation arrangements of global frame, so that spaceThe object of distant place can influence approximate systematicness, since since over-segmentation, it is adjacent to make that we utilize spatial smoothing in itemPatch selects identical in-plane.
We strengthen rough compensation deals ability:
Espat:=∑j,i,l,kxi→jxk→lneigh(sj,sl)Cspat (7)
Space compensation Cspat=(1- λ)/10 is related to irregular weight.
The beneficial effects of the invention are as follows:The present invention can with noise and when shortage of data still with preferablyRobustness.
Description of the drawings
Fig. 1 is a kind of reconstruction flow chart of the method for reconstructing three-dimensional scene specific implementation mode based on RAP of the present invention.
Fig. 2 is a kind of algorithm general introduction figure of the method for reconstructing three-dimensional scene specific implementation mode based on RAP of the present invention.
Specific implementation mode
The invention will be further described with reference to the accompanying drawings and examples:
Referring to Fig. 1-Fig. 2, a kind of method for reconstructing three-dimensional scene based on RAP includes the following steps:
S1, plane monitoring-network
S11, one group of point cloud S is obtained using depth camera or hand held scanner;
S12, by simple domain division method division points cloud S, the point with consistent normal is divided in one piece;
S is divided into one by S13, the point set that S is converted into one group of orientation using local PCA analyses completely since bottomGroup point converges { Si };
S14, for the point i in Si, if the difference in the direction of point in the direction and Si of point j in its ρ is in thresholdWithin value T, then point j is divided into Si;T=-15 ° of threshold value~15 °, ρ=0.02m in the present embodiment.
S15, S14 is repeated, region of search is expanded in group in the distance ρ of any new point, in each iteration, calculate thisThe least square fitting of the Pi of ground level has thus obtained initial candidate original plane P:={ Pi };
The generation of S2, candidate plane
The plane that S21, initialization rank detect is to be based on local fit, it is thus possible to by the shadow of noise and exceptional valueRing, according to the plane relation in expection, display generates additional plane, as one group of plane of supposition, arrange it is opposite with mostFirst set;
These most of planes speculated are eventually dropped, but their helpful recovery some lack samplings or noisyPlane, together with the plane initialized, this widened candidate plane set make it possible to find a good overall situation RAP workFor a select permeability;
Specifically, plane Pj is created in initial setting up P, to be fitted an orientation point set Sj;
However, from the perspective of the overall situation, Sj may be explained preferably by another plane, this plane comes from and will put downFace Pi, which rotates and moved to Sj, obtains a new plane;
By this new planar representation at Pi→j, it can be used as initial p j=Pj→jAlternative, therefore each point set SjNow with one group of { P1→j, P2→j...Associated, Pj=P herej→j, other P can be repositioned according to the point in Sji→jIt is limitedRange;
In fact, the quantity of possible interplanar relationship, which further increases each Pi, can rotate to mode on SjQuantity, but we select most suitable one;
S22, Candidate Set is ultimately generatedAbundant Candidate Set is provided for the configuration of RAP;
S3, RAP are selected
S31, RAP extract problem can be used as one from abundant candidate collectionThe problem of middle selection subset, if with oneCorresponding binary system indicator variable xi→j∈ { 0,1 } indicates any one candidate selectionBinary vector[xi→j...] corresponding to the selection of candidate plane, i.e. RAP;
S32, value is made to minimize using RAP extraction problems as by using binary system selection variable, it can be a kind of with dataThis scene is balanced for this mode, and selects a kind of possible plane figure;
It is encoded to the weighted array of three kinds of forms:
(1, the number of formula, similarly hereinafter)
λ ∈ [0,1], in order to ensure we give each point set SjDistribute at least one original candidate target Pi→j, needFor example, λ=1, all xj→j=1, j=1,2 ..., its remaining dependent variable are 0, only initially localSuitable flat is selected;
S33, total data error of fitting is calculated, as the summation of individual data items error of fitting, with Ed (Pi→j,Sj) carry out tableShow by Pi→jExtract point set SjError function, therefore
Edata:=∑j∑ixi→jEd(Pi→j,Sj) (2)
Even the plane selection of mistake can also meet constraints and the data volume of needs is small, in order to promote planeThe systematicness of arrangement establishes a undirected irregular measurement Irr, by E in RAP per between a pair of of planeirrIt is expressed as:
Eirr:=∑j,i,l,kxi→jxk→lIrr(Pi→j,Pk→l) (3)
The irregular type for measuring any selected arrangement encoded by target variable, by structure, certain planes are completely compatible,Such as Irr (Pi→j,Pi→i)=0, since both methods is generated with a previously known plane relation,These are all automatically selected;
E has been redesigned hereinirrFunction, it is clear that, it should the cluster of the plane or object that individually adjust is not thingFirst know, so the target variable for introducing the second level increases by one for the coordinate system of each internal rule in optimizationA binary auxiliary variable xi∈[0,1];
Therefore irregular item can be expressed as:
Eirr*:=∑i,kxixkIrr(Pi→i,Pk→k) (4)
Initial indicator variable xi→jWhich plane is selected as frame, therefore xi=maxjxi→j, substantially, it is new notRule measures EirrIn, select the cost of a new frame to become to be less dependent on object-oriented similar in solutionQuantity, if any candidate plane created in candidate generation step is all selected, corresponding auxiliary variable is answeredThis is activated, this behavior is encoded with following constraint;
If any candidate plane { Pi→jIt is plane { P by initializing selectioni→iGenerate, then auxiliary node xiIndicate contributions of the frame i to scrambling;
Maximal condition is encoded to a single quadratic equation and constrained by S33, the plane i that direction is initialized to eachForm:
Therefore, final formula has been obtained:
λ ∈ [0,1], byWith the limitation of (5) two conditions of equation, it is noted that minimum produces RAP and carriesIt takes, i.e. selected one group of plane and its correlation.
The main contributions of the above method are the regulation arrangements of global frame, so that the object of space distant place can influence closelyAs systematicness, due to since over-segmentation, we utilize spatial smoothing in item to make adjacent patch select identical plane sideTo.
The above method also enhances rough compensation deals ability:
Espat:=∑j,i,l,kxi→jxk→lneigh(sj,sl)Cspat (7)
Space compensation Cspat=(1- λ)/10 is related to irregular weight.
Place is not described in detail by the present invention, is the known technology of those skilled in the art.
The preferred embodiment of the present invention has been described in detail above.It should be appreciated that those skilled in the art withoutIt needs creative work according to the present invention can conceive and makes many modifications and variations.Therefore, all technologies in the artPersonnel are available by logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's ideaTechnical solution, all should be in the protection domain being defined in the patent claims.