CN101887593A - Method for deforming smart graph-driven grid image - Google Patents

Method for deforming smart graph-driven grid image Download PDF

Info

Publication number
CN101887593A
CN101887593A CN2009100395062A CN200910039506A CN101887593A CN 101887593 A CN101887593 A CN 101887593A CN 2009100395062 A CN2009100395062 A CN 2009100395062A CN 200910039506 A CN200910039506 A CN 200910039506A CN 101887593 A CN101887593 A CN 101887593A
Authority
CN
China
Prior art keywords
grid
deformation
image
graph
smart
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.)
Pending
Application number
CN2009100395062A
Other languages
Chinese (zh)
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.)
Sun Yat Sen University
National Sun Yat Sen University
Original Assignee
National Sun Yat Sen 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 National Sun Yat Sen University filed Critical National Sun Yat Sen University
Priority to CN2009100395062A priority Critical patent/CN101887593A/en
Publication of CN101887593A publication Critical patent/CN101887593A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a method for deforming a smart graph-driven grid image. In the method, global deformation parameters of the image are mapped to a two-dimensional grid to drive the grid to deform; the grid drives an embedded image of the grid to deform so as to solve the problems of non-accurate image deformations similar to cartoon animation deformations; and a user can quickly acquire an image deformation result through the interaction control of a control point on a smart graph. The method adopts a smart graph-based deformation driving template which has the characteristics of an embedded deformation rule and multi-component coordinative deformation, and can automatically generate appropriate grid driving parameters according to the global deformation parameters so as to generate a grid effect in real time. Besides, by performing cross regulation on different deformation weight coefficients, the method can control the deformation intensity. The method can acquire a two-dimensional grid deformation result of the embedded deformation rule at an interactive real-time speed, and can conveniently and quickly generate a deformation effect of a two-dimensional cartoon animation image by further solving the coordinate mapping and the gray mapping of an image pixel under grid driving.

Description

The grid image deformation method that a kind of smart graph drives
Technical field
The present invention relates to the deformation technology of digital picture, relate in particular to the image of describing the two-dimensional anime image is carried out the animation moulding origination techniques of interactive deformation.
Background technology
In the creation technique of the cartoon cartoon character image of current main-stream, the creator need drop into and repeat the difference expression moulding that work goes to draw identical cartoon character role in a large number.The expression drafting that deformation technology during the utilization computer graphic image is handled can be cartoon character provides new solution.Make it be changed to cartoon character moulding to original animation moulding utilization deformation technology, can significantly improve the creation efficient of cartoon animation works, reduce a large amount of repetition drawings of creator with new facial expression.To the cartoon animation image of preserving with image format, control its distortion with simple and direct exchange method, generate the moulding of various new expressions and action fast, can obviously improve the make efficiency of animation, reduce its cost of manufacture and difficulty.These class methods generally have following feature: the first, and these class methods should be able to be come controlled deformation result easily for the user provides simple interactive means, possess the key character that good interactivity is these class methods; The second, these class methods should need not to use methods such as complicated physics and human simulation to obtain accurate deformation result, and only need keep the basic geometric properties of object, are specially adapted to the non-accurate distortion of this class of similar cartoon animation image; The 3rd, such algorithm should have less computational complexity, to return deformation result with real-time arithmetic speed, so that obtain using more widely in animation and field of play.The present invention proposes a kind of method, the two-dimensional grid problem on deformation that the anamorphose problem of animation image is converted under the smart graph driving is handled: transformation rule is embedded in the smart graph, drive the two-dimensional grid distortion with smart graph again, drive its embedded anamorphose with grid at last and solve the problems referred to above.
Grid drives the research of anamorphose problem always with for a long time, generally is conceived to how to obtain the coordinate Mapping and the grey scale mapping of image pixel under the constraint of grid after the distortion, to obtain the problem of good deformation result.But to how driving two-dimensional grid itself to be deformed to the research of target location extremely rare, and it is to be solved to still have several important problem to have at present: the first, and how the deformation parameter by a spot of overall situation is mapped to problem on the grid with transformation rule completely; The second, to the control of distortion of the mesh trend, how to realize the problem of good interactivity; The 3rd, how to obtain having less computational complexity, can return the problem of the efficient distortion of the mesh algorithm of deformation result with real-time arithmetic speed.
Given this, the present invention proposes a kind of grid image deformation method that drives based on the CVIDraw smart graph, drives the distortion of two-dimensional grid with the smart graph of embedded transformation rule, to solve the difficult problem in the above-mentioned distortion of the mesh process.CVIDraw (Intelligent Visual Customized Drawing, the visual customization platform of intelligence) is the figure with complete independent intellectual property right, animation and the smart graph customization instrument of the exploitation of Chinese Zhongshan University, obtained 3 software copyrights at present.This platform provides perfect animation role's clever parts, and by its animation role smart graph that assembles.The user can obtain the animation role distorted pattern of the clever distortion of all kinds of supports by mutual customization, and such smart graph can obtain different expression moulding by simply controlling the reference mark variation alternately.
Summary of the invention
The present invention proposes to adopt smart graph as drive template, the overall deformation parameter of image is mapped on the two-dimensional grid, drive distortion of the mesh, drive its embedded image deformation method with grid again, to solve the non-accurate anamorphose problem that this class is out of shape in similar cartoon animation.The user can obtain the anamorphose result apace by the reference mark on the mutual control smart graph.What this method adopted has the characteristic of embedded transformation rule and multi-part cooperative transformation based on the distortion drive template of smart graph, can produce suitable grid driving parameters, generating mesh effect in real time automatically according to overall deformation parameter.In addition by the different distortion weight coefficient of interactive adjustment, intensity that can controlled deformation.This method can obtain the two-dimensional grid deformation result of embedded transformation rule with interactively real-time speed, and, generate the deformation effect of two-dimensional cartoon animation image quickly and easily by further finding the solution the coordinate Mapping and the grey scale mapping of the image pixel under the grid driving.
In order to achieve the above object, the present invention is achieved by the following technical solution:
The technical solution used in the present invention is, the grid image deformation method that adopts smart graph to drive, and the method includes the steps of:
At first, choose or construct corresponding smart graph, with reference to template, just the rule description problem of anamorphose is converted into the description problem of smart graph constraint rule is handled as distortion according to the feature and the distortion demand of input picture.Be with the formal description of the key point position before and after the distortion of smart graph specifically with matrix.Can determine parameter in the location matrix with reference to related conclusions such as MPEG-4 human face animation standards for the faceform.Each object all has an original shape and target shape, and respectively corresponding location matrix, can obtain instructing the transposed matrix of figure deformation trend by location matrix, at last by the parsing of transposed matrix with find the solution the optimum controlling point that is met the distortion demand, be used as distortion with reference to template to construct the smart graph that can control alternately;
Next adopt manual or semi-automatic mode that smart graph is alignd with original image, because the transformation rule that embeds in the smart graph that produces in the previous step has translation, rotation and convergent-divergent unchangeability, so this step is with reference to characteristic of correspondence point on input picture and the smart graph specifically, smart graph is carried out operations such as translation, rotation and convergent-divergent, in the hope of on smart graph and the original image each to the optimal approximation between unique point.
Then to do gridding and handle, with the quadrilateral mesh M of pixel separation d structural deformation region D correspondence input picture I.This gridding process is regarded D as on the grid M image, and notes the corresponding image pixel coordinate of each grid vertex.Since the summit of M corresponding regularly some pixels among the I, and arrange regular, so this cancellated structure process is very fast relatively;
And then try to achieve the distortion of the mesh of smart graph under driving M1 as a result again, this process is the repositioning process of grid key point among the M, can adopt motion decomposition method to the motion of smart graph coboundary, the displacement on border is decomposed level and vertical direction, and on both direction, original mesh is pushed respectively, extrusion process is a simple linear interpolation process.And agreement is done levels operation earlier, the vertically operation of back do;
According to the coordinate of each grid node among the M1, original image I is mapped among the grid M1 image result after obtaining to be out of shape at last.Employing is adopted the grey scale mapping that realizes image pixel based on the scattered data being interpolation method of Delaunay triangulation again based on the pixel coordinate mapping method of three Uniform B-spline basis functions.
Technical characterstic of the present invention is mainly reflected in following aspect:
1, the deformation constrain of smart graph and collaborative constraint all are linear in this method, can find the solution the grid vertex position that makes new advances rapidly according to boundary condition, obtain deformation result in real time.
2, by regulating the constraint weight of grid, the user is the degree of control mesh displacement and extruding easily, realizes the deformation effect of complexity such as good extruding, stretching, distortion, expansion, contraction.
3, this smart graph has the character of parts cooperative transformation, can produce multi-level complex deformation effect, need not to be out of shape step by step by transfer image acquisition smooth, the nature of deformation effect.
Description of drawings
The invention will be further described below in conjunction with accompanying drawing and specific embodiment:
Fig. 1 is the schematic flow sheet of the grid image deformation method of smart graph driving of the present invention;
Fig. 2 is grid and the anamorphose design sketch under the different smart graphs of the present invention drive;
Fig. 3 is the influence figure of controlled deformation weight of the present invention to deformation effect.
Embodiment
The present invention is further described below in conjunction with Fig. 1, Fig. 2 and Fig. 3.
The inventive method is converted into the problem on deformation of image the problem on deformation of corresponding grid M.This method at first piece image I (x) as input, and with the quadrilateral mesh M of pixel separation d structural deformation region D correspondence.For handling conveniently, this grid is that the square of d constitutes by some length of sides.D chooses more for a short time, and M is more near the profile of D, but the also corresponding operand that increased.Because the inventive method is towards the cartoon making field, the profile details of D is also non-key, thereby d can choose bigger value, then can as long as react required details rightly.This gridding process is regarded D as on the grid M image mapped, and notes the corresponding mapping point of each grid vertex.Since the summit of M corresponding regularly the some pixels among the I (x), and arrange regularly, so this cancellated structure process is very fast relatively, and only needs to carry out and once get final product at pretreatment stage.
The user specifies the minority summit as control vertex subsequently in M, and they are moved to reposition.This method will generate corresponding position constraint condition according to control vertex information, use the position that solves all the other summits based on the restrained deformation method of smart graph, obtain new grid M1.According to the original position coordinate on summit among the M, D is mapped among the M1 image result after obtaining to be out of shape at last.
Consider that grid local changing features when large deformation is very little, this method adopts local coordinate to describe the geometric properties of grid, be that each element all uses the relative position of adjacent element to represent, so thisly all remain unchanged when being described in Pan and Zoom, irrelevant with translation, rotation and convergent-divergent.Provide the present invention program's embodiment below:
(1) location matrix of structure description smart graph and transposed matrix
After connection on the figure between each key point or match mode were arranged in advance, the shape of figure was only determined by the position of each key point.Contain n key point p with one 0~p N-1Figure G, define its key point p 0~p N-1Coordinate under rectangular coordinate system is:
P 0 : x 0 + k 0,1 a + k 0,2 b , y 0 + k 0,3 a + k 0,4 b P 1 : x 0 + k 1,1 a + k 1,2 b , y 0 + k 1,3 a + k 1,4 b . . . . P n - 1 : x 0 + k n - 1,1 a + k n - 1,2 b , y 0 + k n - 1,3 a + k n - 1,4 b
Wherein the first row expression formula is represented the horizontal ordinate of this group point, and the secondary series expression formula is represented the ordinate of this group point.A, b are respectively the length of outer section rectangle of this figure and wide, and the upper left corner coordinate of regulation rectangle be (x0, y0).
Under this expression way, obvious expression formula x 0+ k .1A+k .2B (k herein .1And k .2Be constant) be enough to describe the situation of any horizontal ordinate of each point.Stipulate following a, b value principle: a as far as possible only with one, answers first-selected operation parameter a for horizontal ordinate among the b.If will use two parameters inevitably, then will make parameter b is 1 as far as possible.In like manner, expression formula y 0+ k .3A+k .4B (k herein .3And k .4Be constant) also be enough to describe the situation of any one ordinate of each point.To follow following value principle: a equally, as far as possible only with one, answer first-selected operation parameter b among the b for ordinate.If will use two parameters inevitably, then will make parameter a is 1 as far as possible.Hereinafter in detail a will be described in detail, the algorithm of b value.
Based on above definition, available k .1, k .2, k .3, k .4Such 4 parameters are described the position of a key point.Figure G with n key point can use n * 4 rank matrix A to describe, and defines a matrix A of describing the reposition of corresponding n key point on its dbjective state figure afterwards again '.Each point among the figure G is shown a transposed matrix Δ A at the offset table in deformation process, and transposed matrix is two location matrixs poor of original state and dbjective state.
A = k 0,1 k 0,2 k 0,3 k 0,4 k 1,1 k 1,2 k 1,3 k 1,4 . . . . . . . . . . . . k n - 1,1 k n - 1,2 k n - 1,3 k n - 1,4 A · = k 0,1 ′ k 0,2 ′ k 0,3 ′ k 0,4 ′ k 1,1 ′ k 1,2 ′ k 1,3 ′ k 1,4 ′ . . . . . . . . . . . . k n - 1,1 ′ k n - 1,2 ′ k n - 1,3 ′ k n - 1,4 ′
ΔA = A - A · = Δk 0,1 Δk 0,2 Δk 0,3 Δ k 0,4 Δk 1,1 Δk 1,2 Δ k 1,3 Δ k 1,4 . . . . . . . . . . . . Δ k n - 1,1 Δk n - 1,2 Δk n - 1,3 Δ k n - 1,4
Introduce variable nX kAnd nY kRepresent reference mark P kHorizontal and vertical displacement.In fact, key point P no matter iWhether is the reference mark, the form of all available formula (1) is described P iThe position:
c i,x=x 0+k i,1a+k i,2b+p i,0nX 0+p i,1nX 1+…+p i,n-1nX n-1+p i,nnY 0+p i,n+1nY 1+…+p i,2n-1nY n-1
(1)
c i,y=y 0+k i,3a+k i,4b+p n+i,0nX 0+p n+i,1nX 1+…+p n+1,n-1nX n-1+p n+i,nY 0+p n+i,n+1nY 1+…+p n+i,2n-1nY n-1
C wherein I, xAnd c I, yRepresent key point P respectively iHorizontal ordinate and ordinate.NX kAnd nY kThen reflect and work as P kDuring as the reference mark, its level and perpendicular displacement are to P iThe influence of some displacement.Obviously, c I, xAnd c I, yExpression way be a description that comprises control information, the P that it not only defines iThe position, also defined P iMode of motion.The FACTOR P here I, jActual is to have described the how weight of respective change along with the variation at reference mark of each point, P I, jExpression is as Pj during as the reference mark, to P iThe influence power weight of point.By such 4n P I, jThe matrix that is constituted can be described out the constrained motion mode of a figure, is called transformation matrix C, is used to describe the rule change of figure.Matrix C can be divided into 4:
Figure B2009100395062D0000071
Wherein:
Figure B2009100395062D0000072
Figure B2009100395062D0000073
C 1How the variation that is used for description control point horizontal ordinate influences figure each point horizontal ordinate changes; In like manner, C 2How the variation that is used for description control point ordinate influences the variation of figure each point horizontal ordinate; C 3How the variation that is used for description control point horizontal ordinate influences the variation of figure each point ordinate; C 4How the variation that is used for description control point ordinate influences the variation of figure each point ordinate.
Obviously, concentrate on C when nonzero element 1And C 4During the zone situation is become simply, reduce the calculated amount of follow-up algorithm, this also is the reason that this section defines the value principle of a, b before.In fact, for the uncomplicated figure of most of forms of motion, transformation matrix all is a sparse matrix.Final control expression formula can be represented by the form of two following matrix multiples, as shown in Equation (2):
Figure B2009100395062D0000081
(2) find the solution the best Deformation control point of smart graph
Rationally choosing of reference mark is key in the entire process flow process.A good control strategy can participate in finishing effectively control task with minimum reference mark.A not good enough reference mark then can't make points all on the figure be effectively controlled, and needs the participation at extra reference mark sometimes.Usually the work of choosing at reference mark is to be finished by experienced designer.The present invention proposes the algorithm at a kind of automatic searching reference mark, and the flow process of this algorithm is shown in algorithm (1):
Algorithm (1):
S=NULL;
Put all the node into the set S; //S is a set of depositing key point
if(the?set?S?is?not?empty)
{
for?i=1?to?n-1
{
If (Δ ki, 1 ≠ 0 and Δ ki, 4 ≠ 0) // the concentrate on C1 of transformation matrix when nonzero element
During with the C4 zone, be optimal control
The point.
Pibecome?a?controllable?node;
Terminate the program; // reference mark is found, EOP (end of program)
}
for?i=1?to?n-1
{
If (Δ ki, 2 ≠ 0 and Δ ki, 3 ≠ 0) // concentrate on transformation matrix when nonzero element
When C2 and C3 zone, be the suboptimum feelings
Condition.
Pi?become?a?controllable?node;
terminate?the?program;
}
for?i=1?to?n-1
{
If (Δ ki, 1+ Δ ki, 2 ≠ 0 and Δ ki, 3+ Δ ki, 4 ≠ 0) // as long as this key point
Horizontal and vertical the position arranged all
Move, then it still possesses becomes
The bar at a good reference mark
Part.
Pi?become?a?controllable?node;
terminate?the?program;
}
for?i=1?to?n-1
{
If (Δ ki, 1 ≠ 0 or Δ ki, 4 ≠ 0) if // can not find really all horizontal and vertical
The key point that displacement is arranged is as the reference mark, then if can protect
The card nonzero element concentrates on the C1 or the C4 of transformation matrix
Zone, problem still are tending towards oversimplifying.
Pi?become?a?controllable?node;
terminate?the?program;
}
for?i=1?to?n-1
{
If (Δ ki, 2 ≠ 0 or Δ ki, 3 ≠ 0) // only the concentrate on C2 of transformation matrix when nonzero element
Or C3 when zone, though that situation becomes is not directly perceived,
The reference mark still can be separated
Pi?become?a?controllable?node;
terminate?the?program;
}
Graphics have no change; If // above condition does not all satisfy, initial graphics is described then
The same with the targeted graphical shape, can't solve control this moment
The system point.
terminate?the?program;
}
Next the reference mark will generate transformation matrix C after determining, this just needs each Pi in the computing formula (2), the value of j, actual is that to find the solution each point be how to change along with the variation at reference mark, on macroscopic view, be exactly the reference mark be how to organize whole figure to carry out restrained deformation.Pi, j represent as Pj during as the reference mark, the weight of the influence power that Pi is ordered.Determine Pi, the arthmetic statement of j value is as described in the algorithm (2):
Algorithm (2):
For?j=0?to?n-1
{
If?Δki,1≠0;
Pj,i=Δkj,1/Δki,1;
else?if?Δki,3≠0;
Pj,i+n=Δkj,1/Δki,3;
else?if?Δkj,1=0;
Pj,i=Pj,i+n=0;
else
{
Pi can not control Pj; The motion of //Pi does not have the Pj point
Influence.
Put Pj into the set T; //T is a new set, is used to deposit
Can not be in first round screening by any control
The key point of point control.
}
If?Δki,2≠0;
Pj,i=Δkj,2/Δki,2;
else?if?Δki,4≠0;
Pj,i+n=Δkj,2/Δki,4;
else?if?Δkj,2=0;
Pj,i=Pj,i+n=0;
else
{
Pi?can?not?control?Pj;
put?Pj?into?the?set?T;
}
If?Δki,3≠0;
Pj+n,i+n=Δkj,3/Δki,3;
else?if?Δki,1≠0;
Pj+n,i=Δkj,3/Δki,1;
else?if?Δkj,3=0;
Pj+n,i+n=Pj+n,i=0;
else
{
Pi?can?not?control?Pj;
put?Pj?into?the?set?T;
}
IfΔki,4≠0;
Pj+n,i+n=Δkj,4/Δki,4;
else?if?Δki,2≠0;
Pj+n,i=Δkj,4/Δki,2;
else?if?Δkj,4=0;
Pj+n,i+n=Pj+n,i=0;
else
{
Pi?can?not?control?Pj;
put?Pj?into?the?set?T;
}
}
Check set T at last, if T is empty, then algorithm finishes.If the T non-NULL just represents that 1 reference mark has not had ability to control the distortion of whole figure, at this moment need other reference mark and participate in control.Should make S=T, execution algorithm once again, promptly execution algorithm once again in set T select the 2nd reference mark, and how each point is followed the 2nd reference mark motion.So repeatedly, be empty up to T, then algorithm finishes.
(3) the grid key point reorientation under smart graph drives
In the method for operating of this anamorphose that is driven by grid, grid is the application entity of distortion.The structure of grid generally is reference with the unique point, and unique point determines according to the distortion demand of reality that then whole grid is made up of level and vertical line through all unique points.Generally also need be provided with on the border of deformed region the boundary characteristic point, they are through the intersection point of the level of unique point or vertical extended line and deformed region, are positioned on the border for the treatment of deformation pattern.
The deformation result of image and the motion conditions of unique point are closely related.Unique point is moved in two dimensional surface, and its motion can decompose to level and vertical both direction, and they have determined the projected forms of original image pixel horizontal ordinate and ordinate respectively.The motion of unique point is decomposed level and vertical both direction, and twice operation all carried out on original mesh, not by intermediateness grid (different with traditional two steps scanning distortion of the mesh method).
After the unique point motion the most intuitively effect be the distortion that causes grid, make the border of grid that variation take place, need (row) line by line to calculate the boundary value (being the reposition of mesh lines) of grid after the distortion.After the motion of unique point is broken down into level and vertical both direction, the motion of horizontal direction will cause the variation of net boundary horizontal ordinate, this changing value is determined by the transversal displacement of two adjacent unique points up and down, as Pa, Pb, Pc, Pd is the original position of unique point on the grid, Pa ', Pb ', Pc ', Pd ' is respectively its target location after moving, then for any delegation on the image, its new net boundary point Pe, the horizontal ordinate of Pf can by its up and down the transversal displacement of two adjacent unique points make linear interpolation and obtain:
x ( P e ) = x ( P a ′ ) + x ( P c ′ ) - x ( P a ′ ) y ( P c ) - y ( P a ) [ y ( P e ) - y ( P a ) ] - - - ( 3 )
x ( P f ) = x ( P b ′ ) + x ( P d ′ ) - x ( P b ′ ) y ( P d ) - y ( P b ) [ y ( P f ) - y ( P b ) ] - - - ( 4 )
Wherein x represents horizontal ordinate, and y represents ordinate.
In like manner, the motion of vertical direction will cause the variation of net boundary ordinate, changing value can by about the length travel of two adjacent feature points make linear interpolation and obtain:
y ( P g ) = y ( P a ′ ) + y ( P b ′ ) - y ( P a ′ ) x ( P b ) - x ( P a ) [ x ( P g ) - x ( P a ) ] - - - ( 5 )
y ( P h ) = y ( P c ′ ) + y ( P d ′ ) - y ( P c ′ ) x ( P d ) - x ( P c ) [ x ( P h ) - x ( P c ) ] - - - ( 6 )
(4) anamorphose under grid drives
Adopt the reverse mapping mode of pixel coordinate in the anamorphose.Each pixel in the target image is found out its correspondence position coordinate in original image, and this coordinate is not integer usually, can claim that these points of non-integer coordinates in two-dimensional space are scattered data points.The half-tone information that recovers target image is exactly the gray-scale value that calculates rounded coordinate point by the gray-scale value of these scattered data pointses.The gray scale of the coordinate points at random that obtains after the mapping is carried out the scattered data being interpolation to recover the Pixel Information of target image.In order to improve the efficient of grey scale mapping, adopt the interpolation of handling extensive scattered data being based on the triangle approach based on linear interpolation of Delaunay triangulation.
Set up an office A, B and C surrounds a Delaunay triangle, and each the some P on this triangle curved surface can represent with the weighted sum on summit: P=a*A+b*B+c*C.Wherein a, b, c are the numerals between 0 and 1, and a+b+c=1.A, b, c is the barycentric coordinates of a P.In barycentric coordinate system, be weighted calculating by:
ax 1 + bx 2 + cx 3 = x ay 1 + by 2 + cy 3 = y a + b + c = 1 And
F=af 1+bf 2+cf 3
The linear interpolation expressions of triangle that gets the gray scale F of Delaunay triangular form internal point is:
F = ( f 1 , f 2 , f 3 ) x 1 x 2 x 3 y 1 y 2 y 3 1 1 1 x y 1 - - - ( 7 )
Wherein f1, f2, f3 are the gray-scale value on Delaunay triangular form three summits, (x1, y1), (x2, y2), (x3 y3) is three apex coordinates.
(5) conclusion
The deformation effect that the inventive method produces when using various boundary conditions as shown in Figure 2.Each ingredient is expressed as follows among Fig. 2:
(a) angry (c) smart graph change of original smart graph (b) smart graph change is laughed at;
(d) original mesh (e) becomes angry grid (f) and becomes and to laugh at grid;
(g) angry (i) image change of original image (h) image change is laughed at.
(a) be former smart graph; (b), (c) be the deformation effect of smart graph; (d) be original mesh, (e), (f) be the distortion of the mesh effect that adopts the smart graph constraint to produce; (g) be original input picture, (h), (i) be anamorphose effect under grid drives.
The distortion weight of control vertex to the influence of deformation effect as shown in Figure 3 in the inventive method.Each ingredient is expressed as follows among Fig. 3:
(a) initial parameter grid (b) parameter laugh at+1 (c) parameter laughs at+2 (d) parameter laughs at+3;
(e) original image (f) parameter laugh at+1 (g) parameter laughs at+2 (h) parameter laughs at+3.
(a) and (e) be respectively former grid and original image; (b), (c), (d) showed the deformation effect of grid when distortion weight under the reference mark drives increases gradually respectively; (f), (g), (h) showed the anamorphose effect that it is corresponding respectively.

Claims (4)

1. the grid image deformation method that drives of a smart graph, it is characterized in that: the method includes the steps of:
(1) two dimensional image to input carries out the network of quadrilaterals operation of formatting, and the employing grid retrains its embedded anamorphose;
(2) the animation people face smart graph of the embedded transformation rule of structure, and be template with the smart graph, drive the two-dimensional grid distortion of constraints graph picture;
(3) method that adopts the motion of grid key point to decompose is handled the coordinate Mapping of image, and in conjunction with the grey scale mapping of handling image based on the scattered data being interpolation method of triangle barycentric coordinate system;
(4) obtain the optimum controlling point of smart graph automatically, and obtain the deformation result of target gridding by adjusting smart graph reference mark;
(5) the multiple complex deformation effect of generation two-dimensional anime image under smart graph drives.
2. the grid image deformation method that drives according to the described a kind of smart graph of claim 1 is characterized in that: the animation people face smart graph of the embedded transformation rule of described structure, and be template with the smart graph, drive the two-dimensional grid distortion of constraints graph picture; The shape of figure is only determined by the position of each key point; With a figure G who contains n key point p0~pn-1, define the coordinate of its key point p0~pn-1 under rectangular coordinate system and can be expressed as following formula:
P 0 : x 0 + k 0,1 a + k 0,2 b , y 0 + k 0,3 a + k 0,4 b P 1 : x 0 + k 1,1 a + k 1,2 b , y 0 + k 1,3 a + k 1,4 b . . . . P n - 1 : x 0 + k n - 1,1 a + k n - 1,2 b , y 0 + k n - 1,3 a + k n - 1,4 b - - - ( 1 )
Wherein the first row expression formula is represented the horizontal ordinate of this group point, and the secondary series expression formula is represented the ordinate of this group point; A, b are respectively the length of outer section rectangle of this figure and wide, and the upper left corner coordinate of regulation rectangle be (x0, y0).
3. the grid image deformation method that drives according to the described a kind of smart graph of claim 1, it is characterized in that: the motion of unique point is broken down into level and vertical both direction, the motion of level and vertical direction will cause the variation of net boundary horizontal ordinate and ordinate, as Pa, Pb, Pc, Pd is the original position of unique point on the grid, Pa ', Pb ', Pc ', Pd ' is respectively its target location after moving, then for any delegation on the image, and its new net boundary point Pe, the horizontal ordinate of Pf can by its up and down the transversal displacement of two adjacent unique points make linear interpolation and obtain, the calculation procedure of its horizontal direction is:
x ( P e ) = x ( P a ′ ) + x ( P c ′ ) - x ( P a ′ ) y ( P c ) - y ( P a ) [ y ( P e ) - y ( P a ) ] - - - ( 2 )
x ( P f ) = x ( P b ′ ) + x ( P d ′ ) - x ( P b ′ ) y ( P d ) - y ( P b ) [ y ( P f ) - y ( P b ) ] - - - ( 3 )
Wherein x represents horizontal ordinate, and y represents ordinate; Vertical direction in like manner calculates.
4. according to the grid image deformation method of the described a kind of smart graph driving of claim 1, it is characterized in that: algorithm obtains the optimum controlling point of smart graph automatically, and obtains the different distortion result by regulating the smart graph reference mark; Algorithm flow in its C1 and the C4 zone is as follows, other zone in like manner:
S=NULL;
Put all the node into the set S; //S is a set of depositing key point
if(the?set?S?is?not?empty)
{
for?i=1?to?n-1
{
If (Δ ki, 1 ≠ 0 and Δ ki, 4 ≠ 0) // the concentrate on C1 of transformation matrix when nonzero element
During with the C4 zone, be optimal reference mark;
Pi?become?a?controllable?node;
Terminate the program; // reference mark is found, EOP (end of program).
}。
CN2009100395062A 2009-05-15 2009-05-15 Method for deforming smart graph-driven grid image Pending CN101887593A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100395062A CN101887593A (en) 2009-05-15 2009-05-15 Method for deforming smart graph-driven grid image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100395062A CN101887593A (en) 2009-05-15 2009-05-15 Method for deforming smart graph-driven grid image

Publications (1)

Publication Number Publication Date
CN101887593A true CN101887593A (en) 2010-11-17

Family

ID=43073503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100395062A Pending CN101887593A (en) 2009-05-15 2009-05-15 Method for deforming smart graph-driven grid image

Country Status (1)

Country Link
CN (1) CN101887593A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542136A (en) * 2010-12-17 2012-07-04 中国地质大学(北京) Computer discrete data gridding parameter extracting method and operating step thereof
CN103854252A (en) * 2012-12-04 2014-06-11 中山大学深圳研究院 Implementation method and implementation device for image deformation
WO2014127494A1 (en) * 2013-02-23 2014-08-28 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN104881894A (en) * 2015-05-26 2015-09-02 浙江大学 Gradual change method of three-dimensional mesh model sequence
CN109285160A (en) * 2018-08-29 2019-01-29 成都品果科技有限公司 One kind is scratched as method and system
CN109360166A (en) * 2018-09-30 2019-02-19 北京旷视科技有限公司 A kind of image processing method, device, electronic equipment and computer-readable medium
CN110390630A (en) * 2018-04-17 2019-10-29 上海碧虎网络科技有限公司 Image distortion method, device, storage medium, display system and automobile
CN111325851A (en) * 2020-02-28 2020-06-23 腾讯科技(深圳)有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542136A (en) * 2010-12-17 2012-07-04 中国地质大学(北京) Computer discrete data gridding parameter extracting method and operating step thereof
CN103854252A (en) * 2012-12-04 2014-06-11 中山大学深圳研究院 Implementation method and implementation device for image deformation
US10379734B2 (en) 2013-02-23 2019-08-13 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN105074780B (en) * 2013-02-23 2020-11-10 高通股份有限公司 System and method for interactive image caricature generation by an electronic device
CN105074780A (en) * 2013-02-23 2015-11-18 高通股份有限公司 Systems and methods for interactive image caricaturing by an electronic device
CN112215914B (en) * 2013-02-23 2024-04-26 高通股份有限公司 System and method for interactive image caricature generation by an electronic device
US11526272B2 (en) 2013-02-23 2022-12-13 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
WO2014127494A1 (en) * 2013-02-23 2014-08-28 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN112215914A (en) * 2013-02-23 2021-01-12 高通股份有限公司 System and method for interactive image caricature generation by an electronic device
US10761721B2 (en) 2013-02-23 2020-09-01 Qualcomm Incorporated Systems and methods for interactive image caricaturing by an electronic device
CN104881894B (en) * 2015-05-26 2017-06-27 浙江大学 The gradual changed method of three-dimensional grid model sequence
CN104881894A (en) * 2015-05-26 2015-09-02 浙江大学 Gradual change method of three-dimensional mesh model sequence
CN110390630A (en) * 2018-04-17 2019-10-29 上海碧虎网络科技有限公司 Image distortion method, device, storage medium, display system and automobile
CN109285160B (en) * 2018-08-29 2022-08-02 成都品果科技有限公司 Image matting method and system
CN109285160A (en) * 2018-08-29 2019-01-29 成都品果科技有限公司 One kind is scratched as method and system
CN109360166B (en) * 2018-09-30 2021-06-22 北京旷视科技有限公司 Image processing method and device, electronic equipment and computer readable medium
CN109360166A (en) * 2018-09-30 2019-02-19 北京旷视科技有限公司 A kind of image processing method, device, electronic equipment and computer-readable medium
CN111325851A (en) * 2020-02-28 2020-06-23 腾讯科技(深圳)有限公司 Image processing method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN101887593A (en) Method for deforming smart graph-driven grid image
Wang et al. Feature based 3D garment design through 2D sketches
CN105069226B (en) A kind of three-dimensional modeling modeling method based on template
CN112396703A (en) Single-image three-dimensional point cloud model reconstruction method
CN101303772A (en) Method for modeling non-linear three-dimensional human face based on single sheet image
CN104599305B (en) A kind of two three-dimensional animation producing methods combined
CN105975655B (en) A kind of imitative Tang and Song Dynasty ancient architecture abnormity roofing tile parametric modeling method based on BIM
CN106709975A (en) Interactive three-dimensional human face expression animation editing method and system and extension method
Anastacio et al. Modeling plant structures using concept sketches
CN102999321B (en) Brush pen electronics paintbrush arranges device and brush pen electronics paintbrush
CN102496140B (en) Multilayer nest cage-based real-time interactive-type image deforming method
CN100403338C (en) Video flow based people face expression fantasy method
CN102903138A (en) Shape-considered two-dimensional digital character skeleton operation method
CN102637304A (en) Method for synthesizing isotropic/anisotropic texture on geometric surface based on GPU (Graphics Processing Unit)
Wang et al. An improving algorithm for generating real sense terrain and parameter analysis based on fractal
Talgorn et al. Real-time sketch-based terrain generation
Runions et al. Partition of unity parametrics: a framework for meta-modeling
CN110517333B (en) Dynamic low relief model modeling method
Yaman et al. Generation of patterned indentations for additive manufacturing technologies
CN106815799A (en) A kind of self adaptation artistic pattern forming method based on chaology
Kaplan The Tiles, They Are a-Changin’
GB2438668A (en) Deformation of mask based images
Lu et al. Solid mathematical marbling
Huang et al. Incorporating improved refinement techniques for a grid-based geometrically-adaptive hexahedral mesh generation algorithm
Thaller et al. Procedural mesh features applied to subdivision surfaces using graph grammars

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20101117