Specific embodiment
Hereinafter, it will be described with reference to the accompanying drawings the exemplary embodiment of the application.For clear and brief purpose, no
Well known function and construction is described in detail, this is because the well known function and construction can make the application in unnecessary details
On fog.The term described below limiting in view of the function in the application can be according to the intention of user and operator
Or implement and it is different.Therefore, it should limit the term on the basis of disclosed in the whole instruction.
Referring to Fig. 1, the flow diagram of the way of example for the construction method of the application buildings model.It should be noted
If having substantially the same as a result, the present processes are not limited with process sequence shown in FIG. 1, following other flow
Journey schematic diagram is not limited equally with the process sequence of diagram.As shown in Figure 1, the method comprising the steps of S10 to step S50, in which:
S10: the target structures in the picture of multiple multi-angled shootings are identified.
Step S10 is to identify to need to establish model building in plurality of pictures that is acquired and/or receiving, wherein need to
The building for establishing model is known as target structures, and plurality of pictures is from the resulting picture of the different angle shot of target structures.It can
With understanding, the picture of multiple multi-angled shootings can be in real time by filming apparatus shoot obtained by, be also possible to other and pass through
The picture of network transmission can also be and call the local picture stored.It is built required for wherein including in each picture
The building (building interested) of formwork erection type, it should be noted that multiple pictures are the angle shot gained different from target structures
Picture.
In one embodiment, the picture identified is to call the picture being locally stored, wherein the picture identified is from mesh
Mark building at least three direction (building all around with three directions any in top) shooting gained.
In another embodiment, the picture identified is to be greater than 5 direction shooting gained from target structures.Specifically, clapping
The direction taken the photograph include: building all around with 5 directions such as top, and with all around either there is certain drift angle in top
Direction, the direction as corresponding to the body diagonal of a building.Wherein, due to being varied for the direction of building shooting
, do not make any restriction to the angle of shooting at this.
Further, in an embodiment, by the every picture identified, pixel relevant to target construction is marked
Out, it is used as subsequent calls and is either further processed operation in the picture marked out on the corresponding pixel basis of target structures.
Further, in an embodiment, after step S10 further include: by the part in every picture in addition to target structures
Pixel replaces with pure white.
In one embodiment, it is removed outside target structures in currently identified picture, further includes other build either
Background etc..So after step slo further including replacing the pixel for removing all parts other than target structures in every picture
For pure white.Target structures outer portion pixel will be removed in every picture to replace all with pure white and can preferably reduce calculating
The amount of identification simplifies the calculation amount of reconstruction model, also improves the precision of reconstruction, while it is resulting to be also further reduced reconstruction
Model file volume size, further less occupied calculator memory space.
S20: it calculates the pose of target structures in every picture and puts cloud.
Further, it after step S10 identifies target structures in picture, further calculates out target in every picture and builds
The pose built and point cloud.Wherein, the pose of target structures refers to target structures position and posture in a coordinate system, can also letter
Singly it is interpreted as direction captured by current image.The point cloud of target structures can be understood as the data acquisition system of product appearance point.
Specifically, step S20 further comprises: calculating the pose and point of target structures using exercise recovery structure algorithm
Cloud.Since the shooting angle of different pictures is different, so the pose of target structures is also different in different pictures.Its
In, exercise recovery structure algorithm (structure from motion) restores camera using two scenes or multiple scenes automatically
Movement or scene structure are tracking and motion match that a kind of self-alignment technology can be automatically performed camera.Particularly
With characteristic point in adjacent two either plurality of pictures, to obtain complete scene structure.
In one embodiment, according to the target structures in multiple the multi-angle pictures identified in step S10, fortune is utilized
The dynamic characteristic point restored structure algorithm and match the picture of adjacent pose, is built with recovering same target taken by multi-angle
It builds, to obtain corresponding cloud of target structures.
S30: processing is combined to obtain preliminary three-dimensional according to the pose of the corresponding target structures of plurality of pictures and point cloud
Model.
According to the pose of target structures and point cloud in multiple resulting multi-angle pictures is calculated in above-mentioned steps S20, carry out
Combined treatment, to obtain preliminary threedimensional model.
Further, step S30 includes: the pose according to the corresponding target structures of plurality of pictures and puts cloud, utilizes more mesh
Stereoscopic vision algorithm calculates and carries out combined treatment to obtain preliminary threedimensional model.
According in step S20 the pose of target structures and point cloud in calculated plurality of pictures, and utilize multi-eye stereo
Vision algorithm further calculates a cloud, and carries out combined treatment to obtain preliminary threedimensional model.
According to the characteristics of exercise recovery structure algorithm it is known that exercise recovery algorithm calculated target structures point
Cloud is sparse cloud;Similarly according to the characteristics of multi-view stereo vision algorithm it is known that being calculated through multi-view stereo vision algorithm
The point cloud of obtained target structures is dense point cloud.It should be understood that when multi-view stereo vision algorithm is calculated by exercise recovery
Method calculates on corresponding cloud basis of gained target structures, is further counted again according to resulting position orientation relation is calculated
It calculates, obtained preliminary threedimensional model is dense point cloud.
S40: two-dimentional cutting processing is carried out to preliminary threedimensional model, to obtain the two dimension slicing of preset quantity.
Further, two-dimentional cutting processing is carried out according to preset direction to the preliminary threedimensional model of gained, to be preset
The two dimension slicing of quantity.Wherein, the direction for carrying out two-dimentional cutting to preliminary threedimensional model can be horizontally oriented, and be also possible to edge
Vertical direction carries out cutting to preliminary threedimensional model, can also be direction that other are obtained by specific calculation to preliminary three-dimensional mould
Type carries out cutting, to obtain the two dimension slicing of preset quantity.
Optionally, in the step of carrying out two-dimentional cutting processing to preliminary threedimensional model, the number of the set two dimension slicing that sets the goal
Amount is set according to the precision of required cutting.In one embodiment, when needing to carry out very precisely meticulously cutting, then
It is more that cutting number can be set, to obtain greater number of two dimension slicing.In another embodiment, when needs are to preliminary three-dimensional mould
When type carries out common cutting, then the less number of cutting is set, to obtain a small number of two dimension slicing.
Further, in one embodiment, step S40 further includes following step, i.e., according to a preset direction, successively
Two-dimentional cutting processing is carried out to preliminary threedimensional model to carry out to obtain the two dimension slicing of preset quantity to preliminary threedimensional model
Also two slices are numbered according to the sequence of cutting in dicing process.During cutting, the sequence according to cutting is right
Resulting two dimension slicing is successively numbered.Such as when cutting is to carry out carrying out cutting from up to down along horizontal plane direction, then
Label successively can be carried out to the resulting two dimension slicing of cutting along the sequence of cutting.
Specifically, the content of number can be " 1,2,3 ... " it should be understood that in other examples, number
Content can be adjusted setting according to the needs of users, such as adjustable mode combined for letter with number.
In another embodiment, Fig. 2 is referred to, step S40 includes step S41 to step S43.Wherein,
S41: the straight line and plane of preliminary threedimensional model are detected.
Step S41 is further detected, is extracted according to resulting cloud is calculated in obtained preliminary threedimensional model
Straight line therein and plane.Wherein, the purpose for extracting straight line and plane be mainly to get rid of because noise either other
The miscellaneous point of factor bring, so that the pose estimation and point cloud in reconstruction process are more accurate.Do not reducing model quality simultaneously
Under the premise of, the network for effectively reducing corresponding target three-dimensional structure obtained by the point cloud and subsequent transformation of target structures is complicated
Degree.
S42: according to straight line and/or plane, the plane of first direction and/or the plane of second direction are fitted.
Step S42 is the straight line according to obtained in above-mentioned steps S41 and/or plane, further fits first direction
The plane of plane and/or second direction.Wherein, fitting be the point of a certain preset quantity is obtained by calculating with these points away from
From the smallest straight line of quadratic sum, refer to likewise, fitting a certain plane, calculate the linear distance with preset quantity
The smallest plane of quadratic sum.Wherein, distance is vertical range.
Further, first with the point in cloud, the straight line of preset quantity is fitted, is fitted resulting straight line utilizing,
Further fit the plane in the plane either second direction of first direction.Plane on first direction is horizontally oriented
Plane, the plane that the plane in second direction is vertically oriented, fitting gained as needed.
In one embodiment, the plane that the plane on the first direction of required fitting is horizontally oriented, first fits
The parallel straight line of horizontal plane, in the plane for further fitting required horizontal direction according to the straight line fitted.
Likewise, in other examples, when needing to fit the plane in a direction, then first fitting and required plane
Parallel straight line, then fit required plane.
S43: carrying out two-dimentional cutting to preliminary threedimensional model according to the plane of the plane of first direction and/or second direction,
To obtain the two dimension slicing of preset quantity.
Step S43 is the plane of the plane and/or second direction according to the first direction being fitted in above-mentioned steps S42
Two-dimentional cutting is carried out to preliminary threedimensional model, to obtain the two dimension slicing of preset quantity.
It in one embodiment, is plane on first direction when the fitting in step S42 is resulting, i.e. in a horizontal direction
Plane, step S43 be then according to the plane in resulting horizontal direction to preliminary threedimensional model carry out cutting, to be preset
The two dimension slicing of quantity.
In another embodiment, when in step S42 fitting gained be the plane of second direction, i.e. it is flat in a vertical direction
Face, then step S43 carries out cutting to preliminary threedimensional model according to the plane in gained vertical direction, to obtain the two of preset quantity
Dimension slice.It is understood that when to preliminary threedimensional model cutting be along in vertical direction a plane carry out cutting when, after
It is continuous when carrying out carrying out registration process to two dimension slicing obtained by cutting, then registration process can be carried out along the direction of its original cutting.
It further include being carried out at normalization to each two dimension slicing obtained by cutting after to preliminary threedimensional model cutting
Reason, to obtain calibration two dimension slicing.Wherein, calibration two dimension slicing is usually the two-dimension picture of some polygons.Normalization process
It is gained two dimension slicing in above-mentioned steps to be further processed a little miscellaneous point either abnormal point, while (will wrap because of other factors
Include noise etc.) caused by lack completion, to obtain a more accurate polygon (by the two dimension slicing of normalization process).
It is the effect diagram of normalization process specifically, referring to Fig. 3 a and Fig. 3 b.Fig. 3 a shows at not by normalization
The two dimension slicing of reason can be learnt by Fig. 3 a due to uncertainties such as noises, and resulting two dimension slicing is caused to there is missing, and institute
It is uneven to obtain two dimension slicing marginal portion.After normalization process, obtain that lines as shown in Figure 3b are more straight, and angle is more quasi-
True two dimension slicing (polygon), wherein after normalization process, by the part polishing of missing.It concludes, normalization process
Two dimension slicing is exactly modeled as by polygon by the straight line portion extracted.Can be related in this process: straight line is intended
The removal of miscellaneous point during conjunction lacks least a portion of part polishing to straight line in polygonal structure, or adjustment angle it is more quasi-
Really.
S50: two dimension slicing is subjected to registration process by predetermined manner, to obtain target three-dimensional.
Further, step S50 is that two dimension slicing is carried out registration process in the way of increasing alignment, to obtain target
Threedimensional model.
In one embodiment, step S50 is directly to carry out gained two dimension slicing after cutting in the way of increasing alignment
Registration process, to obtain target three-dimensional.
In another embodiment, step S50 specifically: the calibration two dimension slicing that will be obtained after normalization process is pressed
Registration process is carried out according to the mode for increasing alignment, to obtain target three-dimensional.Wherein, calibration two dimension slicing is usually some more
The two-dimension picture of side shape.Further, step S50 two dimension slicing described further by predetermined manner carry out registration process, and
The two dimension slicing is taken and handled during registration process, to obtain target three-dimensional.
In one embodiment, it after being aligned calibration two dimension slicing in a manner of increasing, but still remains some less
Error is taken and is operated at this time by error, and error position numerical value is taken as much as possible and at most numerical value is either quasi-
Really value.
Optionally, in one embodiment, when by above-mentioned steps S10 to step S40, available target three-dimensional
It afterwards, further include that target three-dimensional is converted to network.It is understood that being converted to the target three-dimensional mould of network
Type, occupied calculator memory can be smaller, more convenient transmission and analysis.The application is by identifying multiple multi-angled shootings
Target structures in picture, and the pose of target structures and point cloud in every picture are calculated, and according to a calculated pose
Preset combined treatment is carried out with cloud, obtains preliminary threedimensional model, obtained threedimensional model is carried out at two-dimentional cutting
Reason, to obtain the two dimension slicing of preset quantity, carries out registration process according to preset mode for the two dimension slicing obtained through cutting,
To obtain target three-dimensional, final realize rebuilds more accurate model in the process.
Fig. 4 is referred to, is a kind of 10 1 embodiment structure schematic diagram of device of reconstruction model of the application, the device 10 packet
The processor 12 and memory 14 being electrically connected with each other are included, the processor 12 couples the memory 14, the processor 12
Execute instruction the construction method to realize buildings model as described above at work, and by the processing for executing instruction generation
As a result it is stored in the memory 14.
In one embodiment, specifically, the device 10 of reconstruction model can for mobile phone, laptop, possess communication and
The other equipment of the tablet computer of network savvy, above-mentioned reconstruction model function, but not limited to this.
It is a kind of 20 1 embodiment structure schematic diagram of device with store function of the application, storage device refering to Fig. 5
20 are stored with program data, and the program data that storage device is stored is performed the building for realizing buildings model as described above
Method.Specifically, the above-mentioned device 20 with store function can be the memory of terminal device, personal computer, server,
The network equipment or USB flash disk etc. are one such.The foregoing is merely presently filed embodiments, are not intended to limit the application
The scope of the patents, it is all using equivalent structure or equivalent flow shift made by present specification and accompanying drawing content, or directly
Or it is used in other related technical areas indirectly, it similarly include in the scope of patent protection of the application.