CN108765556A - A kind of dynamic 3D Real-time modeling set methods based on improvement particle cluster algorithm - Google Patents
A kind of dynamic 3D Real-time modeling set methods based on improvement particle cluster algorithm Download PDFInfo
- Publication number
- CN108765556A CN108765556A CN201810489957.5A CN201810489957A CN108765556A CN 108765556 A CN108765556 A CN 108765556A CN 201810489957 A CN201810489957 A CN 201810489957A CN 108765556 A CN108765556 A CN 108765556A
- Authority
- CN
- China
- Prior art keywords
- particle
- length
- room
- vector
- value
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Computer Graphics (AREA)
- Biophysics (AREA)
- Geometry (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention provides a kind of based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm comprising following steps:Step S0:There is provided a finishing prebrowsing system comprising scan module, computing module, imports model module, mapping block and display module at logging modle;Step S1:The staking-out work that the space vector information in 8 corners to needing room to be simulated is completed by scan module collaboration logging modle, records gyroscope parameters and calculates space vector data as output parameter;Step S2:Intelligent algorithm is called by the core of computing module, receives the output parameter of step S1, operation is obtained with the room of cube room equal proportion and user's height unit length data as output parameter;Step S3:3D engines are called by importing model module, receive the output parameter of step S2, dynamic creation goes out the 3D models in room.The modified particle swarm optiziation of the present invention increases the diversity of particle, with control convergence speed, and improves search precision.
Description
Technical field
The present invention relates to a kind of based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm.
Background technology
Achievement in research once is achieved with regard to 3D modeling mode at present:External popular 3D modeling mode is three-dimensional laser
Scanning element cloud modeling pattern, Bahman Jafari et al. illustrate the model accuracy that this modeling pattern can reach high, mould
Type details shows power also very by force, but this method is very high to hardware requirement, and only high-performance computer could handle completion 3D modeling
Task.Reem S et al. propose the 3D modeling mode for carrying out scratching figure in a kind of picture from 2D, and this 3D modeling belongs to Three-dimensional Gravity
Technology is built, modeling speed is efficient soon, but precision is low.Zhang Wei et al. proposes a kind of 3D modeling side being referred to as curved surface modeling
Method, but this method application range is small, and only competence exertion goes out technical advantage in the modeling requirement of curved face object.
Invention content
Inaccurate defect is measured in order to solve domestic traditional 3D modeling technology, the present invention proposes that one kind may be implemented in real time
Room equal proportion modeling, user can allow user integrally to fill room with preview to the finishing effect in all orientation in entire room
Repairing effect has intuitive impression, easy to operate and real-time 3D modeling method.
To achieve the above object, the present invention uses following technical scheme:A kind of dynamic 3D based on improvement particle cluster algorithm
Real-time modeling set method comprising following steps:Step S0:There is provided a finishing prebrowsing system comprising scan module, record mould
Block, imports model module, mapping block and display module at computing module;Step S1:It is completed by scan module collaboration logging modle
Staking-out work to the space vector information in 8 corners for needing room to be simulated records gyroscope parameters and calculates space
Vector data is as output parameter;Step S2:Intelligent algorithm is called by the core of computing module, receives the output ginseng of step S1
Number, operation are obtained with the room of cube room equal proportion and user's height unit length data as output parameter;Step S3:
3D engines are called by importing model module, receive the output parameter of step S2, dynamic creation goes out the 3D models in room.
In an embodiment of the present invention, the artificial scaling method of scan module is as follows in step S1:It stands at the room center
Position after mobile device camera to be aligned to the corner vertex position per sidewalls, carries out artificial touch screen click calibration record and moves
The spatial attitude information at the calibration moment of dynamic equipment;Since local coordinate system corresponding with mobile phone posture is to change at any time, 3D
The world coordinate system that engine needs then is defined as the local coordinate of the instantaneous attitude of cell phone apparatus in system initialization gyroscope
System is world coordinate system q (t);
The mathematic(al) representation of world coordinate system q (t) is as follows:
Wherein, α is mathematic sign of the gyroscope expression around x-axis rotation angle roll, and β is that gyroscope expression is rotated around y-axis
The mathematic sign of angle yaw, γ indicate the mathematic sign around z-axis rotation angle pitch for gyroscope, and w is inertia weight, then appoints
The mathematical expression of spin matrix Rs (t) of the meaning moment t on the basis of world coordinate system is as follows:
Define gyroscope initialization moment spin matrix be R (t=0), then the t=0 moment record gyroscope α, β,
The numerical value of (0) spin matrix R can be obtained in γ numerical value, then the mathematical expression of world coordinate system is as follows:
Further, it is as follows to resolve corner vector approach for logging modle:If cube room particle center made
For the origin position of three-dimensional system of coordinate, then this origin position is user's the location of eyes in a room;So eight
The corner D coordinates value on vertex is the unit value that the vector length in eight corners is 1;Eight vertex are respectively defined as:V1、
V2、V3、V4、V5、V6、V7、V8, each vertex vector is by V(x,y,z)Form determine;Definition
Length(V1)=Length (V2)=Length (V5)=Length (V6)=1, after defining 1 length of unit,
It is re-introduced into a variable λ and makes Length (V3)=λ Length (V1)=λ, to it is concluded that Length (V3)=Length
(V4)=Length (V7)=Length (V8)=λ;Vector length is indicated by unit 1 or variable λ;Assuming that V1-V8Measurement visitor
It is accurate in sight, obtains the real number value of variable λ to get to the vertex point coordinate information in cube room;Wherein V1-V8In vector
Each dimension the real number value of component x, y and the practical length and width in room be equal proportion numerical relation, ratio real number value sets
For zoom factor k, zoom factor k computational methods are as follows:
Wherein Width, Lengthth, Height indicate that room width, BodyHeight are user's height respectively.
In an embodiment of the present invention, the intelligent algorithm called in step S2 is improved particle swarm optimization algorithm, specifically
Steps are as follows:Step 1:Determine that the iterations of solution space dimension, population scale, the algorithm control of optimization aim, initialization are calculated
The parameters of method initialize the initial position of each particle and initial velocity in population with random number;Step 2:
Calculate each particle current location X in populationiAdaptive value;Step 3:By other individuals all in individual fitness and population
Adaptive value is compared, and preferentially obtains the best adaptive value P of population during current iteration calculates;Step 4:Population current iteration meter
Obtained optimal adaptation value P is compared with the global optimal adaptation value that all previous experience of population obtains, and obtains the newer overall situation
Optimal adaptation value G;Step 5:Using particle position in standard particle group's algorithm and its more new formula of iterative calculation to population
The speed of each particle and position are calculated, and the data information of the position of more new particle, speed;Step 6:Judging particle is
It is no to have completed search arrival global optimum position;If being unsatisfactory for condition, return to step 2 carries out the iteration meter of a new round
It calculates;Step 7:Setting mark carries out random initializtion to particle position, cancels cognition item parameter and flying speed vector ginseng
Number;Step 8:Using the initial position of each particle and the initialization formula of initial velocity, to represent particle position it is four-dimensional to
It measures all directions to be pre-processed, calculates the directive optimal adaptation value of institute, the corresponding direction of optimal adaptation value flies as particle
Line direction;Step 9:Judge whether particle optimum position breaks through global optimal adaptation value, cancellation step 7 is arranged if breaking through
Mark, restores the cognition item parameter and flying speed vector parameter of all particles, jumps to the iteration that step 2 carries out a new round
It calculates;Step 10:Judge whether to meet termination condition, if it has iterated to calculate and has reached preset maximum iteration, if
It is unsatisfactory for termination condition, then return to step 8 carries out the iterative calculation of a new round;Step 11:Terminate algorithm.
In an embodiment of the present invention, it is as follows to carry out initial method for the initial position of each particle and initial velocity:
α=c × rand (0,1)
X3'={ w × X3+α,w×X3-α,w×X3+α,w×X3+α}
X4'={ w × X4-α,w×X4-α,w×X4+α,w×X4+α}
X5'={ w × X5+α,w×X5+α,w×X5-α,w×X5+α}
X6'={ w × X6-α,w×X6+α,w×X6-α,w×X6+α}
X7'={ w × X7+α,w×X7-α,w×X7-α,w×X7+α}
X8'={ w × X8-α,w×X8-α,w×X8-α,w×X8+α}
X9'={ w × X9+α,w×X9+α,w×X9+α,w×X9-α}
X10'={ w × X10-α,w×X10+α,w×X10+α,w×X10-α}
X11'={ w × X11+α,w×X11-α,w×X11+α,w×X11-α}
X12'={ w × X12-α,w×X12-α,w×X12+α,w×X12-α}
X13'={ w × X13+α,w×X13+α,w×X13-α,w×X13-α}
X14'={ w × X14-α,w×X14+α,w×X14-α,w×X14-α}
X15'={ w × X15-α,w×X15-α,w×X15-α,w×X15-α}
Wherein c is the cognition item Studying factors of particle;W is inertia weight;Xi' be each particle initial position;α be with
Machine interference factor;Judge particle whether completed search arrive at global optimum position standard it is as follows:
|V1|<0.000001AND|V2|<0.000001 AND|V3|<0.000001AND|V4|<0.00000001
Fitness fitness computational methods are as follows:
Wherein, DetaOffsetiIndicate the length value of vector difference;
The length value DetaOffset of vector differenceiComputational methods are as follows:
Wherein, ViIndicate 8 vectors of calibration, VxiIndicate 8 vectors that may be solved, ViAnd VxiCorresponding value be all by
The value obtained after vector is unitization;The mathematic(al) representation of x, y, z is as follows:
X=Width ÷ 2
Y=Length ÷ 2
zup=Height-BodyHeight
zdown=BodyHeight
Wherein Width is expressed as the width in room, and Length is expressed as the length in room, and Height is expressed as the height in room
Degree, BodyHeight are user's height;
8 vector V of calibrationiMathematic(al) representation it is as follows:
V1={-x, y, zup},V2={ x, y, zup}
V3={-x, y ,-zdown},V4={ x, y ,-zdown}
V5={ x ,-y, zup},V6={-x ,-y, zup}
V7={ x ,-y ,-zdown},V8={-x ,-y ,-zdown}
Wherein, zupIndicate the difference in height of room height and user's height, zdownIndicate user's height.
The unitization computational methods of vector are as follows:
unitVectori={ Vi.x÷Length,Vi.y÷Length,Vi.z÷Length}
Wherein, the vector after unitVectori indicates unitization, Vi indicate the coordinate letter on i-th of room of cube vertex
Breath;
Particle position and its more new formula of iterative calculation are as follows in standard particle group's algorithm:
Vi'=w × Vi+c1×r1×(P-Xi)+c2×r2×(G-Xi)
X '=X+V '
Wherein, Vi indicates the speed of particle flight;Vi ' indicates the renewal speed of particle;X indicates the script position of particle;
X ' indicates the update position of particle;W is inertia weight;Random number r1、r2∈(0,1);c1、c2For Studying factors.
Further, the formula of its vectorial unitization selection of different location is different, is due to user there is lambda coefficient
Height gap factor determine;When user's height is exactly equal to room height half, λ is equal to 1.
Preferably, the cognition item Studying factors c values of particle are 3;Inertia weight w values are 0.8.
Compared with prior art, the present invention proposes modified particle swarm optiziation, which increases the diversity of particle, with
Control convergence speed, and improve search precision;The present invention will need the room length solved and user's height institute's generation
The virtual 3D camera positions data of table is may solve one of in a hyperspace, using particle cluster algorithm at this
It scans for calculating in hyperspace, finally obtains the feasible solution of calibration vector error minimum, be arranged needed for dynamic 3D modeling
Optimized parameter after carrying out 3D modeling according to the system, greatly promotes the sense of reality of onsite user's experience.
Description of the drawings
Fig. 1 is finished system module division figure;
Fig. 2 is the flow chart based on the dynamic 3D Real-time modeling set technologies for improving particle cluster algorithm;
Fig. 3 is cube room and co-ordinate system location relationship setting figure.
Specific implementation mode
Explanation is further explained to the present invention in the following with reference to the drawings and specific embodiments.
The present invention uses dynamic 3D modeling technology, it would be desirable to representated by the room length and user's height of solution
Virtual 3D camera positions data be one of in hyperspace may solution, using particle cluster algorithm more than this
It scans for calculating in dimension space, finally obtains the feasible solution of calibration vector error minimum, be arranged needed for dynamic 3D modeling most
Excellent parameter after carrying out 3D modeling according to the system, greatly promotes the sense of reality of onsite user's experience.
The invention mainly includes steps:Step S0:There is provided a finishing prebrowsing system comprising scan module, record
Module, imports model module, mapping block and display module at computing module;Step S1:It is complete by scan module collaboration logging modle
The staking-out work of the space vector information in 8 corners in room to be simulated is needed in pairs, records gyroscope parameters and calculates sky
Between vector data as output parameter;Step S2:Intelligent algorithm is called by the core of computing module, receives the output ginseng of step S1
Number, operation are obtained with the room of cube room equal proportion and user's height unit length data as output parameter;Step S3:
3D engines are called by importing model module, receive the output parameter of step S2, dynamic creation goes out the 3D models in room.
Fig. 1, the present invention involved in finishing prebrowsing system be made of six modules, be respectively scan module, logging modle,
Computing module imports model module, mapping block and display module.
Fig. 2 is please referred to, the present invention provides a kind of based on the dynamic 3D Real-time modeling set technologies for improving particle cluster algorithm, feature
It is, includes the following steps:
Step S1:Calibration work to the space vector information in 8, room corner is completed by scan module collaboration logging modle
Make, record gyroscope parameters and calculates space vector data as output parameter;
In an embodiment of the present invention, the step of artificial scaling method of scan module is as follows:
It stands heart position in a room, after mobile device camera to be aligned to the corner vertex position per sidewalls, into pedestrian
Work touch screen clicks the spatial attitude information at the calibration moment of calibration record mobile device.Since part corresponding with mobile phone posture is sat
Mark system is to change at any time, and the world coordinate system that 3D engines need then is defined as the cell phone apparatus in system initialization gyroscope
The local coordinate system of instantaneous attitude is world coordinate system q (t).
The mathematic(al) representation of world coordinate system q (t) is as follows:
Wherein, α is mathematic sign of the gyroscope expression around x-axis rotation angle roll, and β is that gyroscope expression is rotated around y-axis
The mathematic sign of angle yaw, γ indicate the mathematic sign around z-axis rotation angle pitch for gyroscope, then any time t is with generation
The mathematical expression of spin matrix R (t) on the basis of boundary's coordinate system is as follows:
Define gyroscope initialization moment spin matrix be R (t=0), then the t=0 moment record gyroscope α, β,
The numerical value of (0) spin matrix R can be obtained in γ numerical value, then the mathematical expression of world coordinate system is as follows:
In an embodiment of the present invention, steps are as follows for logging modle resolving corner vector approach:
Such as Fig. 3, the solid geometry meaning representated by the vector direction of corner is described as follows:If by cube room particle
Origin position of the heart position as three-dimensional system of coordinate, then this origin position is people's the location of eyes in a room.That
The corner D coordinates value on eight vertex is the unit value that the vector length in eight corners is 1.Eight vertex define respectively
For:Eight vertex are respectively defined as:V1、V2、V3、V4、V5、V6、V7、V8, each vertex vector is by V(x,y,z)Form it is true
It is fixed.Since the feature in cube room coordinates system is V1、V2、V5、V6Vector length be equal, V3、V4、V7、V8Vector
Length is also equal.If origin O is in the center in cube room, V1-V8All vector lengths all can be equal.
Define Length (V1)=Length (V2)=Length (V5)=Length (V6)=1 defines 1 length of unit
And then it introduces a variable λ and makes Length (V3)=λ Length (V1)=λ, can be it is concluded that Length (V3)=
Length(V4)=Length (V7)=Length (V8)=λ.Vector length can be indicated by unit 1 or variable λ.Assuming that V1-
V8Measurement be objectively accurate, it is only necessary to obtain the real number value of variable λ, you can obtain cube room apex coordinate letter
Breath.
Wherein V1-V8The real number value of component x, y of each dimension in vector and the practical length and width in room are equal proportions
Numerical relation, ratio real number value are set as zoom factor k, and zoom factor k computational methods are as follows:
Wherein Width is expressed as the width in room, and Length is expressed as the length in room, and Height is expressed as the height in room
Degree, BodyHeight are user's height;
Step S2:Intelligent algorithm is called by the core of computing module, receives the output parameter of first part, operation obtain with
The room and user's height unit length data of cube room equal proportion are as output parameter;
In an embodiment of the present invention, the intelligent algorithm of calling is improved particle swarm optimization algorithm, is as follows:
Step 1:Determine the iterations of solution space dimension, population scale, the algorithm control of optimization aim, initialization algorithm
Parameters, the initial position of each particle and initial velocity in population are initialized with random number.
Step 2:Calculate each particle current location X in populationiAdaptive value.
Step 3:Individual fitness is compared with other individual fitnesses all in population, this is preferentially obtained and changes
The best adaptive value P of population during generation calculates.
Step 4:The optimal adaptation value P that population current iteration is calculated is best suitable with the overall situation that all previous experience of population obtains
It should be worth and be compared, obtain newer global optimal adaptation value G.
Step 5:Using particle position in standard particle group's algorithm and its more new formula of iterative calculation to each of population
The speed of particle and position are calculated, and the data information of the position of more new particle, speed.
Step 6:Judge whether particle has completed search and arrived at global optimum position.If being unsatisfactory for condition, return
Step 2 carries out the iterative calculation of a new round.
Step 7:Setting mark, to particle position carry out random initializtion, cancel cognition item parameter and flying speed to
Measure parameter.
Step 8:Using the initial position of each particle and the initialization formula of initial velocity, to representing the four of particle position
All directions of dimensional vector are pre-processed, and calculate the directive optimal adaptation value of institute, the corresponding direction of optimal adaptation value is as grain
Sub- heading.
Step 9:Judge whether particle optimum position breaks through global optimal adaptation value, cancellation step 7 is arranged if breaking through
Mark, restore the cognition item parameter and flying speed vector parameter of all particles, jump to step 2 carry out a new round repeatedly
In generation, calculates.
Step 10:Judge whether to meet termination condition, if iterated to calculate and reached preset maximum iteration, such as
Fruit is unsatisfactory for termination condition, then return to step 8 carries out the iterative calculation of a new round.
Step 11:Terminate algorithm.
The iterative process data analysis of the improvement particle cluster algorithm global optimum of one embodiment of the invention is referring to table 1.
Table 1
In table 1, statistics indicate that algorithm is after iteration 78 times, hence it is evident that it has been absorbed in local optimum search state, it is global best
The update of adaptive value is converged in the position of iteration 96 times, and comparison target solution is can be found that when being global search, two-dimensional data
It has been absorbed in local optimum.It can be seen that come from the data of the 97th iteration, breaking through occurs in innovatory algorithm in this iteration,
In the position of a particle new optimal adaptation value 0.830331 has been obtained in global traversal search because of innovatory algorithm, it is right
Than search before, the breakthrough of this adaptive value be very it will be evident that at this moment particle position X=0.516164,
0.483016,0.724685,0.262956 }, comparison target solution can be found that while the first dimension, the third dimension, fourth dimension data than it
Preceding more to disperse separate, but two-dimensional data, which are breakthrough search in global scope, has approached target solution, therefore
The adaptive value of this particle becomes the new core particle of innovatory algorithm at global optimal adaptation value.
It is as follows that the initial position and initial velocity of each particle carry out initial method:
α=c × rand (0,1)
X3'={ w × X3+α,w×X3-α,w×X3+α,w×X3+α}
X4'={ w × X4-α,w×X4-α,w×X4+α,w×X4+α}
X5'={ w × X5+α,w×X5+α,w×X5-α,w×X5+α}
X6'={ w × X6-α,w×X6+α,w×X6-α,w×X6+α}
X7'={ w × X7+α,w×X7-α,w×X7-α,w×X7+α}
X8'={ w × X8-α,w×X8-α,w×X8-α,w×X8+α}
X9'={ w × X9+α,w×X9+α,w×X9+α,w×X9-α}
X10'={ w × X10-α,w×X10+α,w×X10+α,w×X10-α}
X11'={ w × X11+α,w×X11-α,w×X11+α,w×X11-α}
X12'={ w × X12-α,w×X12-α,w×X12+α,w×X12-α}
X13'={ w × X13+α,w×X13+α,w×X13-α,w×X13-α}
X14'={ w × X14-α,w×X14+α,w×X14-α,w×X14-α}
X15'={ w × X15-α,w×X15-α,w×X15-α,w×X15-α}
Xi' be each particle initial position.α is the random disturbances factor.
Preferably, c is the cognition item Studying factors of particle, value 3;W is inertia weight, value 0.8.
Judge particle whether completed search arrive at global optimum position standard it is as follows:
|V1|<0.000001AND|V2|<0.000001 AND|V3|<0.000001AND|V4|<0.00000001
Fitness computational methods are as follows:
Wherein, DetaOffsetiIndicate the length value of vector difference.
The length value DetaOffset of vector differenceiComputational methods are as follows:
Wherein, ViIndicate 8 vectors of calibration, VxiIndicate 8 vectors that may be solved, ViAnd VxiCorresponding value be all by
The value obtained after vector is unitization.The mathematic(al) representation of x, y, z is as follows:
X=Width ÷ 2
Y=Length ÷ 2
zup=Height-BodyHeight
zdown=BodyHeight
Wherein Width is expressed as the width in room, and Length is expressed as the length in room, and Height is expressed as the height in room
Degree, BodyHeight are user's height;
8 vector V of calibrationiMathematic(al) representation it is as follows:
V1={-x, y, zup},V2={ x, y, zup}
V3={-x, y ,-zdown},V4={ x, y ,-zdown}
V5={ x ,-y, zup},V6={-x ,-y, zup}
V7={ x ,-y ,-zdown},V8={-x ,-y ,-zdown}
Wherein, zupIndicate the difference in height of room height and user's height, zdownIndicate user's height.
The unitization computational methods of vector are as follows:
unitVectori={ Vi.x÷Length,Vi.y÷Length,Vi.z÷Length}
Wherein, unitVectoriVector after indicating unitization, Vi indicate the coordinate letter on i-th of room of cube vertex
Cease
Wherein, the formula of its vectorial unitization selection of different location is different, is the body due to user there is lambda coefficient
Height difference away from factor determine.When user's height is exactly equal to room height half, λ is equal to 1.
Particle position and its more new formula of iterative calculation are as follows in standard particle group's algorithm:
Vi'=w × Vi+c1×r1×(P-Xi)+c2×r2×(G-Xi)
X '=X+V '
Wherein, Vi indicates the speed of particle flight;Vi ' indicates the renewal speed of particle;X indicates the script position of particle;
X ' indicates the update position of particle;W is inertia weight;Random number r1、r2∈(0,1);c1、c2For Studying factors.
Inertia weight w is used for balanced algorithm ability of searching optimum and local search ability, preferably, the present invention is according to inertia
The empirical data of weight is set as 0.8.
Step S3:3D engines are called by importing model module, receive the output parameter of second part, dynamic creation goes out room
3D models.
It is presently preferred embodiments of the present invention, all any changes made according to the technical solution of the present invention, generated function is not
When range beyond technical solution of the present invention, all belong to the scope of protection of the present invention.
Claims (7)
1. a kind of based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm, it is characterised in that:Include the following steps:
Step S0:There is provided one finishing prebrowsing system comprising scan module, logging modle, computing module, import model module,
Mapping block and display module;
Step S1:The space vector information in 8 corners to needing room to be simulated is completed by scan module collaboration logging modle
Staking-out work, record gyroscope parameters simultaneously calculate space vector data as output parameter;
Step S2:Intelligent algorithm is called by the core of computing module, receives the output parameter of step S1, operation obtains and cube
The room and user's height unit length data of room equal proportion are as output parameter;
Step S3:3D engines are called by importing model module, receive the output parameter of step S2, dynamic creation goes out the 3D moulds in room
Type.
2. according to claim 1 based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm, it is characterised in that:Step
The artificial scaling method of scan module is as follows in rapid S1:
It stands in the room center, after mobile device camera to be aligned to the corner vertex position per sidewalls, carries out artificial
Touch screen clicks the spatial attitude information at the calibration moment of calibration record mobile device;Due to local coordinate corresponding with mobile phone posture
System is to change at any time, and the world coordinate system that 3D engines need then is defined as the wink of the cell phone apparatus in system initialization gyroscope
Between posture local coordinate system be world coordinate system q (t);
The mathematic(al) representation of world coordinate system q (t) is as follows:
Wherein, α is mathematic sign of the gyroscope expression around x-axis rotation angle roll, and β is that gyroscope is indicated around y-axis rotation angle
The mathematic sign of yaw, γ indicate the mathematic sign around z-axis rotation angle pitch for gyroscope, and w is inertia weight, then when arbitrary
The mathematical expression for carving spin matrix Rs (t) of the t on the basis of world coordinate system is as follows:
The spin matrix for defining gyroscope initialization moment is R (t=0), then α, β, γ number of gyroscope are recorded at the t=0 moment
Value, can be obtained the numerical value of (0) spin matrix R, then the mathematical expression of world coordinate system is as follows:
3. according to claim 2 based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm, it is characterised in that:Note
It is as follows to record module resolving corner vector approach:If using cube room particle center as the origin position of three-dimensional system of coordinate
It sets, then this origin position is user's the location of eyes in a room;The corner D coordinates value on so eight vertex
It is the unit value that the vector length in eight corners is 1;Eight vertex are respectively defined as:V1、V2、V3、V4、V5、V6、V7、V8, often
A vertex vector is all by V(x,y,z)Form determine;
Define Length (V1)=Length (V2)=Length (V5)=Length (V6)=1, after defining 1 length of unit,
It is re-introduced into a variable λ and makes Length (V3)=λ Length (V1)=λ, to it is concluded that Length (V3)=Length
(V4)=Length (V7)=Length (V8)=λ;Vector length is indicated by unit 1 or variable λ;Assuming that V1-V8Measurement visitor
It is accurate in sight, obtains the real number value of variable λ to get to the vertex point coordinate information in cube room;
Wherein V1-V8The real number value of component x, y of each dimension in vector and the practical length and width in room are the numerical value of equal proportion
Relationship, ratio real number value are set as zoom factor k, and zoom factor k computational methods are as follows:
Wherein Width, Lengthth, Height indicate that room width, BodyHeight are user's height respectively.
4. according to claim 1 based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm, it is characterised in that:Step
The intelligent algorithm called in rapid S2 is improved particle swarm optimization algorithm, is as follows:
Step 1:Determine optimization aim solution space dimension, population scale, algorithm control iterations, initialization algorithm it is each
Item parameter, initializes the initial position of each particle and initial velocity in population with random number;
Step 2:Calculate each particle current location X in populationiAdaptive value;
Step 3:Individual fitness is compared with other individual fitnesses all in population, preferentially obtains current iteration meter
The best adaptive value P of population in calculation;
Step 4:The global optimal adaptation value that the optimal adaptation value P that population current iteration is calculated is obtained with all previous experience of population
It is compared, obtains newer global optimal adaptation value G;
Step 5:Using particle position in standard particle group's algorithm and its more new formula of iterative calculation to each particle of population
Speed and position calculated, and the data information of the position of more new particle, speed;
Step 6:Judge whether particle has completed search and arrived at global optimum position;If being unsatisfactory for condition, return to step 2
Carry out the iterative calculation of a new round;
Step 7:Setting mark carries out random initializtion to particle position, cancels cognition item parameter and flying speed vector ginseng
Number;
Step 8:Using the initial position of each particle and the initialization formula of initial velocity, to represent particle position it is four-dimensional to
It measures all directions to be pre-processed, calculates the directive optimal adaptation value of institute, the corresponding direction of optimal adaptation value flies as particle
Line direction;
Step 9:Judge whether particle optimum position breaks through global optimal adaptation value, the mark that cancellation step 7 is arranged if breaking through
Will restores the cognition item parameter and flying speed vector parameter of all particles, jumps to the iteration meter that step 2 carries out a new round
It calculates;
Step 10:Judge whether to meet termination condition, if iterated to calculate and reached preset maximum iteration, if not
Meet termination condition, then return to step 8 carries out the iterative calculation of a new round;
Step 11:Terminate algorithm.
5. according to claim 4 based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm, it is characterised in that:Often
It is as follows that the initial position and initial velocity of a particle carry out initial method:
α=c × rand (0,1)
X′3={ w × X3+α,w×X3-α,w×X3+α,w×X3+α}
X′4={ w × X4-α,w×X4-α,w×X4+α,w×X4+α}
X′5={ w × X5+α,w×X5+α,w×X5-α,w×X5+α}
X′6={ w × X6-α,w×X6+α,w×X6-α,w×X6+α}
X′7={ w × X7+α,w×X7-α,w×X7-α,w×X7+α}
X′8={ w × X8-α,w×X8-α,w×X8-α,w×X8+α}
X′9={ w × X9+α,w×X9+α,w×X9+α,w×X9-α}
X′10={ w × X10-α,w×X10+α,w×X10+α,w×X10-α}
X′11={ w × X11+α,w×X11-α,w×X11+α,w×X11-α}
X′12={ w × X12-α,w×X12-α,w×X12+α,w×X12-α}
X′13={ w × X13+α,w×X13+α,w×X13-α,w×X13-α}
X′14={ w × X14-α,w×X14+α,w×X14-α,w×X14-α}
X′15={ w × X15-α,w×X15-α,w×X15-α,w×X15-α}
Wherein c is the cognition item Studying factors of particle;W is inertia weight;Xi' be each particle initial position;α is random dry
Disturb the factor;
Judge particle whether completed search arrive at global optimum position standard it is as follows:
|V1|<0.000001AND|V2|<0.000001 AND|V3|<0.000001AND|V4|<0.00000001
Fitness fitness computational methods are as follows:
Wherein, DetaOffsetiIndicate the length value of vector difference;
The length value DetaOffset of vector differenceiComputational methods are as follows:
Wherein, ViIndicate 8 vectors of calibration, VxiIndicate 8 vectors that may be solved, ViAnd VxiCorresponding value is all by vector
The value obtained after unitization;The mathematic(al) representation of x, y, z is as follows:
X=Width ÷ 2
Y=Length ÷ 2
zup=Height-BodyHeight
zdown=BodyHeight
Wherein Width is expressed as the width in room, and Length is expressed as the length in room, and Height is expressed as the height in room,
BodyHeight is user's height;
8 vector V of calibrationiMathematic(al) representation it is as follows:
V1={-x, y, zup},V2={ x, y, zup}
V3={-x, y ,-zdown},V4={ x, y ,-zdown}
V5={ x ,-y, zup},V6={-x ,-y, zup}
V7={ x ,-y ,-zdown},V8={-x ,-y ,-zdown}
Wherein, zupIndicate the difference in height of room height and user's height, zdownIndicate user's height.
The unitization computational methods of vector are as follows:
unitVectori={ Vi.x÷Length,Vi.y÷Length,Vi.z÷Length}
Wherein, unitVectoriVector after indicating unitization, Vi indicate the coordinate information on i-th of room of cube vertex;
Particle position and its more new formula of iterative calculation are as follows in standard particle group's algorithm:
V′i=w × Vi+c1×r1×(P-Xi)+c2×r2×(G-Xi)
X '=X+V '
Wherein, Vi indicates the speed of particle flight;Vi ' indicates the renewal speed of particle;X indicates the script position of particle;X ' tables
Show the update position of particle;W is inertia weight;Random number r1、r2∈(0,1);c1、c2For Studying factors.
6. according to claim 5 based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm, it is characterised in that:No
It is different with the formula of its vectorial unitization selection of position, it is since the factor of the height gap of user determines there is lambda coefficient
's;When user's height is exactly equal to room height half, λ is equal to 1.
7. according to claim 6 based on the dynamic 3D Real-time modeling set methods for improving particle cluster algorithm, it is characterised in that:Grain
The cognition item Studying factors c values of son are 3;Inertia weight w values are 0.8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810489957.5A CN108765556B (en) | 2018-05-21 | 2018-05-21 | Dynamic 3D real-time modeling method based on improved particle swarm optimization |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810489957.5A CN108765556B (en) | 2018-05-21 | 2018-05-21 | Dynamic 3D real-time modeling method based on improved particle swarm optimization |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108765556A true CN108765556A (en) | 2018-11-06 |
CN108765556B CN108765556B (en) | 2022-05-06 |
Family
ID=64007411
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810489957.5A Active CN108765556B (en) | 2018-05-21 | 2018-05-21 | Dynamic 3D real-time modeling method based on improved particle swarm optimization |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108765556B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114491772A (en) * | 2022-03-23 | 2022-05-13 | 清华大学 | Household layout generation method and device |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100245351A1 (en) * | 2009-03-27 | 2010-09-30 | Eric Sellem | Computer aided design method and system for modular layouts |
CN102495932A (en) * | 2011-12-13 | 2012-06-13 | 哈尔滨工业大学 | Finite element model updating method based on response surface modeling and improved particle swarm algorithm |
US20150161818A1 (en) * | 2012-07-30 | 2015-06-11 | Zinemath Zrt. | System And Method For Generating A Dynamic Three-Dimensional Model |
CN105389854A (en) * | 2015-11-06 | 2016-03-09 | 福建天晴数码有限公司 | Decoration effect displaying method and system of cubic room |
CN105787996A (en) * | 2016-02-25 | 2016-07-20 | 上海斐讯数据通信技术有限公司 | House stereogram generation method and system based on mobile terminal |
CN107194984A (en) * | 2016-03-14 | 2017-09-22 | 武汉小狮科技有限公司 | Mobile terminal real-time high-precision three-dimensional modeling method |
-
2018
- 2018-05-21 CN CN201810489957.5A patent/CN108765556B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100245351A1 (en) * | 2009-03-27 | 2010-09-30 | Eric Sellem | Computer aided design method and system for modular layouts |
CN102495932A (en) * | 2011-12-13 | 2012-06-13 | 哈尔滨工业大学 | Finite element model updating method based on response surface modeling and improved particle swarm algorithm |
US20150161818A1 (en) * | 2012-07-30 | 2015-06-11 | Zinemath Zrt. | System And Method For Generating A Dynamic Three-Dimensional Model |
CN105389854A (en) * | 2015-11-06 | 2016-03-09 | 福建天晴数码有限公司 | Decoration effect displaying method and system of cubic room |
CN105787996A (en) * | 2016-02-25 | 2016-07-20 | 上海斐讯数据通信技术有限公司 | House stereogram generation method and system based on mobile terminal |
CN107194984A (en) * | 2016-03-14 | 2017-09-22 | 武汉小狮科技有限公司 | Mobile terminal real-time high-precision three-dimensional modeling method |
Non-Patent Citations (4)
Title |
---|
CLERC M ET AL.: "The particle swarm-explosion, stability, and convergence in a multidimensional complex space", 《IEEE》 * |
GUEDRIA N B ET AL.: "Improved accelerated PSO algorithm for mechanical engineering optimization problems", 《APPLIED SOFT COMPUTING》 * |
唐祎玲 等: "最优粒子增强探索粒子群算法", 《计算机工程与应用》 * |
张楠 等: "基于分组混沌PSO算法的模糊神经网络建模研究", 《计算机工程与应用》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114491772A (en) * | 2022-03-23 | 2022-05-13 | 清华大学 | Household layout generation method and device |
CN114491772B (en) * | 2022-03-23 | 2022-09-13 | 清华大学 | Household layout generation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108765556B (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102999942B (en) | Three-dimensional face reconstruction method | |
Lippiello et al. | Visual grasp planning for unknown objects using a multifingered robotic hand | |
CN109840940B (en) | Dynamic three-dimensional reconstruction method, device, equipment, medium and system | |
CN109712172A (en) | A kind of pose measuring method of initial pose measurement combining target tracking | |
CN111968165B (en) | Dynamic human body three-dimensional model complement method, device, equipment and medium | |
CN106157367B (en) | Method for reconstructing three-dimensional scene and equipment | |
CN110189399A (en) | A kind of method and system that interior three-dimensional layout rebuilds | |
CN101246601A (en) | Three-dimensional virtual human body movement generation method based on key frame and space-time restriction | |
CN107452056B (en) | Augmented reality teaching system and control method thereof | |
CN108154104A (en) | A kind of estimation method of human posture based on depth image super-pixel union feature | |
CN110276804B (en) | Data processing method and device | |
CN110458924A (en) | A kind of three-dimensional facial model method for building up, device and electronic equipment | |
CN110243390A (en) | The determination method, apparatus and odometer of pose | |
CN105069829B (en) | A kind of human body animation generation method based on more visually frequencies | |
CN116309879A (en) | Robot-assisted multi-view three-dimensional scanning measurement method | |
CN108765556A (en) | A kind of dynamic 3D Real-time modeling set methods based on improvement particle cluster algorithm | |
CN108734148A (en) | A kind of public arena image information collecting unmanned aerial vehicle control system based on cloud computing | |
CN109238264A (en) | A kind of domestic animal posture method for normalizing and device | |
CN112891954A (en) | Virtual object simulation method and device, storage medium and computer equipment | |
CN107895398B (en) | Relief editing method combined with visual saliency | |
CN106909730B (en) | Building three-dimensional model simulation method and system based on homotopy mapping algorithm | |
CN105184803A (en) | Attitude measurement method and device | |
CN110008873A (en) | Facial expression method for catching, system and equipment | |
CN115546408A (en) | Model simplifying method and device, storage medium, electronic equipment and product | |
CN108154557A (en) | A kind of tri patch method in the mute region based on domestic environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |