CN104978711A - Chinese character shape deformation method based on smoke simulation - Google Patents

Chinese character shape deformation method based on smoke simulation Download PDF

Info

Publication number
CN104978711A
CN104978711A CN201510424059.8A CN201510424059A CN104978711A CN 104978711 A CN104978711 A CN 104978711A CN 201510424059 A CN201510424059 A CN 201510424059A CN 104978711 A CN104978711 A CN 104978711A
Authority
CN
China
Prior art keywords
chinese character
cigarette
field
distance
simulation
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
Application number
CN201510424059.8A
Other languages
Chinese (zh)
Other versions
CN104978711B (en
Inventor
梁晓辉
左庆
郭承禹
顾敏杰
阮松松
王宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beihang University
Original Assignee
Beihang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beihang University filed Critical Beihang University
Priority to CN201510424059.8A priority Critical patent/CN104978711B/en
Publication of CN104978711A publication Critical patent/CN104978711A/en
Application granted granted Critical
Publication of CN104978711B publication Critical patent/CN104978711B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/18Image warping, e.g. rearranging pixels individually
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention discloses a Chinese character shape deformation method based on smoke simulation. According to the method, a Chinese character is represented by the density field of smoke, and the shape deformation of the Chinese character is the change of the density field of the smoke. In the simulation process of the smoke, the external force field of each frame is calculated and generated according to the current state of the smoke, and the deformation process of the whole Chinese character is determined by a series of Chinese character shapes inputted by a user.

Description

A kind of Chinese character shape deformation method based on cigarette simulation
Technical field
The invention belongs to computer vision and field of Computer Graphics, specifically a kind of deformation method of density based field, the method according to a series of shapes of user's input, can generate coherent deformation process, for the special effect making in the fields such as TV, film, game.
Background technology
Along with the develop rapidly of computer technology, people more and more focus on the diversity of spontaneous phenomenon in computer animation with interesting, and in field of Computer Graphics, the simulation as cigarette, fire, water or other fluid is absolutely necessary.The simulation of this fluid not only can generate fluid scene true to nature, can also be used to the special efficacy making some non-natural, the shape that such as cigarette aggregation formation is special or move along a certain particular course.
The motion of fluid can describe with famous Navier Stokes equation (Navier-Stokes Equation):
∂ u / ∂ t = - ( u · ▿ ) u - ▿ p + f - - - ( 1 )
▿ · u = 0 - - - ( 2 )
Wherein u represents velocity field, and f represents external force, and p represents pressure, and t represents the time.And visible oBject in fluid (as dyestuff, or the particle etc. of cigarette, use I represents) can describe with following formula:
∂ I / ∂ t = - u · ▿ I - - - ( 3 )
The simulation of cigarette generally adopts Eulerian mesh to divide space, and in two-dimensional analog, a pixel just can regard a grid cell as.
Summary of the invention
The present invention proposes a kind of Chinese character shape deformation method based on cigarette simulation.Comprise: first step generates distance field according to Chinese character shape; Second step is in each frame simulation process, calculates control according to the distance field that current smoke density field and target characters shape generate; Third step is in the simulation process of tradition based on the cigarette of grid, add a density field gathering and diffusion process, can more effectively order about cigarette and change to target shape.
Accompanying drawing explanation
Fig. 1 illustrates the main flow figure of the Chinese character shape deformation technology that the present invention is based on cigarette simulation;
Fig. 2 illustrates that the present invention generates the method extracting Chinese character contour in distance field process according to Chinese character shape; A (), when finding profile in the order of each pixel corner detection profile, incident arrow is the direction of the point from previous point to current outline, and outgoing arrow is the direction detecting next point, and the numeral on arrow is exploring sequence.B () finds profile during first Chinese character area pixel; C profile that () is finally found.
Embodiment
As shown in Figure 1, the Chinese character shape deformation technology based on cigarette simulation of the present invention adopts following steps:
(1) Chinese character inputted by user generates corresponding distance field.The image of each Chinese character binaryzation is stated, and as shown in Figure 2, black region is the stroke of Chinese character, and white portion is blank.Extract profile to bianry image and first find a point, the finding method of the first point is scan image from left to right from top to bottom, finds first black picture element (as shown in Fig. 2 (b)); Then along counterclockwise going to find next point, direction of search when finding next point is searched for according to the order in Fig. 2 (a); The profile finally obtained is as shown in Fig. 2 (c).Then be calculate distance field, the distance of each pixel is from the shortest distance of all point, but black region is just, white portion is negative.
(2), in the simulation process of cigarette, combined by the distance field of current density field and target characters and generate control.Control is divided in target shape and outer two regions of shape, and for the cigarette outside shape, we need they to be driven in shape as soon as possible, and for the cigarette in shape, we need each place they be diffused into as much as possible in shape.The direction of power is provided by following formula:
z ( i , j ) = ▿ d i s ( i , j ) | | ▿ dis ( i , j ) | | 2 , f o r M a s k ( i , j ) = 0 - ▿ I ( i , j ) | | ▿ I ( i , j ) | | 2 , f o r M a s k ( i , j ) = 1
In formula, dis is distance field, for gradient signs, Mask (i, j) depicts target shape, represents when being 1 in shape, represents outside shape when being 0.Control is by formula f ctrl=α Iz provides, and in formula, α is coefficient.
(3) for the simulation of each frame cigarette, five steps is divided into:
A () applies power.Comprise external force and internal force two parts, traditional cigarette analogy method China and foreign countries advocate to refer to buoyancy or wind-force, and in the present invention, external force is used to the control of the motion controlling cigarette.Internal force is that curl strengthens power, is mainly used to the rotation details increasing cigarette.First calculate the curl of certain velocity field, as formula shown in, in formula, ω is curl field.Then the gradient direction field of curl is calculated, if formula shown in, finally calculate curl power f conf=ε h (N × ω), f in formula confthat curl strengthens power.
(b) speed advection.The mode of the rear orientation trace in conventional smoke simulation process is used to carry out the advection of velocity field.
(c) velocity projections.Velocity projections refers to calculating velocity field without divergence, and close as far as possible with original velocity field, uses Poisson equation to solve.
(d) density field advection.The mode of the rear orientation trace in conventional smoke simulation process is used to carry out the advection of density field.
The gathering of (e) density field and diffusion.Cigarette can be propagated into adjacent domain by diffusion, and when Chinese character shape is comparatively complicated, this step seems very effective, and we use Gaussian smoothing to realize the diffusion of cigarette.And the gathering of cigarette is that cigarette is gathered shape area from non-targeted shape area.The method for congregating that we use is very simple but effect is fine:
I ( i , j ) = I ( i , j ) · σ 1 , f o r M a s k ( i , j ) = 1 σ 0 , f o r M a s k ( i , j ) = 0 ,
0< σ in formula 0<1, σ 1>1 is two coefficients.

Claims (4)

1., based on a Chinese character shape deformation method for cigarette simulation, it is characterized in that comprising the following steps:
(1) Chinese character inputted by user generates corresponding distance field;
(2), in the simulation process of cigarette, combined by the distance field of current density field and target characters and generate control;
(3) the simulation process of each frame cigarette comprise following in: apply power, speed advection, velocity projections, density field advection, the gathering of density field and diffusion.
2. as described in claim 1 a kind of based on cigarette simulation Chinese character shape deformation method, it is characterized in that: described step (1), the Chinese character of user's input is binary image, black is Chinese character region, white is non-Chinese character region, adopt from top to bottom, order from left to right finds first Chinese character area pixel, then Chinese character contour is found widdershins, the a series of pixel corner of profile represents, when calculating distance field, the distance definition of each pixel is the distance of nearest point, distance comprises sign symbol, distance in Chinese character region is just all, distance in non-Chinese character region is all negative.
3. as described in claim 1 a kind of based on cigarette simulation Chinese character shape deformation method, it is characterized in that: described step (2), control have employed different computing method in Chinese character region and non-Chinese character region, for non-Chinese character region, the direction of control is the gradient direction along distance field, and size is directly proportional to the temperature of cigarette, for Chinese character region, the direction of control is the opposite direction of smoke density field gradient, and size is directly proportional to the temperature of cigarette.
4. as described in claim 3 a kind of based on cigarette simulation Chinese character shape deformation method, it is characterized in that: described step (3), power in " applying power " is divided into external force and internal force, internal force is that curl field strengthens power, the size of power is relevant to the curl field in current velocity field, and external force is described control; " speed advection ", " velocity projections ", " density field advection ", have employed the computing method in graphics; In " gathering of density field and diffusion ", the implementation of the diffusion of cigarette is for carry out Gaussian smoothing to whole density field, and the gathering implementation of cigarette is for non-Chinese character region, smoke density value is multiplied by the coefficient that is less than 1, for Chinese character region, smoke density value is multiplied by the coefficient that is greater than 1, finally carries out convergent-divergent to the value of whole smoke density field, to ensure that the total amount of cigarette is constant in every frame.
CN201510424059.8A 2015-07-17 2015-07-17 A kind of Chinese character shape deformation method based on cigarette simulation Expired - Fee Related CN104978711B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510424059.8A CN104978711B (en) 2015-07-17 2015-07-17 A kind of Chinese character shape deformation method based on cigarette simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510424059.8A CN104978711B (en) 2015-07-17 2015-07-17 A kind of Chinese character shape deformation method based on cigarette simulation

Publications (2)

Publication Number Publication Date
CN104978711A true CN104978711A (en) 2015-10-14
CN104978711B CN104978711B (en) 2017-12-08

Family

ID=54275191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510424059.8A Expired - Fee Related CN104978711B (en) 2015-07-17 2015-07-17 A kind of Chinese character shape deformation method based on cigarette simulation

Country Status (1)

Country Link
CN (1) CN104978711B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03150594A (en) * 1989-11-08 1991-06-26 Hitachi Ltd System and device for character generation and document printer
CN102819630A (en) * 2012-06-27 2012-12-12 北京航空航天大学 Rapid smoke simulation method for coarse mesh projection of octree
CN104361629A (en) * 2014-12-01 2015-02-18 北京航空航天大学 Smoke model space editing method based on streamline deformation

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03150594A (en) * 1989-11-08 1991-06-26 Hitachi Ltd System and device for character generation and document printer
CN102819630A (en) * 2012-06-27 2012-12-12 北京航空航天大学 Rapid smoke simulation method for coarse mesh projection of octree
CN104361629A (en) * 2014-12-01 2015-02-18 北京航空航天大学 Smoke model space editing method based on streamline deformation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘敏等: "基于骨架图匹配的汉字变形技术", 《北京航空航天大学学报》 *

Also Published As

Publication number Publication date
CN104978711B (en) 2017-12-08

Similar Documents

Publication Publication Date Title
Xu et al. Multi-scale continuous crfs as sequential deep networks for monocular depth estimation
Jampani et al. Video propagation networks
CN110309842B (en) Object detection method and device based on convolutional neural network
CN103810725B (en) A kind of video stabilizing method based on global optimization
CN107103613A (en) A kind of three-dimension gesture Attitude estimation method
CN105718879A (en) Free-scene egocentric-vision finger key point detection method based on depth convolution nerve network
CN107844795A (en) Convolutional neural network feature extraction method based on principal component analysis
CN110399518A (en) A kind of vision question and answer Enhancement Method based on picture scroll product
CN103914863A (en) Method for abstractly drawing color image
CN110909867A (en) Graph neural network visual analysis method based on force guide graph
CN113095172A (en) Point cloud three-dimensional object detection method based on deep learning
CN107506792A (en) A kind of semi-supervised notable method for checking object
CN103578107A (en) Method for interactive image segmentation
CN105389839A (en) Fluid-analysis-based fluid parameter estimation method
CN103093211B (en) Based on the human body motion tracking method of deep nuclear information image feature
Hsu et al. Depicting time evolving flow with illustrative visualization techniques
Shi et al. Context‐guided ground truth sampling for multi‐modality data augmentation in autonomous driving
CN104978711A (en) Chinese character shape deformation method based on smoke simulation
CN110738715A (en) automatic migration method of dynamic text special effect based on sample
CN103198464B (en) A kind of migration of the face video shadow based on single reference video generation method
Qian et al. Simulating chalk art style painting
CN103902657B (en) Three-dimensional model retrieval method based on sketch
CN102306383A (en) Descriptor constructing method suitable for dense matching of wide baseline image
CN104318599A (en) High-precision fluid animation modeling method based on geometrical features
Hu et al. DRANet: A semantic segmentation network for Chinese landscape paintings

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20171208

Termination date: 20210717

CF01 Termination of patent right due to non-payment of annual fee