CN110335275B - Fluid surface space-time vectorization method based on three-variable double harmonic and B spline - Google Patents
Fluid surface space-time vectorization method based on three-variable double harmonic and B spline Download PDFInfo
- Publication number
- CN110335275B CN110335275B CN201910429587.0A CN201910429587A CN110335275B CN 110335275 B CN110335275 B CN 110335275B CN 201910429587 A CN201910429587 A CN 201910429587A CN 110335275 B CN110335275 B CN 110335275B
- Authority
- CN
- China
- Prior art keywords
- fluid
- equation
- spline
- field
- dimensional
- 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.)
- Active
Links
- 239000012530 fluid Substances 0.000 title claims abstract description 169
- 238000000034 method Methods 0.000 title claims abstract description 74
- 239000002245 particle Substances 0.000 claims abstract description 21
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 17
- 238000009877 rendering Methods 0.000 claims abstract description 9
- 230000009467 reduction Effects 0.000 claims abstract description 7
- 238000004458 analytical method Methods 0.000 claims description 20
- 230000011218 segmentation Effects 0.000 claims description 15
- 238000005457 optimization Methods 0.000 claims description 12
- 239000013598 vector Substances 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 11
- 238000009499 grossing Methods 0.000 claims description 10
- 230000002159 abnormal effect Effects 0.000 claims description 4
- 238000001914 filtration Methods 0.000 claims description 4
- 230000005855 radiation Effects 0.000 claims description 4
- 238000013507 mapping Methods 0.000 claims description 3
- 239000000758 substrate Substances 0.000 claims description 2
- 238000004088 simulation Methods 0.000 abstract description 30
- 238000010586 diagram Methods 0.000 description 8
- 238000007493 shaping process Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000011161 development Methods 0.000 description 4
- 230000018109 developmental process Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000011160 research Methods 0.000 description 4
- 238000004613 tight binding model Methods 0.000 description 4
- 230000000007 visual effect Effects 0.000 description 4
- 230000006399 behavior Effects 0.000 description 3
- 238000000605 extraction Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011946 reduction process Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- HPTJABJPZMULFH-UHFFFAOYSA-N 12-[(Cyclohexylcarbamoyl)amino]dodecanoic acid Chemical compound OC(=O)CCCCCCCCCCCNC(=O)NC1CCCCC1 HPTJABJPZMULFH-UHFFFAOYSA-N 0.000 description 1
- 238000006424 Flood reaction Methods 0.000 description 1
- 238000002940 Newton-Raphson method Methods 0.000 description 1
- 230000000740 bleeding effect Effects 0.000 description 1
- 230000017531 blood circulation Effects 0.000 description 1
- 210000004204 blood vessel Anatomy 0.000 description 1
- 238000009835 boiling Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000009189 diving Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 238000007667 floating Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004807 localization Effects 0.000 description 1
- 238000010428 oil painting Methods 0.000 description 1
- 238000005293 physical law Methods 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
- 238000010223 real-time analysis Methods 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computer Graphics (AREA)
- Processing Or Creating Images (AREA)
- Image Generation (AREA)
Abstract
The invention provides a fluid surface space-time vectorization method based on three-variable double harmonic and B spline, which comprises the following steps: fluid video height field restoration based on SFS; fluid velocity field reduction based on shallow water equation; fitting data based on a three-variable double-harmonic B spline; three-dimensional fluid rendering based on particle representations. According to the method, only monocular fluid videos are used as input, the geometric and speed information of the fluid in the videos is automatically analyzed, the continuity of the geometric and speed of the surface of the fluid on the time and space dimensions is realized by using a three-variable bi-harmonic B spline, and the super-resolution reduction of the surface of the fluid on the time and space dimensions is realized by using a continuity result; in addition, the invention realizes the re-simulation of the fluid based on the particles, restores the fluid video into the three-dimensional fluid, and further proves the possibility of realizing the video fluid motion characteristic driven physical simulation.
Description
Technical Field
The invention relates to the technical field of computer vision, computer calculation geometry and fluid simulation.
Background
In recent years, with the rapid development of the field of virtual reality, the simulation demand for complex objects and large-scale scenes in a natural environment is increasing. In many natural scenes, fluid and fluid-like behaviors are one of the ubiquitous phenomena, such as large-scale scenes of sea waves, rivers, waterfalls, floods, floating clouds, haze, smog, fires and the like, and small-scale scenes of dew, water drops, bubbles, boiling water, oil stains, watercolors, oil paintings, burning, blood flow and the like, and all fluids or fluid-like behaviors participate in the scenes, and the scenes show gorgeous and changeable visual effects. Therefore, modeling and simulation of fluid and fluid-like behavior are receiving attention of a great number of excellent researchers, and are becoming one of the important directions in the field of virtual reality.
In addition, with the wide application of the fluid simulation technology in the aspects of movie and television production, 3D game production, natural phenomenon display, medical operation teaching (blood vessel simulation interaction, bleeding phenomenon, etc.), and the like, considering the limitations of the computing power of a computer and the scene modeling and production cost, how to improve the simulation efficiency on the premise of ensuring the correctness of the fluid physical law as much as possible, how to ensure the high visual fidelity of the whole and details of the fluid scene, becomes a technical problem which needs to be solved urgently, and further promotes the development of the fluid simulation technology.
In the Computer industry, research on Fluid simulation technology is mainly divided into two directions, computational Fluid Dynamics (CFD) and graphical Fluid simulation (Fluid Animation). The fluid modeling and model solving method is mainly used for solving the problems of fluid modeling and model solving under high-precision simulation requirements of high-precision simulation environments such as fluid related scenes in the industry. Thereafter, with the progress of computer graphics technology and the improvement of computer imaging effect, the graphics fluid simulation aiming at pursuing the visual fidelity of simulation effect enters a rapid development stage. In 1996, the method realizes the graphic fluid simulation based on the Navier-Stokes equation for the first time, and the fluid simulation method which does not require the accurate solution of the fluid dynamics equation but can ensure the visual vivid effect meets the development requirements of entertainment industries such as movie and television, game production and the like and also meets the teaching simulation requirements in the medical field.
Despite having a history of over twenty years, fluid simulation remains a challenging computer graphics problem, caused by the complexity of fluid phenomena. Although the basic simulation method can better simulate simpler natural phenomena, the existing method cannot accurately describe complex natural phenomena existing in the nature and the accurate simulation of large-scale fluid scenes. Because the simple physical modeling is difficult to meet the simulation requirement, a large number of scholars introduce a data-driven method into the fluid simulation technology, and hope that the fluid simulation is driven to be performed by the motion state of the real fluid. However, since the fluid has no fixed geometric structure, the acquisition and analysis of fluid data become a new difficulty in the data-driven thinking.
Aiming at the large demands of scientific research and entertainment markets, the method has important significance and value for the research of high-precision and high-efficiency fluid modeling and simulation methods, and the research results of the method can be widely applied to actual life.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention discloses a space-time vectorization method of a fluid surface based on a three-variable double-harmonic B spline.
In order to achieve the purpose of the invention, the technical scheme adopted by the invention is as follows: a space-time vectorization method of a fluid surface based on three-variable double harmony B spline comprises the following specific steps:
a space-time vectorization method of a fluid surface based on three-variable double harmonic and B-spline comprises the following steps:
(1) SFS-based fluid video height field restoration: reconstructing a fluid surface height field by using a Shape From shaping method, denoising the height field by using a Gaussian Filter and a Guided Filter in an iteration process, performing smooth optimization of a reserved boundary, and restoring the geometric Shape of the fluid surface;
(2) Fluid velocity field reduction based on shallow water equation: establishing an optimization equation of the correlation between the fluid height field and the velocity field by using a shallow water equation and a smoothing term, and solving the optimization to obtain the velocity field of the fluid surface on the horizontal plane;
(3) Fitting data based on a three-variable double harmonic B spline: the height field information and the speed field information of the fluid surface are regarded as three-dimensional volume data, voxel segmentation is carried out, a Knot point is selected by utilizing a segmentation result, a three-variable double harmonic B spline substrate is constructed, vectorization is carried out on the fluid surface information, and mapping from space-time discrete data to continuous data is realized;
(4) Three-dimensional fluid rendering based on particle representation: the particles are used for representing basic units of the fluid, three-dimensional fluid is constructed by utilizing the continuous result, and the motion of the fluid is reproduced.
Further, in the step (1), a Shape From shaping method is used, iterative analysis is carried out on the height field of each frame of the fluid video based on iterative fitting of an image radiation equation, a method combining Gaussian Filter and Guided Filter is used, in each iterative step, filtering and denoising are carried out on the height field obtained through analysis, and noise points and abnormal values in the analysis result are removed.
Further, in the step (2), a shallow water equation is used as a basic physical model, a description equation of the relationship between the fluid height field and the velocity field is obtained through analysis, a smoothing term with weight is added on the basis of the description equation, a minimized objective function is constructed, an Euler-Lagrangian equation of the objective function is solved, the minimization of the objective function is realized through an iterative solution method, and the fluid surface height information obtained through analysis in the step (1) is used, so that the two-dimensional velocity field information of the fluid surface can be obtained.
Further, in the step (3), the velocity field information of the fluid is regarded as three-dimensional volume data with horizontal and vertical coordinates of a video frame as x and y axes and time as z axis, the volume data is subjected to voxel segmentation, an average vector of velocity vectors in voxels is calculated, the center of the voxels is translated to the origin of coordinates, several sets of bivariate and B-sample strip bases are calculated and obtained, the velocity data in each voxel is fitted, a fitting coefficient vector set is obtained, and vectorization of the fluid surface information is realized.
Further, in step (4), the elementary cells of the fluid are represented using particles.
Further, in the step (1), the Guided Filter for the purpose of denoising and establishing a better iteration basis is used in the first few steps of iteration process, the Gaussian Filter for the purpose of denoising and smoothing is used in the second few steps of iteration process, and the number of times of using the Guided Filter and the Gaussian Filter can be determined by the user.
Compared with the prior art, the invention has the advantages and positive effects that:
1. the method analyzes the fluid height field in the monocular fluid video by a Shape From shaping method, and optimizes the extraction process of the height field by using Gaussian Filter and Guided Filter. Meanwhile, the invention realizes algorithm optimization based on CUDA, and realizes real-time analysis of the height field of the video fluid by using the GPU.
2. According to the invention, through a shallow water equation and an Euler-Lagrange equation, fluid surface velocity field analysis based on a fluid height field is realized, and the overall description of fluid surface motion is realized;
3. the invention realizes the continuous representation of the fluid motion evolution in the time-space direction by taking the fluid motion information acquired based on the video as the discrete sampling of the fluid evolution process and fitting the discrete data by using the three-variable double harmonic and the B spline.
4. The method realizes the reuse of data based on the fluid vectorization result, and constructs a three-dimensional fluid scene corresponding to the fluid video.
Drawings
FIG. 1 is a flow chart of the method of the present invention for spatiotemporal vectorization of a fluid surface based on three-variable bi-harmonic and B-spline;
FIG. 2 is a graph of the fluid video height field restoration result based on SFS and different filter denoising in the present invention;
FIG. 3 is a time statistical graph of different iteration times in the SFS-based fluid video height field reduction process and the shallow water equation-based fluid velocity field reduction process of the present invention;
FIG. 4 is a schematic diagram of the results of a data fitting based on biharmonic B-splines for three variables according to the present invention;
FIG. 5 is a schematic diagram of particle initialization for a particle representation-based three-dimensional fluid reconstruction method of the present invention;
FIG. 6 is a schematic of the time derivative between adjacent frames before and after a data fit based on biharmonic B-splines of the present invention;
FIG. 7 is a spatiotemporal superpixelization result of the inventive data fitting based on the trivariate biharmonic B-spline;
FIG. 8 is a spatial superpixelization result of the inventive data fitting based on the trivariate biharmonic B-spline;
FIG. 9 is a three-dimensional fluid rendered rendering based on a particle representation (a microwaviness scene) of the present invention;
fig. 10 is a rendering (sea wave scene) of a three-dimensional fluid reconstruction based on particle representation according to the present invention.
Detailed Description
The invention provides a fluid surface space-time vectorization method based on three-variable double harmonic and B spline, which comprises the following steps: inputting a fluid sample video, reconstructing a fluid surface height field, and restoring the fluid geometric shape; fitting the surface velocity field of the fluid by using a diving equation and smoothness constraint; regarding the geometric and speed information of the fluid surface as space-time three-dimensional volume data, using a three-variable double harmonic and a B spline as a space-time base, respectively fitting the geometric and speed data of the fluid, and realizing the mapping from a discrete space to a continuous space; and based on the space-time continuous result, the particles are used as basic units of the fluid, the motion of the fluid is reproduced, the surface of the fluid is extracted and rendered, and a fluid simulation result similar to the motion mode of the fluid in the input video is obtained.
The principles of the present invention are described below in conjunction with specific method steps.
The method comprises the following steps: SFS-based fluid video height field restoration: ocean videos in a DynTex database are used as a fluid video source, and the height field of each frame of the fluid videos is subjected to iterative analysis based on iterative fitting of an image radiation equation by using a Shape From shaping method. And (3) using a method of combining Gaussian Filter and Guided Filter, and in each iteration step, carrying out filtering and denoising on the height field obtained by analysis, and removing noise points and abnormal values in the analysis result. The fluid height field analysis based on Shape From shaping is realized through iteration, a Guided Filter aiming at denoising and establishing a better iteration basis is used in the previous steps of iteration processes, a Gaussian Filter aiming at denoising and smoothing is used in the later steps of iteration processes, and the use times of the Guided Filter and the Gaussian Filter can be determined by a user.
Step two: fluid velocity field reduction based on shallow water equation: the method comprises the steps of analyzing and obtaining a description Equation of the relationship between a fluid height field and a fluid velocity field by taking a shallow water Equation as a basic physical model, adding a smoothing term with weight on the basis of the Equation, constructing a minimized objective function, solving an Euler-Lagrangian Equation of the objective function, realizing the minimization of the objective function by using an iterative solution method, and obtaining two-dimensional velocity field information of the fluid surface. The shallow water equation is a two-dimensional approximate form of a three-dimensional N-S equation describing fluid motion, and the Euler-Lagrange equation is a solution method for classical energy minimization in a variation method.
Step three: fitting data based on a three-variable double harmonic B spline: the velocity field information of the fluid can be regarded as three-dimensional volume data with x and y axes of horizontal and vertical coordinates of a video frame and z axis of time, the volume data is subjected to superpixel segmentation, an average vector of velocity vectors in the superpixel is calculated, and the center of the superpixel is translated to a coordinate origin. And calculating to obtain a plurality of groups of three-variable double-harmonic B sample strip bases, and fitting the speed data in each super voxel to obtain a fitting coefficient vector group. The three-variable double-harmonic B spline is a base of a group of three-dimensional spaces, has a localization characteristic, can realize unit decomposition, and has certain robustness and stability.
Step four: three-dimensional fluid rendering based on particle representation: the particles are used for representing basic units of the fluid, three-dimensional fluid is constructed by utilizing the continuous result, and the motion of the fluid is reproduced.
According to the method, only monocular fluid videos are used as input, the geometric and speed information of the fluid in the videos is automatically analyzed, the continuity of the geometric and speed of the surface of the fluid on the time and space dimensions is realized by using a three-variable bi-harmonic B spline, and the super-resolution reduction of the surface of the fluid on the time and space dimensions is realized by using a continuity result; in addition, the invention realizes the re-simulation of the fluid based on the particles, restores the fluid video into the three-dimensional fluid, and further proves the possibility of realizing the video fluid motion characteristic driven physical simulation.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the method of the present invention is explained in detail below with reference to the accompanying drawings. It should be understood that the specific examples described herein are intended only to illustrate the invention and are not intended to limit the invention.
The invention provides a framework, which extracts height information and speed information of fluid through analysis of a fluid video, classifies and simplifies the fluid information through methods such as clustering and data fitting, and realizes reconstruction and simulation of a fluid three-dimensional scene by taking the fluid information as a drive.
The invention provides a space-time vectorization method of a fluid surface based on three-variable double harmony B spline, which is shown by referring to an overall method flow chart of a figure 1, and has the following specific implementation mode:
the method comprises the following steps: SFS-based fluid video height field restoration:
the essence of the Shape From shaping method is to establish the relationship between the brightness value of the image and the height value of the position according to the radiance equation (formula (1)) of the image, and then calculate the height value of each pixel position by the brightness value of the image. In equation (1), R (n (x)) = ω · n (x) denotes a radiation equation, ω is an incident illumination direction, n (x) denotes a surface normal, the calculation method is as shown in equation (3-2), and p (x) and q (x) denote spatial derivatives of the height field in x and y directions, respectively.
R(n(x))=I(x) (1)
With reference to the method of directly fitting the radiometric equation proposed by Tsai and Shah, the spatial derivatives p (x) and q (x) of the height field in the x and y directions are approximately calculated using the finite difference method, and therefore, if the terms of the radiometric equation in equation (1) are written in the form of arguments of p (x) and q (x), equation (3) can be obtained. Where the lower subscript i, j indicates that the position coordinates of the corresponding physical quantity in the image are (i, j).
r(p i,j ,q i,j )=r(u i,j -u i-1,j ,u i,j -u i,j-1 )=I i,j (3)
In this section, u represents the height field, u i,j Height value of (i, j) position is expressed byRepresents the evaluation value of the height field before the start of the current iteration in->Representing the analysis value (more accurate analysis value) for the height field after the current iteration step calculation. The formula (3) is a one-dimensional nonlinear equation, and an iterative function (shown in formula (4)) of the formula (3) can be constructed by using a Newton-Raphson Method idea to realize the height field u i,j And (4) solving.
Wherein, adding corner marks to the function fThe argument representing f is incremented by the corresponding corner mark, i.e.:it should be noted, however, that equation (4) is not an iterative function given by the strict newton iteration method, since u i-1,j And u i,j-1 The formula (4) is obtained only by using the solving idea and solving form of the newton iteration method, and there is no general proof whether the iterative solution is strictly converged at present. Writing the iterative function (i.e., equation (4)) to the iterative equation shown, the following equation (5)) can be obtained:
since there is no universal proof to guarantee the convergence of equation (5), tsai and Shah et al propose an improved iterative equation form as shown in equation (6) below. In the formulaShould satisfy at->A non-zero time close to the original value, otherwise 0, and therefore an auxiliary quantity is used>Will be/are>Expressed as shown in formula (3-7), wherein W is 0.01 to ensure that denominator is not 0 and auxiliary amount->The iterative calculation method of (2) is shown in the formula (3-8).
From the above analysis, an iterative calculation algorithm for the height field can be obtained, as shown below.
In order to eliminate the vertical translation of the height field of each frame of the video, after the fluid height field is calculated iteratively, the height value needs to be normalized, and the average value of the height field of each frame of the video is normalized to 0.
The experimental results of step one are shown in fig. 2. The figure uses a grayscale image and a 3D reconstructed scene to represent the height field of the fluid. The height field reconstruction process produces both cumulative and minor errors, as shown by the positions circled by the boxes in the non-Guided Filter and non-Guided Filter subgraphs in fig. 2. In order to eliminate obvious accumulative errors and tiny errors like noise points, a Guided Filter and a Gaussian Filter are adopted to optimize the result of each iteration. FIG. 2 shows the results of experiments optimized using Guided Filter and Gaussian Filter at different times. When the Guided Filter is not used, the accumulated error is difficult to be effectively eliminated, and when the Guided Filter is not used, the tiny error is difficult to be effectively eliminated.
The time statistics of step one are shown in fig. 3. The running time statistics of four scenarios (ripple, raindrop, waterfall, fountain scenarios) at different iteration numbers are given in the figure. As can be seen from the figure, the method proposed in step one can implement real-time operation.
Step two: fluid velocity field reduction based on shallow water equation;
in order to obtain the velocity field capable of driving the surface of the fluid to move, a model fitting method is adopted, and the velocity field is reduced by utilizing a shallow water equation according to the height field.
In the basic equation set of the shallow water equation, an equation capable of reflecting the relationship between the height field and the velocity field is shown in equation (9). Where z represents the height field and u = (u, v) the unknown velocity field.
Equation (9) is expanded to a more general form as shown in equation (10).
z t +z x u+z y v+z(u x +v y )=0 (10)
The physical meaning of the formula is intuitively understood, and the evolution z of the fluid surface height field along with time t Modeling can be done by two sub-terms, first, the height field is updated under advection of the velocity field on the horizontal plane (surface perpendicular to the height field direction), from the sub-term- (z) x u+z y v) expression; secondly, the change in the height field is proportional to the change in the two-dimensional divergence field of the velocity field, as represented by the sub-term-z (u) x +v y ) And (4) expressing.
In addition to the physical control terms, in order to ensure the smoothness of the acquired velocity field, a smoothing term should be added to the optimization objective functionAnd (4) obtaining the expected speed field extraction effect by adjusting the full weight of the smoothing term. In summary, the optimization objective function has the form shown in equation (11).
The optimization of the formula (11) can be realized by solving the euler-lagrange equation corresponding to the optimization equation. The Euler-Lagrange equation can be expressed by a linear system as follows: a. The u B T =C u ,A v B T =C v Where B = (u, v), representing the velocity field to be solved, A u And A v Is shown in the formulas (12) and (13), C u And C v . The developed form of (c) is shown in equations (14) and (15); let w = { u, v },and &>The mean values of w in the x and y directions at (x, y) are expressed, respectively, and the calculation formulas thereof are shown in formulas (15) and (16).
By the formulaCan be got and/or judged>Accordingly, the true solution is gradually approximated using an iterative method, resulting in the following iterative equations (3-17) and (3-18)):
by utilizing the iterative formula, the fluid surface velocity field can be fitted according to the fluid surface height field, and meanwhile, an abnormal value and a noise point in the fitting result are removed by using a high-speed filtering method.
The statistical results of the experiment time in step two are shown in fig. 3. The running time statistics of four scenarios (ripple, raindrop, waterfall, fountain scenarios) at different iteration numbers are given in the figure. As can be seen from the figure, the method provided by the step two can realize real-time operation.
Step three: fitting data based on a three-variable double-harmonic B spline;
first, the velocity field information of the fluid can be regarded as three-dimensional volume data with x and y axes as horizontal and vertical coordinates of a video frame and z axis as time, and the data of each (x, y, t) position should be a two-dimensional vector (u, v). And performing super voxel segmentation on the speed field volume data by referring to an image super pixel segmentation algorithm based on linear iterative clustering.
A traditional image superpixel segmentation algorithm based on linear iterative clustering measures the distance between pixel points by using Euclidean distance on a five-dimensional space formed by Lab color space coordinates and two-dimensional coordinates. Similarly, this document uses a five-dimensional space composed of a velocity field and three-dimensional positionsEach voxel point is characterized as shown in equation (19). Use>Euclidean distance above to measure the distance between voxels, distance D s Can be obtained by the formula (20). Where m is used to control the compactness of the voxel (the larger m, the more compact the voxel), and/or>Represents the grid spacing of the voxels, where N represents the total number of voxel points and K represents the approximate number of voxels.
The expected result of the current step is a segmented superpixel result, the visualization of which is roughly similar to that of a two-dimensional image superpixel segmentation except that the superpixel segmentation corresponds to three-dimensional voxel data and the superpixel segmentation corresponds to two-dimensional pixel data.
And after the hyper-voxel segmentation is finished, selecting a Knot point according to the position of the hyper-voxel. In each hyper-voxel, selecting M fixed Knot points by using a random sampling method, if K represents the number of the hyper-voxels, totally obtaining K.M Knot points in the whole view, and if K represents the number of the hyper-voxels, obtaining K.M fixed Knot points in the whole viewRepresenting a set of Knot points, i.e. having >>
And calculating the three-variable double-harmonic B spline basis functions at the positions of all the Knot points. The discrete form of the bi-harmonic B-spline basis function is shown in equation (21), where p (x) represents the green function, the basis function is composed of a weighted combination of the green functions at the Knot point, the coefficients are solved as shown in equations (3-22), and each column of H is the coefficient of the green function.
In the formula (22), the first and second groups,represents a set of Knot points,. Sup.>A ring representing the jth Knot is adjacent to the Knot point (i.e., the immediately adjacent neighbor Knot), -or>Representing a set of green functions.
The velocity field values (u, v) are fitted using fixed M basis functions. Each voxel value is represented by a 2M-dimensional fitting vector, which is used to characterize the velocity field. Coefficient vector of ith pointCan be determined by the following optimization equation (23)), in which case>
The experimental results of step three are shown in fig. 4. The first column of fig. 4 is an example frame cut from the original input video. For each example frame, fig. 4 further shows the result of the height field reconstructed in step one, the grayscale diagram and the 3D reconstruction result diagram of the velocity field result reconstructed in step two, and the subsequent columns successively show the result of the voxel segmentation, the height based on the method in step three, and the reconstruction result of the velocity field (grayscale diagram, 3D diagram, and fitting residual diagram).
Before and after the fitting of the data based on the three-variable double harmonic B-spline, the time derivative between adjacent frames is as shown in FIG. 6, and as can be seen from the figure, discontinuous noise in time is eliminated to a certain extent by the fitting result; the space-time superpixelization result is shown in fig. 7, fig. 7 shows the superpixelization reconstruction result of time and space dimensions by taking a microwaviness as an example, the figures in the figure represent time derivative values between two adjacent frames, and the values reflect the height field and the velocity field of the reconstructed fluid which can be relatively continuous by the method in the step three; the spatial superpixelization result is shown in fig. 8, the resolution of the reconstructed image is listed right above the image, and the spatial superpixelization result shows that the method in step three can reconstruct a continuous fluid space on the premise of maintaining fluid details.
Step four: three-dimensional fluid rendering based on the particle representation;
in order to reuse the vectorized data of the fluid motion evolution process, the invention adopts the basic unit which uses the particles to represent the fluid to perform three-dimensional re-simulation on the fluid, wherein the super-resolution result of the vectorized fluid evolution result, namely the height field and the velocity field of the surface of the fluid, is used as the guide of the motion of the fluid particles. The particle initialization results of the three-dimensional fluid reconstruction method based on the particle representation are shown in fig. 5. Surface extraction is performed on the fluid motion result of each frame by using a Marching Cube algorithm, and fluid surface rendering is performed by using blend software, so as to obtain rendering result schematic diagrams shown in fig. 9 and 10 according to the invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the present invention in other forms, and any person skilled in the art may apply the above modifications or changes to the equivalent embodiments with equivalent changes, without departing from the technical spirit of the present invention, and any simple modification, equivalent change and change made to the above embodiments according to the technical spirit of the present invention still belong to the protection scope of the technical spirit of the present invention.
Claims (4)
1. A space-time vectorization method of a fluid surface based on three-variable double harmonic and B-spline is characterized by comprising the following steps:
(1) SFS-based fluid video height field restoration: reconstructing a fluid surface height field by using a ShapeFromShading method, denoising the height field by using a GaussianFilter and a GuidedFilter in an iteration process, performing smooth optimization of a reserved boundary, and restoring the geometric shape of the fluid surface;
(2) Fluid velocity field reduction based on shallow water equation: establishing an optimization equation of the correlation between the fluid height field and the velocity field by using a shallow water equation and a smoothing term, and solving the optimization to obtain the velocity field of the fluid surface on the horizontal plane;
(3) Fitting data based on a three-variable double harmonic B spline: taking the height field information and the speed field information of the fluid surface as three-dimensional volume data, performing voxel segmentation, selecting a Knot point by using a segmentation result, constructing a three-variable bi-harmonic B spline substrate, and vectorizing the fluid surface information to realize mapping from time-space discrete data to continuous data;
(4) Three-dimensional fluid rendering based on particle representation: using the particles to represent basic units of the fluid, constructing a three-dimensional fluid by using the serialization result, and reproducing the motion of the fluid;
in the step (1), performing iterative analysis on the height field of each frame of the fluid video based on iterative fitting of an image radiation equation by using a ShapeFromShading method; filtering and denoising the height field obtained by analysis in each iteration step by using a method of combining GaussianFilter and GuidedFilter, and removing noise points and abnormal values in the analysis result;
in the step (3), the velocity field information of the fluid is regarded as three-dimensional volume data with the horizontal and vertical coordinates of a video frame as x and y axes and time as z axis, the volume data is subjected to voxel segmentation, the average vector of velocity vectors in voxels is calculated, the center of voxels is translated to the origin of coordinates, a plurality of sets of three-variable biharmonic B sample bases are calculated and obtained, the velocity data in each voxel is fitted, a fitting coefficient vector set is obtained, and vectorization of the surface information of the fluid is realized.
2. The method of claim 1 for spatiotemporal vectorization of a fluid surface based on bivariate harmonics and B-splines, characterized in that: in the step (2), a shallow water equation is used as a basic physical model, a description equation of the relationship between the fluid height field and the fluid velocity field is obtained through analysis, a smoothing term with weight is added on the basis of the description equation, a minimized objective function is constructed, an Euler-Lagrangian equation of the objective function is solved, an iterative solution method is used for achieving minimization of the objective function, and the fluid surface height information obtained through analysis in the step (1) is used, so that the two-dimensional velocity field information of the fluid surface can be obtained.
3. The method of claim 1 for spatiotemporal vectorization of a fluid surface based on bivariate harmonics and B-splines, characterized in that: in step (4), the elementary cells of the fluid are represented using particles.
4. The method of claim 1 for spatiotemporal vectorization of a fluid surface based on bivariate harmonics and B-splines, characterized in that: in the step (1), the guidedFilter aiming at denoising and establishing a better iteration basis is used in the previous iteration process, the Gaussian Filter aiming at denoising and smoothing is used in the later iteration process, and the use times of the guidedFilter and the Gaussian Filter are determined by a user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910429587.0A CN110335275B (en) | 2019-05-22 | 2019-05-22 | Fluid surface space-time vectorization method based on three-variable double harmonic and B spline |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910429587.0A CN110335275B (en) | 2019-05-22 | 2019-05-22 | Fluid surface space-time vectorization method based on three-variable double harmonic and B spline |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110335275A CN110335275A (en) | 2019-10-15 |
CN110335275B true CN110335275B (en) | 2023-03-28 |
Family
ID=68139063
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910429587.0A Active CN110335275B (en) | 2019-05-22 | 2019-05-22 | Fluid surface space-time vectorization method based on three-variable double harmonic and B spline |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110335275B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112668474B (en) * | 2020-12-28 | 2023-10-13 | 北京字节跳动网络技术有限公司 | Plane generation method and device, storage medium and electronic equipment |
CN113808248B (en) * | 2021-03-10 | 2022-07-29 | 北京航空航天大学 | Three-dimensional fluid reverse modeling method based on physical perception |
CN113887419B (en) * | 2021-09-30 | 2023-05-12 | 四川大学 | Human behavior recognition method and system based on extracted video space-time information |
CN114662403A (en) * | 2022-04-07 | 2022-06-24 | 浙江大学 | Bivariate B-spline function earth surface sun shape model based on observation data |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103700136A (en) * | 2013-12-01 | 2014-04-02 | 北京航空航天大学 | Method for performing medical volume data vectorization through three-variable biharmonic B-spline function |
CN103700138A (en) * | 2013-11-27 | 2014-04-02 | 北京航空航天大学 | Sample data-based dynamic water surface reestablishing method |
CN103871096A (en) * | 2014-01-24 | 2014-06-18 | 华东师范大学 | Realistic fluid scene synthetic method in three-dimensional space |
CN103913774A (en) * | 2014-04-02 | 2014-07-09 | 西南石油大学 | Reservoir stratum geological mechanics parameter retrieval method based on micro seismic event |
CN106446425A (en) * | 2016-09-29 | 2017-02-22 | 华东师范大学 | Fluid-solid interaction simulation method based on video reconstruction and SPH model |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10502289B2 (en) * | 2015-06-27 | 2019-12-10 | Supra Lumina Technologies Inc. | Asymmetric toroidal transmission system |
-
2019
- 2019-05-22 CN CN201910429587.0A patent/CN110335275B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103700138A (en) * | 2013-11-27 | 2014-04-02 | 北京航空航天大学 | Sample data-based dynamic water surface reestablishing method |
CN103700136A (en) * | 2013-12-01 | 2014-04-02 | 北京航空航天大学 | Method for performing medical volume data vectorization through three-variable biharmonic B-spline function |
CN103871096A (en) * | 2014-01-24 | 2014-06-18 | 华东师范大学 | Realistic fluid scene synthetic method in three-dimensional space |
CN103913774A (en) * | 2014-04-02 | 2014-07-09 | 西南石油大学 | Reservoir stratum geological mechanics parameter retrieval method based on micro seismic event |
CN106446425A (en) * | 2016-09-29 | 2017-02-22 | 华东师范大学 | Fluid-solid interaction simulation method based on video reconstruction and SPH model |
Non-Patent Citations (1)
Title |
---|
基于视频的流体表面重建与流固耦合仿真;王超;《中国优秀硕士学位论文全文数据库信息科技辑》(第9期);正文第1-67页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110335275A (en) | 2019-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110335275B (en) | Fluid surface space-time vectorization method based on three-variable double harmonic and B spline | |
Liu et al. | Paparazzi: surface editing by way of multi-view image processing. | |
US11348314B2 (en) | Fast and deep facial deformations | |
Li et al. | Vox-surf: Voxel-based implicit surface representation | |
CN103530907B (en) | Complicated three-dimensional model drawing method based on images | |
CN111583408B (en) | Human body three-dimensional modeling system based on hand-drawn sketch | |
CN110633628A (en) | RGB image scene three-dimensional model reconstruction method based on artificial neural network | |
CN114782417A (en) | Real-time detection method for digital twin characteristics of fan based on edge enhanced image segmentation | |
CN117953180B (en) | Text-to-three-dimensional object generation method based on dual-mode latent variable diffusion | |
CN110717978B (en) | Three-dimensional head reconstruction method based on single image | |
Deng et al. | Sketch2PQ: freeform planar quadrilateral mesh design via a single sketch | |
Yin et al. | [Retracted] Virtual Reconstruction Method of Regional 3D Image Based on Visual Transmission Effect | |
Meyer et al. | PEGASUS: Physically Enhanced Gaussian Splatting Simulation System for 6DOF Object Pose Dataset Generation | |
Chang et al. | 3D hand reconstruction with both shape and appearance from an RGB image | |
Wiemann et al. | Automatic Map Creation For Environment Modelling In Robotic Simulators. | |
Kazmi et al. | Efficient sketch‐based creation of detailed character models through data‐driven mesh deformations | |
Jack et al. | IGE-Net: Inverse graphics energy networks for human pose estimation and single-view reconstruction | |
Chen et al. | Manipulating, deforming and animating sampled object representations | |
CN114049678B (en) | Facial motion capturing method and system based on deep learning | |
CN115375847A (en) | Material recovery method, three-dimensional model generation method and model training method | |
CN116363329B (en) | Three-dimensional image generation method and system based on CGAN and LeNet-5 | |
Wang et al. | Efficient EndoNeRF reconstruction and its application for data-driven surgical simulation | |
Lin et al. | 3D mesh reconstruction of indoor scenes from a single image in-the-wild | |
US11354878B2 (en) | Method of computing simulated surfaces for animation generation and other purposes | |
US20230215094A1 (en) | Computer Graphics Interface Using Visual Indicator Representing Object Global Volume and/or Global Volume Changes and Method Therefore |
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 |