CN102682459B - The interpolation method of key-frame animation curve - Google Patents

The interpolation method of key-frame animation curve Download PDF

Info

Publication number
CN102682459B
CN102682459B CN201110061534.1A CN201110061534A CN102682459B CN 102682459 B CN102682459 B CN 102682459B CN 201110061534 A CN201110061534 A CN 201110061534A CN 102682459 B CN102682459 B CN 102682459B
Authority
CN
China
Prior art keywords
key frame
interpolation
key
linear
frame
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
CN201110061534.1A
Other languages
Chinese (zh)
Other versions
CN102682459A (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.)
China Digital Video Beijing Ltd
Original Assignee
China Digital Video Beijing Ltd
Filing date
Publication date
Application filed by China Digital Video Beijing Ltd filed Critical China Digital Video Beijing Ltd
Priority to CN201110061534.1A priority Critical patent/CN102682459B/en
Publication of CN102682459A publication Critical patent/CN102682459A/en
Application granted granted Critical
Publication of CN102682459B publication Critical patent/CN102682459B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses the interpolation method of key-frame animation curve, including constant interpolation, linear extrapolation and key frame linear extrapolation.Constant interpolation is the interpolation method mark amount by key frame when being judged as constant interpolation, directly uses the numerical value of this key frame to carry out constant interpolation realization;This interpolating method solves the needs needing to keep the numerical value of previous key frame in actual application between two key frames.Linear extrapolation is by when the extrapolation mode mark amount of key frame is judged as linear interpolation, obtains head/tail key frame and its front/rear coordinate to control point, carries out interpolation by calculating linear equation;Key frame linear extrapolation is by obtaining first key frame and the coordinate of second key frame or tail key frame and the coordinate of penultimate key frame, calculates linear equation and carries out interpolation.Both extrapolation methods overcome the single defect of existing extrapolation method a kind of constant extrapolation, have provided the user more selection, have better met the needs of actual application.

Description

The interpolation method of key-frame animation curve
Technical field
The present invention relates to compile editing software and video and audio later stage special effect processing and composite software field, specifically relate to And the interpolation method of key-frame animation curve.
Background technology
Any animation to show motion or change, at least front and back to provide two different key states, and Change and the linking computer of intermediateness can be automatically performed.Frame is the single width image of least unit in animation Picture, is equivalent to each lattice camera lens on cinematographic film, and on the time shaft of animation software, frame shows as one Lattice or a labelling.Represent that the frame of key state is called key frame.The parameter of had an impact picture image is all The parameter of key frame can be become, such as position, the anglec of rotation, the parameter etc. of texture.Keyframe techniques is to calculate In motor-driven picture most basic and use widest method.
Utilizing non-linear volume editing software and video and audio later stage special effect processing and composite software, prepare advertising, During film clips, film etc., it is often necessary to regulation parameters, key frame is set, thus in the time The effect of upper formation one change.Therefore key-frame animation curve is a kind of important and conventional regulating measure. The whether convenient and swift efficiency directly influencing Audio-video Making of key-frame animation curve adjustment.
Article one, key-frame animation curve is made up of, between key frame each key frame and the curve between them According to certain interpolation method forming curves, the curve between key frame can be divided three classes: Bezier, Linearity curve and constant curve, by key frame interpolation method determine, from beginning to end the curve outside key frame by Extrapolation mode determines.The interpolation method of the key-frame animation curve of existing software typically have Bezier and Linear line two kinds.But in actual applications, it is sometimes desirable between two key frames, keep previous pass The numerical value of key frame, at this moment the interpolation of Bezier and linear line can not meet needs.For extrapolation Mode, it is a kind of that existing software typically only has constant interpolation, it is impossible to enough needs meeting reality application.
Summary of the invention
For defect and the needs of actual application of prior art, it is an object of the invention to provide key frame and move The interpolation method of trace, it is achieved key-frame animation curvilinear interpolation and the variation of extrapolation mode, preferably Meet the needs of reality application.
For solving above-mentioned technical problem, the technical solution used in the present invention is as follows:
The interpolation method of key-frame animation curve, including interpolating method and the key frame of key-frame animation curve The extrapolation method of animation curve, it is characterised in that:
Described interpolating method refers to constant interpolation, its method particularly includes: when timeline is played to certain key Time between frame and its next key frame, obtain the interpolating method mark amount of this key frame, if by being somebody's turn to do Mark amount is judged as constant interpolation, then obtain the coordinate figure of this key frame, directly use the number of this key frame Value carries out constant interpolation;
Described extrapolation method includes linear extrapolation and key frame linear extrapolation;The concrete mode carrying out extrapolation is: When timeline be in head and the tail two key frames outside region time, obtain key frame extrapolation mode mark amount, If being judged as linear interpolation by this mark amount, then obtain head/tail key frame front/rear to control point with its Coordinate, calculate linear equation, carry out linear interpolation;If being judged as key frame linear interpolation, then obtain First key frame and the coordinate of second key frame or tail key frame and the coordinate of penultimate key frame, Calculate linear equation, carry out key frame linear interpolation.
Further, interpolation method as above, the abscissa of described key-frame animation curve is the time, Vertical coordinate is the parameter value of special-effect parameter.
Further, interpolation method as above, described forward direction control point and backward control point refer to for Control key-frame animation curve is controlled before and after the key frame of the plots changes of key frame end points both sides Point processed.
Further, interpolation method as above, when carrying out linear extrapolation, when timeline closes less than head During the time value of key frame, then obtain first key frame and the coordinate at its forward direction control point, calculate linear equation, Carry out linear interpolation;When timeline is more than the time value of tail key frame, then obtain tail key frame and it The coordinate at backward control point, calculates linear equation, carries out linear interpolation.
Further, interpolation method as above, when carrying out key frame linear interpolation, when timeline is little When the time value of first key frame, then obtain first key frame and the coordinate of second key frame, calculate linear Equation, carries out key frame linear interpolation;When timeline is more than the time value of tail key frame, obtains tail and close Key frame and the coordinate of penultimate key frame, calculate linear equation, carry out key frame linear interpolation.
Further, interpolation method as above, when carrying out linear extrapolation, when key frame is controlled with it When the time value of system point is identical, the numerical value of linear extrapolation is equal with the numerical value of key frame.
Further, interpolation method as above, when carrying out key frame linear extrapolation, if first crucial The time value of the coordinate of frame and the coordinate of second key frame or tail key frame and penultimate key frame Time identical, the value of key frame linear extrapolation is equal with the numerical value of first key frame or tail key frame.
Effect of the invention is that: the present invention is on the basis of existing key-frame animation curvilinear interpolation Yu extrapolation On, it is proposed that new interpolation and extrapolation method, i.e. constant interpolation, linear extrapolation and key frame linear extrapolation. Solved by constant interpolation and actual application needs to keep previous key frame between two key frames The needs of numerical value;Linear extrapolation and key frame linear extrapolation, overcome only a kind of constant of existing extrapolation method The single defect of extrapolation, has provided the user more selection, has better met the needs of actual application.
Accompanying drawing explanation
Fig. 1 is the flow chart being carried out interpolation and extrapolation by interpolation method of the present invention;
Fig. 2 is the flow chart of existing interpolating method;
Fig. 3 is the flow chart of existing extrapolation method;
Fig. 4 is the schematic diagram utilizing the method for the invention to carry out linear extrapolation;
Fig. 5 is the schematic diagram utilizing the method for the invention to carry out key frame linear extrapolation.
Detailed description of the invention
Below by drawings and the specific embodiments, the invention will be further described.
Key frame key-frame animation curve is the curve formed according to certain interpolation method by key frame, closes Curve between key frame can be divided three classes: Bezier, and linearity curve and constant curve, by key frame Interpolation method determine, and head and the tail key frame outside curve determined by extrapolation mode.
In the interpolation method of existing key-frame animation curve, inside it is inserted with bezier curve and linear line Interpolation two kinds, it is a kind of that extrapolation only has constant interpolation.The key frame interpolation method of system default is that Bezier is inserted Value, the extrapolation mode of the key-frame animation curve of system default is constant interpolation
Fig. 2 shows the flow chart of interpolating method in prior art, in carrying out key-frame animation curve When inserting, with the mark amount of an interpolation method on the interface of each key frame, show the mode of interpolation. When timeline is played between certain key frame and its next key frame, first system can obtain this The interpolation method mark amount of key frame, it is judged that its interpolation method, if being judged as Bezier interpolation, then obtains This key frame and its forward direction control point coordinate, and next key frame and its backward control point coordinate, Calculate the equation of Cubic kolmogorov's differential system, carry out the interpolation of Bezier;If being judged as linear interpolation, Then obtain this key frame and the coordinate of next key frame, calculate both linear equation, linearly insert Value.Wherein, control point is the concept in Cubic kolmogorov's differential system, i.e. one Cubic kolmogorov's differential system by One end points, the forward direction control point of this end points, second end points, the backward control point of second end points, The position of totally four points determines.So to totally two control point before and after an end points is total.In the present invention, One key frame is exactly an end points, and it is with front and back to two control point.
Fig. 3 shows the flow chart of extrapolation method in prior art, when timeline is in two keys of head and the tail When region outside frame carries out extrapolation, if timeline is less than the time value of first key frame, then read key frame The first key frame coordinate of animation curve, the parameter values of timeline place time and the numerical value phase of first key frame With, keep constant;If timeline is more than the time value of tail key frame, then read key-frame animation curve Tail key frame coordinate, the parameter values of timeline place time is identical with the numerical value of tail key frame, keep Constant.
For realizing the variation of key-frame animation curvilinear interpolation and extrapolation mode, better meet actual application Needs, the invention provides the interpolation method of key-frame animation curve, including constant interpolation, linearly outside Insert and key frame linear extrapolation.Fig. 1 shows the interpolation by key-frame animation curve of the present invention Method carries out the flow chart of interpolation and extrapolation.When carrying out interpolation, if by reading key frame interpolation side Formula mark amount is judged as constant interpolation, then read the coordinate of key frame, directly use the coordinate figure of key frame Carry out interpolation.So have selected constant interpolation for certain key frame, then this key frame is next crucial with it Parameter values between frame will keep constant.Constant interpolation actually creates a kind of step signal, when Timeline is played to during next key frame to be as the criterion with the numerical value of this key frame, at this moment will produce numerical value Saltus step.
When carrying out extrapolation, first pass through reading key frame extrapolation mode mark amount, if by this mark Amount is judged as linear extrapolation, when carrying out linear extrapolation, when timeline is less than the time value of first key frame, Then obtain first key frame and the coordinate at its forward direction control point, calculate linear equation, carry out linear interpolation; When timeline is more than the time value of tail key frame, then obtain tail key frame and the seat at its backward control point Mark, calculates linear equation, carries out linear interpolation.Fig. 4 shows and utilizes the method to carry out linear extrapolation Schematic diagram.As can be seen from Figure, when timeline is less than the time value of first key frame, obtain first crucial Frame A and the coordinate of its forward direction control point B, it is possible to calculate linear equation, carry out interpolation;In the time When line is more than the time value of tail key frame, then it is retrieved as key frame C and the coordinate of its backward control point D Carry out interpolation.Wherein, it is that the end points with key frame overlaps for first its backward control point of key frame, tail The forward direction control point of key frame is that the end points with key frame overlaps, the backward control point of i.e. first key frame A It is the end points of key frame A, the end points that forward direction control point is key frame C of tail key frame C.For key The front/rear confirmation to position, control point of frame is existing known technology, does not repeats them here.
In linear extrapolation procedure, when key frame is identical with the time value at its control point, they are set up The slope of linear equation by infinity, for this special circumstances, system will make the numerical value of extrapolation with The numerical value of key frame is equal.
If being judged as key frame linear extrapolation by extrapolation mode mark amount, carry out key frame linearly outside When inserting, when timeline is less than the time value of first key frame, then obtain first key frame and second key frame Coordinate, calculate linear equation, carry out key frame linear interpolation;When timeline is more than tail key frame Between value time, then obtain tail key frame and the coordinate of penultimate key frame, calculate linear equation, carry out Key frame linear interpolation.Fig. 5 shows the schematic diagram utilizing the method to carry out key frame linear extrapolation.By It can be seen that when timeline is less than the time value of first key frame in figure, by obtain first key frame E and The coordinate of second key frame F, so that it may calculate linear equation, carry out interpolation;Close more than tail at timeline During the time value of key frame, then obtain tail key frame G and the coordinate of key frame H second from the bottom, carry out key Frame linearity interpolation.
Equally, in key frame linear extrapolation, when the time value of two key frames is identical, they are set up The slope of linear equation by infinity, for this special circumstances, system will make the numerical value of extrapolation with The numerical value of first (tail) key frame is equal.
Wherein, it is an enumeration type variable that inside/outside inserts mode mark amount, by this enumerated variable just Can be with Distinguish, the realization of this mark amount can have various ways.
For by calculating linear equation, carrying out the linear extrapolation of linear extrapolation and key frame, linear equation It is prior art, is defined as y=f (x), f and has the property that
F (x+y)=f (x)+f (y);
F (ax)=af (x);Wherein, a is arbitrary constant.
For the present invention, during with timeline less than the time value of first key frame, obtain first key frame and The coordinate at its forward direction control point, calculates linear equation, as a example by carrying out linear interpolation head key frame, and its meter Calculation equation is (y1-y0)/(x1-x0)=(y0-y2)/(x0-x2);
Wherein, for linear interpolation x0, y0The transverse and longitudinal coordinate of key frame, x headed by Fen Bie1, y1It is respectively The transverse and longitudinal coordinate at the forward direction control point of first key frame, x2, y2It is respectively the transverse and longitudinal coordinate of extrapolation point;
For key frame linear interpolation x0, y0The transverse and longitudinal coordinate of key frame, x headed by Fen Bie1, y1It is respectively The transverse and longitudinal coordinate of second key frame, x2, y2It is respectively the transverse and longitudinal coordinate of extrapolation point.
Obviously, those skilled in the art can carry out various change and modification without deviating from this to the present invention The spirit and scope of invention.So, if these amendments of the present invention and modification belong to right of the present invention and want Ask and within the scope of equivalent technology, then the present invention is also intended to comprise these change and modification.

Claims (7)

1. the interpolation method of key-frame animation curve, including interpolating method and the key of key-frame animation curve The extrapolation method of frame animation curve, it is characterised in that:
Described interpolating method refers to constant interpolation, its method particularly includes: when timeline is played to certain key Time between frame and its next key frame, obtain the interpolation method mark amount of this key frame, if by being somebody's turn to do Mark amount is judged as constant interpolation, then obtain the coordinate figure of this key frame, directly use the seat of this key frame Scale value carries out constant interpolation;
Described extrapolation method includes linear extrapolation and key frame linear extrapolation;The concrete mode carrying out extrapolation is: When timeline be in head and the tail two key frames outside region time, obtain key frame extrapolation mode mark amount, If being judged as linear interpolation by this mark amount, then obtain head/tail key frame front/rear to control point with its Coordinate, calculate linear equation, carry out linear interpolation;If being judged as key frame linear interpolation, then obtain First key frame and the coordinate of second key frame or tail key frame and the coordinate of penultimate key frame, Calculate linear equation, carry out key frame linear interpolation.
2. interpolation method as claimed in claim 1, it is characterised in that: described key-frame animation curve Abscissa is the time, and vertical coordinate is the parameter value of special-effect parameter.
3. interpolation method as claimed in claim 1, it is characterised in that: described forward direction control point and backward Control point refers to for controlling the plots changes of key frame end points both sides in key-frame animation curve Control point before and after key frame.
4. interpolation method as claimed in claim 1, it is characterised in that: when carrying out linear extrapolation, when When timeline is less than the time value of first key frame, then obtain first key frame and the coordinate at its forward direction control point, Calculate linear equation, carry out linear interpolation;When timeline is more than the time value of tail key frame, then obtain Tail key frame and the coordinate at its backward control point, calculate linear equation, carry out linear interpolation.
5. interpolation method as claimed in claim 1, it is characterised in that: carrying out key frame linear interpolation Time, when timeline is less than the time value of first key frame, then obtain first key frame and second key frame Coordinate, calculates linear equation, carries out key frame linear interpolation;When timeline is more than the time of tail key frame During value, then obtain tail key frame and the coordinate of penultimate key frame, calculate linear equation, close Key frame linearity interpolation.
6. interpolation method as claimed in claim 1 or 2, it is characterised in that: when carrying out linear extrapolation, When key frame is identical with the time value at its control point, the numerical value of linear extrapolation is equal with the numerical value of key frame.
7. the interpolation method as described in claim 1 or 3, it is characterised in that: carrying out, key frame is linear During extrapolation, if first key frame and the coordinate of second key frame or tail key frame and penultimate are crucial When the time value of the coordinate of frame is identical, the value of key frame linear extrapolation and first key frame or tail key frame Numerical value is equal.
CN201110061534.1A 2011-03-15 The interpolation method of key-frame animation curve Expired - Fee Related CN102682459B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110061534.1A CN102682459B (en) 2011-03-15 The interpolation method of key-frame animation curve

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110061534.1A CN102682459B (en) 2011-03-15 The interpolation method of key-frame animation curve

Publications (2)

Publication Number Publication Date
CN102682459A CN102682459A (en) 2012-09-19
CN102682459B true CN102682459B (en) 2016-12-14

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6115053A (en) * 1994-08-02 2000-09-05 New York University Computer animation method and system for synthesizing human-like gestures and actions
CN101436310A (en) * 2008-11-28 2009-05-20 牡丹江新闻传媒集团有限公司 Method for automatically generating middle frame during two-dimension cartoon making process
CN101964116A (en) * 2009-07-24 2011-02-02 迪士尼企业公司 In compact the inserting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6115053A (en) * 1994-08-02 2000-09-05 New York University Computer animation method and system for synthesizing human-like gestures and actions
CN101436310A (en) * 2008-11-28 2009-05-20 牡丹江新闻传媒集团有限公司 Method for automatically generating middle frame during two-dimension cartoon making process
CN101964116A (en) * 2009-07-24 2011-02-02 迪士尼企业公司 In compact the inserting

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
插值算法;飞舞的翔羽;《百度文库http://wenku.baidu.com/view /94bff12f0066f5335a812162.html?from=search&qq-pf-to=pcqq.c2c》;20100624;第1页 *

Similar Documents

Publication Publication Date Title
US6115051A (en) Arc-length reparameterization
US8717390B2 (en) Art-directable retargeting for streaming video
US8872850B2 (en) Juxtaposing still and dynamic imagery for cliplet creation
US20150213836A1 (en) Apparatus and method for editing
US9014544B2 (en) User interface for retiming in a media authoring tool
US9030533B2 (en) Stereoscopic overlay offset creation and editing
US8373802B1 (en) Art-directable retargeting for streaming video
CN102224545B (en) The video of similar events and tableaux are based on the merging of the global motion vector of this video
US7420574B2 (en) Shape morphing control and manipulation
US8675009B2 (en) Keying an image in three dimensions
KR20120037400A (en) Viewer-centric user interface for stereoscopic cinema
US20190378318A1 (en) Adding motion effects to digital still images
CN110248132B (en) Video frame rate interpolation method
TW200839647A (en) In-scene editing of image sequences
Vanderhaeghe et al. Dynamic point distribution for stroke-based rendering
WO2022142081A1 (en) Self-defined animation curve generation method and apparatus
AU2007202098B2 (en) 2D/3D Post production integration platform
CN102682459B (en) The interpolation method of key-frame animation curve
EP3249609B1 (en) Computer-implemented method and system for processing video with temporal consistency
US20140125778A1 (en) System for producing stereoscopic images with a hole filling algorithm and method thereof
JP2014016670A (en) Image processing device and image processing program
US9330434B1 (en) Art-directable retargeting for streaming video
CN102682459A (en) Method for interpolating keyframe animation curve
US9117486B2 (en) Image output apparatus, method of controlling image output apparatus, and program
Van Haevre et al. Uniting cartoon textures with computer assisted animation

Legal Events

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

Granted publication date: 20161214

Termination date: 20180315