CN101276474B - Linear constrained image distortion method based on local coordinates - Google Patents

Linear constrained image distortion method based on local coordinates Download PDF

Info

Publication number
CN101276474B
CN101276474B CN2008100274203A CN200810027420A CN101276474B CN 101276474 B CN101276474 B CN 101276474B CN 2008100274203 A CN2008100274203 A CN 2008100274203A CN 200810027420 A CN200810027420 A CN 200810027420A CN 101276474 B CN101276474 B CN 101276474B
Authority
CN
China
Prior art keywords
prime
formula
sigma
linear
summit
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.)
Expired - Fee Related
Application number
CN2008100274203A
Other languages
Chinese (zh)
Other versions
CN101276474A (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.)
Sun Yat Sen University
Original Assignee
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN2008100274203A priority Critical patent/CN101276474B/en
Publication of CN101276474A publication Critical patent/CN101276474A/en
Application granted granted Critical
Publication of CN101276474B publication Critical patent/CN101276474B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a linear image deformation method based on a local coordinate. The method comprises transforming an image into a corresponding four-side-territory grid, presenting the geometrical characteristics of the grid by affine and angle linearity restriction, constructing a boundary restriction condition based on a user-appointed control culmination, solving a linear equations set, rapidly computing the deformed image. According to the method, the deformation effect with translation sensibility can be obtained by an interaction speed, the proportion of affine deformation can be controlled by adjusting the weights of two kind of linearity restriction, complex deformation effects, such as good bend, translation sensibility, anisotropy zoom, etc., are realized.

Description

A kind of linear restriction image distortion method based on local coordinate
Technical field
The present invention relates to the deformation technology of two dimensional image, specifically relate to the animation design technique that the two dimensional image of having described animating image is out of shape.
Background technology
A large amount of artistic images as case of caricatures of persons etc., is preserved with the form of image.If can generate various new elements and expression apace with simple and direct their distortion of method control, can improve cartoon making efficient significantly, reduce manufacture difficulty.This demand has following characteristics: the distortion of at first this animating image belongs to non-accurate distortion, need not use method acquisition precise results such as physical simulation, as long as keep basic geometric properties; Secondly, the user wishes by simple means controlled deformation result; In addition, algorithm should have higher robustness, can return operation result with interactively speed.The present invention proposes a kind of method, the anamorphose problem is converted to the two-dimensional grid problem on deformation handles: with image transitions is territory, four limits grid, and this grid is out of shape solves the problems referred to above.
Distortion of the mesh is a hot issue in recent years, and people have proposed multiple scheme, but it is to be solved to still have several major issues to have.The first, serious distortion might appear in the local geometric features of grid when significantly being out of shape; The second, the user only provides the coordinate translation information of minority control vertex sometimes, and does not comprise rotation information.At this moment need algorithm to produce suitable rotation information automatically, thereby obtain desirable deformation result, be i.e. " translation sensitivity " characteristic.The 3rd, because the cause of efficient, algorithm should adopt linear operation as far as possible.It's a pity that general non-rigid body translation (as bending, irregular deformation etc.) can not be shown the summit linear operation by simple table.
For solving an above-mentioned distortion difficult problem, the present invention proposes a kind of grid deforming method based on local coordinate, thereby realizes anamorphose fast.
Summary of the invention
The present invention proposes with linear affine and angle restriction and describe the deformation method of territory, four limits grid vertex local feature, and this method is used for the non-accurate distortion of image.The user can obtain deformation result apace by specifying the position of minority control vertex simply.This method has adopted the local coordinate of grid to describe geometric properties, has the characteristic of translation sensitivity, can produce suitable rotation amount automatically according to the translation information of control vertex, generates the distortion effect of nature fast.By giving different constraint weights, can control the proportion of affine deformation in the result in addition.This method can obtain have the deformation result of translation sensitive natur with interactively speed, by a step find the solution the system of linear equations computing, generate the multiple complex deformation effect of 2 D animation image quickly and easily.
For reaching above-mentioned purpose, the technical solution used in the present invention is: a kind of linear restriction image distortion method based on local coordinate, and the method includes the steps of:
At first construct territory, corresponding four limit grid, then the anamorphose problem can be converted to the two-dimensional grid problem on deformation and handle according to input picture.Piece image I (x) conduct input, and with pixel separation d structural deformation zone D ⊆ I Corresponding territory, four limits grid M 0This gridding process is regarded D as grid M 0On pinup picture, and note the corresponding pinup picture coordinate of each grid vertex.Because M 0The summit 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 then can at pretreatment stage;
Then at M 0In specify the minority summit as control vertex, and they are moved or rotate to reposition.This method will generate corresponding position constraint condition according to control vertex information, and in conjunction with M 0Geometric properties structure corresponding linear system of equations, use the position that solves all the other summits based on the linear restriction deformation method of local coordinate then, obtain new grid M 1
At last according to M 0The former pinup picture coordinate on middle summit is mapped to M with D 1In, the image result after obtaining to be out of shape.
Technical characterstic of the present invention mainly embodies as follows:
1, affine constraint in this method and angle restriction all are linear, can find the solution new vertex position rapidly according to boundary condition, obtain deformation result fast.
2, by regulating the weight of two kinds of constraints, the user is the degree of control mesh affine deformation easily, realizes the deformation effect that good bending, translation sensitivity, anisotropy convergent-divergent etc. are complicated.
3, method has the translation sensitive natur, can produce the deformation effect of nature, distribution that need not explicit appointment rotation amount.
Description of drawings
Fig. 1 is the schematic flow sheet of the inventive method;
The deformation effect figure that Fig. 2 produces under various boundary conditions for the inventive method;
Fig. 3 is the inventive method control vertex and the weight figure that influences to deformation effect.
Embodiment
The present invention is described further below in conjunction with accompanying drawing.
The inventive method is converted into corresponding grid M with the problem on deformation of figure 0Problem on deformation.This method at first piece image I (x) as input, and with pixel separation d structural deformation zone D ⊆ I Corresponding territory, four limits grid M 0For handling conveniently, this grid is that the square of d constitutes by some length of sides.D chooses more for a short time, M 0More 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 reflect required details rightly.This gridding process is regarded D as grid M 0On pinup picture, and note the corresponding pinup picture coordinate of each grid vertex.Because M 0The summit 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 then can at pretreatment stage.
The user is subsequently at M 0In specify the minority summit as control vertex, and they are moved or rotate to reposition.This method will generate corresponding position constraint condition according to control vertex information, and in conjunction with M 0Geometric properties structure corresponding linear system of equations, use the position that solves all the other summits based on the linear restriction deformation method of local coordinate then, obtain new grid M 1
At last according to M 0The former pinup picture coordinate on middle summit is mapped to M with D 1In, the image result after obtaining to be out of shape.
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 remaining unchanged when being described in rigid transformation and convergent-divergent, is that translation, rotation and convergent-divergent are irrelevant.The translation sensitivity comes down under the prerequisite that satisfies the border vertices position constraint, make the relative rotation amount between the element as far as possible little, this just local coordinate can accomplish.Adopt local coordinate to describe the geometric properties of grid, be expressed as following formula:
V * = arg min V ′ α Σ v i ∈ V | | t ( v i ′ ) - t ( v i ) | | 2
+ β Σ e m , e n ∈ E | | r ( e m ′ , e n ′ ) - r ( e m , e n ) | | 2
+ ω Σ v k ∈ Ω | | v k ′ - u k | | 2
V wherein iBe former vertex position, v i' be new vertex position,
Figure S2008100274203D00044
The local coordinate of expression summit in adjacent frame, e m, e nBe adjacent edge,
Figure S2008100274203D00045
The rotation amount of expression adjacent edge, α, β, ω are corresponding weights.
Investigate initial mesh M 0Geometric properties.It is made of some adjacent squares, and the equal in length on every limit meets at right angles between the adjacent edge or the straight angle.Therefore, utilize these geometric properties, can construct the good length of side and angle restriction, make distortion target gridding M 1Adjacent side length approximate, angle is near the right angle or the straight angle.
The present invention M 0Widthwise edge and adjacent vertical limit constitute a partial, right angle frame f, go to represent the limit of direct neighbor then with f, provide the concrete form of first item constraint below.
(1) affine constraint
Because M 0Only the limit by level and vertical both direction constitutes, and equal in length, therefore for each summit, is made as v, can write out following linear relationship;
v 1 - v 0 = v 0 - v 3 v 2 - v 0 = v 0 - v 4
So the error of new summit in adjacent local coordinate can be write:
E 1 { v 0 ′ } = | | v 0 ′ - ( v 1 ′ + v 3 ′ ) / 2 | | 2
+ | | v 0 ′ - ( v 2 ′ + v 4 ′ ) / 2 | | 2
This error comes down to the distance of the local coordinate on new summit to the expection local coordinate.Then Quan Ju affine error is
E 1 = Σ v i ′ ∈ V ′ E 1 { v i ′ } .
As long as the global error of making E 1 = Σ v i ′ ∈ V ′ E 1 { v i ′ } Minimum then can be distributed to the error that border vertices produces on the whole grid equably, obtains the new grid of fairing.Promptly by finding the solution down the least square linear system of equations of wearing linear barrier's constraint
V * = arg min V ′ αΣ | | H V ′ | | 2 + ω Σ v k ′ ∈ Ω | | v k ′ - u k | | 2
Can try to achieve and make global error E 1 = Σ v i ′ ∈ V ′ E 1 { v i ′ } Minimum new vertex position V '.Wherein H be by E 1 { v 0 ′ } = | | v 0 ′ - ( v 1 ′ + v 3 ′ ) / 2 | | 2 + | | v 0 ′ - ( v 2 ′ + v 4 ′ ) / 2 | | 2 The weight matrix that obtains is represented the neighbouring relations on each summit.
Only adopt this linear restriction can not obtain the responsive effect of translation.So we introduce the second following item constraint.
(2) angle restriction
What consider processing is two-dimentional problem on deformation, and the mutually perpendicular x of long vector and the y component of waiting can constitute following linear restriction relation in two dimensional surface:
( v 1 - v 0 ) x = ( v 2 - v 0 ) y ( v 1 - v 0 ) y = - ( v 2 - v 0 ) x .
So the error of the local frame that new summit is constituted is:
E 2 { v 0 ′ } = | | ( v 1 - v 0 ) x - ( v 2 - v 0 ) y | | 2
+ | | ( v 1 - v 0 ) y + ( v 2 - v 0 ) x | | 2 .
As seen, this error in fact also is the distance of the local coordinate on new summit to the expection local coordinate.Correspondingly obtain overall angular error and be;
E 2 = Σ v i ′ ∈ V ′ E 2 { v i ′ } .
Add affine constraint, obtain the least square linear system of equations of complete band linear restriction:
V * = arg min V ′ αΣ | | H V ′ | | 2 + βΣ | | K V x ′ V y ′ | | 2
+ ω Σ v k ′ ∈ Ω | | v k ′ - u k | | 2
Wherein K be by E 2 { v 0 ′ } = | | ( v 1 - v 0 ) x - ( v 2 - v 0 ) y | | 2 + | | ( v 1 - v 0 ) y + ( v 2 - v 0 ) x | | 2 The weight matrix that obtains.
Because V * = arg min V ′ αΣ | | H V ′ | | 2 + βΣ | | K V x ′ V y ′ | | 2 + ω Σ v k ′ ∈ Ω | | v k ′ - u k | | 2 Be linear least square journey group, can write:
Figure S2008100274203D00063
Wherein G = H 0 0 H , U has preserved border vertices u kRespective value, W is the weighting matrix of border vertices.For simplicity, make β=1/ α usually.
What need spell out is: though be system of linear equations, owing to x, the split corresponding restriction relation of structure that comes of y component, so following formula is not the system of linear equations of summit V '.Owing to adopted this skill of angle restriction, thereby the translation sensitive natur is achieved, and only demand separate one step of system of linear equations then can, need not adopt interative computation.
Owing to all constructed an angle restriction for each foursquare interior angle, so the order of K is 2 ‖ V ' ‖-4.Because the summit in edge lacks length of side constraint condition than internal vertex, the perhaps cause of border vertices conllinear, the order of G must be less than the order of K.Institute thinks that system of equations is separated when making β non-vanishing, must specify 2 border vertices at least.As seen, independent use angle constraint can be found the solution vertex position.But affine constraint can realize mistake and cut the equiaffine deformation effect.The user can be by regulating two kinds of constraint conditions of ratio balance of α and β.
System of equations is the overdetermination system of linear equations of AV '=b form, can be by calculating its normal equation group A TAV '=A TB solves V '.We have adopted the TAUCS method to try to achieve A TThe Cholesky of A decomposes, and calculates the least square solution of V ' by back substitution.
The deformation effect that the inventive method produces when using various boundary conditions as shown in Figure 2.(a) be former grid.(b) be the deformation effect that only adopts affine constraint to produce.After increasing angle restriction, identical control vertex position has produced smooth bending effect (c).(d) be the effect of crooked 180 degree.(e) be that the mistake that only adopts affine constraint to produce is cut effect.After increasing angle restriction, can produce the responsive effect (f) of translation and (g).(h) be the unilateral stretching effect that only adopts affine constraint to generate.(i) be to have adopted whole constraints and 2 (isotropy) amplification effects that control vertex produces.Round dot is a control vertex.
Control vertex and weight are to the influence of deformation effect as shown in Figure 3 in the inventive method.(a) be former figure.(b) with two control vertexs the left side is dwindled in, and move to right a control vertex on right side is past, amplified the right side.(c) α is 10, and β is 0.1, obtains to approach the affine deformation effect of cross directional stretch; (d) α and β are 1, and the middle part occurs amplifying owing to influence each other.(e) with the object bending, contraction to a certain degree appears in the middle part.Increase a reference mark in the centre, (e) elongated the effect (f) that area is protected in simulation.

Claims (2)

1. linear restriction image distortion method based on local coordinate is characterized in that the method includes the steps of:
(1) two dimensional image to input carries out foursquare gridding operation, and adopts local coordinate to describe the geometric properties of grid, is expressed as following formula:
V * = arg min V ′ α Σ v i ∈ V | | t ( v i ′ ) - t ( v i ) | | 2
+ β Σ e m , e n ∈ E | | r ( e m ′ , e n ′ ) - r ( e m , e n ) | | 2 Formula (1)
+ ω Σ v k ∈ Ω | | v k ′ - u k | | 2
V wherein iBe former vertex position, v i' be new vertex position,
Figure FSB00000033531200014
The local coordinate of expression summit in adjacent frame, e m, e nBe adjacent edge,
Figure FSB00000033531200015
The rotation amount of expression adjacent edge, α, β, ω are corresponding weights;
(2) relative position between the summit is carried out affine constraint, obtain the constraint condition about the position, its calculation procedure is:
Each summit is represented with v, represents different summits by the subscript of v, draws linear relationship:
v 1 - v 0 = v 0 - v 3 v 2 - v 0 = v 0 - v 4 Formula (2)
The error writing of new summit in adjacent local coordinate:
E 1 { v 0 ′ } = | | v 0 ′ - ( v 1 ′ + v 3 ′ ) / 2 | | 2 Formula (3)
+ | | v 0 ′ - ( v 2 ′ + v 4 ′ ) / 2 | | 2
Then Quan Ju affine error is:
E 1 = Σ v i ′ ∈ V ′ E 1 { v i ′ } Formula (4)
Find the solution the least square linear system of equations of band linear barrier constraint
V * = arg min V ′ αΣ | | HV ′ | | 2 + ω Σ v k ′ ∈ Ω | | v k ′ - u k | | 2 Formula (5)
Try to achieve the new vertex position V ' that makes the global error minimum, wherein H is the weight matrix that is obtained by formula (3), represents the neighbouring relations on each summit;
(3) angle between the adjacent edge is carried out angle restriction, obtain the constraint condition about angle, its calculation procedure is:
The mutually perpendicular x of long vector and the linear restriction relation below the y component formation of waiting in two dimensional surface:
( v 1 - v 0 ) x = ( v 2 - v 0 ) y ( v 1 - v 0 ) y = - ( v 2 - v 0 ) x Formula (6)
The error of the local frame that then new summit is constituted is:
E 2 { v 0 ′ } = | | ( v 1 - v 0 ) x - ( v 2 - v 0 ) y | | 2
+ | | ( v 1 - v 0 ) y + ( v 2 - v 0 ) x | | 2 Formula (7)
Correspondingly obtain overall angular error and be:
E 2 = Σ v i ′ ∈ V ′ E 2 { v i ′ } Formula (8)
Thereby obtain the least square linear system of equations of complete band linear restriction:
V * = arg min V ′ αΣ | | HV ′ | | 2 + βΣ | | K V x ′ V y ′ | | 2
+ ω Σ v k ′ ∈ Ω | | v k ′ - u k | | 2 Formula (9)
Wherein K is the weight matrix that is obtained by formula (7);
(4) regulate two kinds of constraint conditions of ratio balance of α and β, and find the solution system of linear equations;
(5) the multiple complex deformation effect of generation 2 D animation image.
2. according to the described a kind of linear restriction image distortion method based on local coordinate of claim 1, it is characterized in that: two kinds of constraint conditions of ratio balance of described adjusting α and β are specially: make β=1/ α, formula (9) formula is write:
Figure FSB00000033531200027
Formula (10)
Wherein
Figure FSB00000033531200028
U has preserved border vertices u kRespective value, W is the weighting matrix of border vertices;
By group of equations A TAV '=A TB solves V '; And adopted TAUCS to try to achieve A TThe Cholesky of A decomposes, and calculates the least square solution of V ' by back substitution.
CN2008100274203A 2008-04-14 2008-04-14 Linear constrained image distortion method based on local coordinates Expired - Fee Related CN101276474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100274203A CN101276474B (en) 2008-04-14 2008-04-14 Linear constrained image distortion method based on local coordinates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100274203A CN101276474B (en) 2008-04-14 2008-04-14 Linear constrained image distortion method based on local coordinates

Publications (2)

Publication Number Publication Date
CN101276474A CN101276474A (en) 2008-10-01
CN101276474B true CN101276474B (en) 2010-09-01

Family

ID=39995887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100274203A Expired - Fee Related CN101276474B (en) 2008-04-14 2008-04-14 Linear constrained image distortion method based on local coordinates

Country Status (1)

Country Link
CN (1) CN101276474B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101900817B (en) * 2009-05-27 2013-01-16 中国科学院地理科学与资源研究所 Universal remote sensing data rule gridding method
GB2478164A (en) * 2010-02-26 2011-08-31 Sony Corp Calculating misalignment between a stereoscopic image pair based on feature positions
CN102930586A (en) * 2012-10-11 2013-02-13 北京航空航天大学 Interactive geometry deformation method based on linear rotation invariant differential coordinates
CN103854252A (en) * 2012-12-04 2014-06-11 中山大学深圳研究院 Implementation method and implementation device for image deformation
CN104166992B (en) * 2014-07-25 2017-03-29 广东外语外贸大学 Perception of content binocular image Zoom method based on distortion of the mesh
CN104881894B (en) * 2015-05-26 2017-06-27 浙江大学 The gradual changed method of three-dimensional grid model sequence
CN105956997B (en) * 2016-04-27 2019-07-05 腾讯科技(深圳)有限公司 The method and apparatus of image deformation processing
CN106447754B (en) * 2016-08-31 2019-12-24 和思易科技(武汉)有限责任公司 Automatic generation method of pathological animation

Also Published As

Publication number Publication date
CN101276474A (en) 2008-10-01

Similar Documents

Publication Publication Date Title
CN101276474B (en) Linear constrained image distortion method based on local coordinates
CN103971394B (en) Human face animation synthetic method
CN104809755B (en) Three-dimensional rebuilding method based on single image cultural relic ruins
CN102096934B (en) Human face cartoon generation method based on machine learning
CN100383807C (en) Feature point positioning method combined with active shape model and quick active appearance model
CN102156688B (en) Character transforming effect processing method and device
CN104657737B (en) The method and apparatus being corrected based on cluster to QR image in 2 D code
CN101587595A (en) Deformation method based on control meshes
Budd et al. The scaling and skewness of optimally transported meshes on the sphere
CN103544733B (en) The three-dimensional human head triangular mesh model method for building up analyzed based on Statistical Shape
CN102637304B (en) Method for synthesizing isotropic/anisotropic texture on geometric surface based on GPU (Graphics Processing Unit)
CN104822030B (en) A kind of squaring antidote of irregular video based on anamorphose
Lei et al. A new approach to 3D pattern-making for the apparel industry: Graphic coding-based localization
CN105469415A (en) Multi-view remote sensing image fusion method
CN105243636A (en) Method and system for image deformation based on MRLS-TPS
CN115546273A (en) Scene structure depth estimation method for indoor fisheye image
CN103955687B (en) A kind of method for rapidly positioning of the light spot image center based on centroid method
CN103325086B (en) A kind of deformation method of the three-dimensional picture based on tetrahedral coordinate system
Zeng et al. A method for stitching remote sensing images with Delaunay triangle feature constraints
Wang et al. Two-stage point cloud super resolution with local interpolation and readjustment via outer-product neural network
CN108010084A (en) A kind of depth camera is rebuild and method, system, the equipment of automatic Calibration
CN102306383A (en) Descriptor constructing method suitable for dense matching of wide baseline image
CN107918926B (en) A kind of digital image magnification method based on quadrangle and triangle surface
US6384835B1 (en) Computer generated paint stamp compensation
CN110310225B (en) Novel font special effect rendering method

Legal Events

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

Granted publication date: 20100901

Termination date: 20150414

EXPY Termination of patent right or utility model