WO2017128893A1 - Keyframe animation creation device and method - Google Patents

Keyframe animation creation device and method Download PDF

Info

Publication number
WO2017128893A1
WO2017128893A1 PCT/CN2016/111479 CN2016111479W WO2017128893A1 WO 2017128893 A1 WO2017128893 A1 WO 2017128893A1 CN 2016111479 W CN2016111479 W CN 2016111479W WO 2017128893 A1 WO2017128893 A1 WO 2017128893A1
Authority
WO
WIPO (PCT)
Prior art keywords
time interpolator
nonlinear
time
model
interpolator model
Prior art date
Application number
PCT/CN2016/111479
Other languages
French (fr)
Chinese (zh)
Inventor
马登富
Original Assignee
努比亚技术有限公司
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 努比亚技术有限公司 filed Critical 努比亚技术有限公司
Publication of WO2017128893A1 publication Critical patent/WO2017128893A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • H04N19/31Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability in the temporal domain
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/587Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal sub-sampling or interpolation, e.g. decimation or subsequent interpolation of pictures in a video sequence

Definitions

  • the present application relates to, but is not limited to, the field of animation processing, and in particular, to a device and method for generating key frame animation.
  • the key frame refers to the frame in which the object changes in motion state, by setting nonlinearity between two key frames.
  • the interpolator combines two keyframes to create a smooth animation.
  • the key frame animation generated now due to the non-linear interpolator set between the key frames, may cause the generated animation to be skipped smoothly; and the current technology, the key frame animation is generated by Manually write code to splicing property animations between each two keyframes. If there are N keyframes, you need to set N-1 property animations. For example, when the keyframe is 3 frames, this includes two For a non-linear interpolator, you need to use a property animation for each of the two keyframes separately, and then stitch the two property animations to generate a keyframe animation.
  • setting the attribute animation between each two key frames is not only complicated, but also the animation generated by the stitched key frames is poorly read, and the generated key frame animation is not smooth enough.
  • the embodiment of the invention provides a device and a method for generating a key frame animation, which aims to solve the technical problem that the key frame animation is generated and the generated key frame animation is not smooth enough.
  • An acquisition module configured to acquire a nonlinear time interpolator model between two adjacent key frames upon receiving a generation instruction of a key frame animation
  • a scaling module configured to scale the obtained nonlinear time interpolator model according to a preset ratio to obtain a time interpolator model associated with two adjacent key frames, wherein the scaling manner includes a nonlinear time interpolator
  • the attribute values are scaled such that the attribute values of the non-linear time interpolator boundary are the same as the attribute values of adjacent non-linear time interpolator boundaries;
  • An interpolation module configured to interpolate two adjacent key frames according to the associated time interpolator model to generate a key frame animation.
  • the scaling module includes:
  • the acquiring sub-module is further configured to acquire the first preset time point and the second preset time point corresponding to the non-linear time interpolator model in the preset time interval;
  • a calculation sub-module configured to calculate, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval;
  • a scaling submodule configured to scale the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  • the scaling submodule includes:
  • An obtaining unit configured to acquire an abscissa and an ordinate of each point in the nonlinear time interpolator model
  • a multiplying unit configured to multiply the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model
  • a processing unit configured to process the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames.
  • the processing unit is configured to update a starting time point of the non-linear time interpolator model according to the first preset time point, and update the non-according according to the second preset time point
  • the end time point of the linear time interpolator model is obtained as a time interpolator model associated with two adjacent key frames.
  • the key frame animation generating apparatus further includes: a binding module configured to perform a time interpolator model associated with two of the key frames and two adjacent the key frames Bind.
  • the calculation submodule is configured to calculate a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval by:
  • the embodiment of the present invention further provides a method for generating a key frame animation, and the method for generating the key frame animation includes the following steps:
  • the obtained nonlinear time interpolator model is scaled according to a preset ratio, and a time interpolator model associated with two adjacent key frames is obtained, wherein the scaling manner includes scaling the attribute value of the nonlinear time interpolator So that the attribute value of the boundary of the nonlinear time interpolator is the same as the attribute value of the boundary of the adjacent nonlinear time interpolator;
  • Two adjacent key frames are interpolated according to the associated time interpolator model to generate a key frame animation.
  • the step of scaling the acquired nonlinear time interpolator model according to a preset ratio to obtain a time interpolator model associated with two adjacent key frames includes:
  • the nonlinear time interpolator model is scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  • the step of scaling the non-linear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames includes:
  • the scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
  • the step of processing the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames includes:
  • the key frame After the step of scaling the acquired nonlinear time interpolator model according to a preset ratio to obtain a time interpolator model associated with two adjacent key frames, the key frame
  • the animation generation method also includes:
  • the time interpolator model associated with the two key frames is bound to two adjacent key frames.
  • the calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval include:
  • An embodiment of the present invention further provides a key frame animation generating apparatus, including: a memory and a processor; the memory configured to store a program for generating a key frame animation; the program for generating a key frame animation is processed When the reader reads execution, do the following:
  • the attribute values of the device boundary are the same; according to the associated time
  • the interpolator model interpolates two adjacent keyframes to generate a keyframe animation.
  • the time-interpolator model of the two adjacent key frames is obtained by scaling the acquired time-interpolator model according to the preset ratio, which may include:
  • Obtaining a nonlinear time interpolator model between two adjacent key frames acquiring a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in a preset time interval; Calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the time interval; and the nonlinear time interpolator model according to the The ratio is scaled to obtain a time interpolator model associated with two adjacent key frames.
  • the method for scaling the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames may include:
  • the method of processing the scaled non-linear time interpolator model to obtain a time interpolator model associated with two adjacent key frames may include:
  • the program for generating a key frame animation may also perform the following operations when the processor reads and executes: binding the time interpolator model associated with the two key frames to two adjacent key frames. set.
  • the calculating the ratio of the duration of the non-linear time interpolator model to the preset time interval according to the first preset time point and the second preset time point may include:
  • the device for generating a key frame animation may further include: a user input unit configured to receive a generation instruction of the key frame animation.
  • the embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the above-described key frame animation generating apparatus.
  • the apparatus and method for generating a key frame animation comprise: an acquisition module, a scaling module, and an interpolation module.
  • the acquiring module acquires between two adjacent key frames.
  • the scaling module scales the obtained nonlinear time interpolator model according to a preset ratio, and obtains a time interpolator model associated with two adjacent key frames, wherein the scaling mode
  • the interpolation module is based on the association
  • the time interpolator model interpolates two adjacent keyframes to generate keyframe animations, instead of generating keyframe animations, only by manually writing code, using one property animation for each of the two keyframes, and then Splicing two property animations.
  • the attribute value of the non-linear time interpolator is scaled so that the boundary value of the non-linear time interpolator is the same as the attribute value of the adjacent non-linear time interpolator, and finally the smooth key is generated.
  • Frame animation The embodiment of the invention does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves the fluency of key frame animation generation.
  • FIG. 1 is a schematic structural diagram of hardware of an exemplary mobile terminal embodying an embodiment of the present invention
  • FIG. 2 is a schematic diagram of functional modules of a first embodiment of a key frame animation generating apparatus of the present application
  • FIG. 3 is a schematic diagram of a nonlinear time interpolator model according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a nonlinear time interpolator model between two key frames when a conventional key frame animation is generated
  • FIG. 5 is a schematic diagram of a time interpolator model associated with two key frames when the key frame animation of the present application is generated;
  • FIG. 6 is a schematic diagram of a refinement function module of the zoom module in FIG. 2;
  • FIG. 7 is a schematic diagram of a refinement function module of the scaling submodule in FIG. 6;
  • FIG. 8 is a schematic diagram of functional modules of a second embodiment of a key frame animation generating apparatus of the present application.
  • FIG. 9 is a schematic flowchart of a first embodiment of a method for generating a key frame animation according to the present application.
  • FIG. 10 is a schematic flowchart of an exemplary embodiment of a time interpolator model obtained by scaling the obtained nonlinear time interpolator model according to a preset ratio according to a preset ratio;
  • FIG. 11 is a schematic flowchart diagram of an exemplary embodiment of a time interpolator model in which the nonlinear time interpolator model is scaled according to the ratio to obtain two adjacent key frames;
  • FIG. 12 is a schematic flowchart diagram of a second embodiment of a method for generating a key frame animation according to the present application.
  • the mobile terminal can be implemented in various forms.
  • the terminal described in the embodiments of the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet), a PMP (Portable Multimedia Player), a navigation device Mobile terminals of the like and fixed terminals such as digital TVs, desktop computers, and the like.
  • PDA Personal Digital Assistant
  • PAD Tablett
  • PMP Portable Multimedia Player
  • FIG. 1 is a schematic diagram showing the hardware structure of an exemplary mobile terminal embodying an embodiment of the present invention.
  • the mobile terminal 100 may include a wireless communication unit 110, an A/V (Audio/Video) input unit 120, The user input unit 130, the sensing unit 140, the output unit 150, the memory 160, the interface unit 170, the controller 180, the power supply unit 190, and the like.
  • Figure 1 illustrates a mobile terminal having various components, but it should be understood that not all illustrated components are required to be implemented. More or fewer components can be implemented instead. The elements of the mobile terminal will be described in detail below.
  • Wireless communication unit 110 typically includes one or more components that permit radio communication between mobile terminal 100 and a wireless communication device or network.
  • the A/V input unit 120 is for receiving an audio or video signal.
  • the user input unit 130 may generate key input data according to a command input by the user to control various operations of the mobile terminal.
  • the user input unit 130 allows the user to input various types of information, and may include a keyboard, a pot, a touch pad (eg, a touch sensitive component that detects changes in resistance, pressure, capacitance, etc. due to contact), a scroll wheel , rocker, etc.
  • a touch screen can be formed.
  • the sensing unit 140 detects the current state of the mobile terminal 100 (eg, the open or closed state of the mobile terminal 100), the location of the mobile terminal 100, the presence or absence of contact (ie, touch input) by the user with the mobile terminal 100, and the mobile terminal.
  • the sensing unit 140 can sense whether the slide type phone is turned on or off.
  • the sensing unit 140 can detect whether the power supply unit 190 provides power or whether the interface unit 170 is coupled to an external device.
  • the interface unit 170 serves as an interface through which at least one external device can connect with the mobile terminal 100.
  • the external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, and an audio input/output. (I/O) port, video I/O port, headphone port, and more.
  • the identification module may be stored to verify various information used by the user using the mobile terminal 100 and may include a User Identification Module (UIM), a Customer Identification Module (SIM), a Universal Customer Identity Module (USIM), and the like.
  • the device having the identification module may take the form of a smart card, and thus the identification device may be connected to the mobile terminal 100 via a port or other connection device.
  • the interface unit 170 can be configured to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more components within the mobile terminal 100 or can be used to move Data is transferred between the mobile terminal and an external device.
  • the interface unit 170 may function as a path through which power is supplied from the base to the mobile terminal 100 or may be used as a transmission of various command signals allowing input from the base to the mobile terminal 100 The path to the terminal.
  • Various command signals or power input from the base can be used as signals for identifying whether the mobile terminal is accurately mounted on the base.
  • Output unit 150 is configured to provide an output signal (eg, an audio signal, a video signal, an alarm signal, a vibration signal, etc.) in a visual, audio, and/or tactile manner.
  • the output unit 150 may include a display unit 151.
  • the display unit 151 can display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 can display a user interface (UI) or a graphical user interface (GUI) related to a call or other communication (eg, text messaging, multimedia file download, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or image and related functions, and the like.
  • UI user interface
  • GUI graphical user interface
  • the display unit 151 can function as an input device and an output device.
  • the display unit 151 may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like.
  • LCD liquid crystal display
  • TFT-LCD thin film transistor LCD
  • OLED organic light emitting diode
  • a flexible display a three-dimensional (3D) display, and the like.
  • 3D three-dimensional
  • Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as a transparent display, and a typical transparent display may be, for example, a TOLED (Transparent Organic Light Emitting Diode) display or the like.
  • TOLED Transparent Organic Light Emitting Diode
  • the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown) .
  • the touch screen can be used to detect touch input pressure as well as touch input position and touch input area.
  • the memory 160 may store a software program or the like that performs processing and control operations performed by the controller 180, or may temporarily store data (for example, a phone book, a message, a still image, a video, and the like) that has been output or is to be output. Moreover, the memory 160 can store data regarding vibrations and audio signals of various manners that are output when a touch is applied to the touch screen.
  • the memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), random access storage. (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. .
  • the mobile terminal 100 can cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
  • the controller 180 typically controls the overall operation of the mobile terminal. For example, the controller 180 performs the control and processing associated with voice calls, data communications, video calls, and the like.
  • the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, which may be constructed within the controller 180 or may be configured to be separate from the controller 180.
  • the controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
  • the power supply unit 190 receives external power or internal power under the control of the controller 180 and provides appropriate power required to operate the various components and components.
  • the various embodiments described herein can be implemented in a computer readable medium using, for example, computer software, hardware, or any combination thereof.
  • the embodiments described herein may be through the use of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays ( An FPGA, a processor, a controller, a microcontroller, a microprocessor, at least one of the electronic units designed to perform the functions described herein, in some cases, such an embodiment may be at the controller 180 Implemented in the middle.
  • implementations such as procedures or functions may be implemented with separate software modules that permit the execution of at least one function or operation.
  • the software code can be implemented by a software application (or program) written in any suitable programming language, which can be stored in memory 160 and executed by
  • the mobile terminal has been described in terms of its function.
  • a slide type mobile terminal among various types of mobile terminals such as a folding type, a bar type, a swing type, a slide type mobile terminal, and the like will be described as an example. Therefore, the embodiment of the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
  • FIG. 2 is a function of a first embodiment of a key frame animation generating apparatus of the present application. Module schematic.
  • the functional block diagram shown in FIG. 2 is merely an exemplary diagram of an embodiment, and those skilled in the art surround the functional modules of the key frame animation generating apparatus shown in FIG. 2,
  • the new functional modules can be easily supplemented; the name of each functional module is a custom name, and is only used to assist in understanding each program function block of the key frame animation generating device, and is not used to limit the technical solution of the present application.
  • the function to be achieved by each functional module of a custom name is the function to be achieved by each functional module of a custom name.
  • the present embodiment provides a device for generating a key frame animation, and the device for generating the key frame animation includes:
  • the obtaining module 10 is configured to acquire a nonlinear time interpolator model between two adjacent key frames when receiving a generation instruction of the key frame animation;
  • the acquiring module 10 acquires a nonlinear time interpolator model between two adjacent key frames, and then analyzes the nonlinear time interpolator model.
  • the time interpolator is used to specify the change rule of an attribute of the animation over time, and the time interval is normalized, and the start value of the time interpolator model can be set to 0, and the end value is set to 1. . Therefore, when acquiring the nonlinear time interpolator model, first look at the source code of the nonlinear time interpolator model between two adjacent key frames. Assuming that there are 3 keyframes now, two nonlinear time interpolator models are needed.
  • the two nonlinear time interpolator models refer to Figure 3, which are the two curves in Figure 3, and the three keyframes at this time, There are three key frames k0, k1 and k2 respectively. For three key frames, reference may be made to FIG. 4.
  • the time point corresponding to the k0 key frame is the origin in the abscissa, and the time point corresponding to the k2 key frame is 1 in the abscissa.
  • a nonlinear time interpolator model Ti1 is set between k0 and k1, and a nonlinear time interpolator model Ti2 is set again for the k1 and k2 time segments.
  • the system will think that the time starting point of Ti1 and Ti2 is k0 and the time ending point is k2, which will cause the system to use nonlinearity when doing animation in the k0 to k1 time period when doing key frame animation.
  • the k0 to k1 time curve of the time interpolator Ti1, and the k1 to k2 time curve of the nonlinear time interpolator Ti2 when animating in the k1 to k2 time period that is, the properties of two nonlinear time interpolators
  • the values at the k1 position are not the same, that is, the curves corresponding to the two non-linear time interpolators are discontinuous at k1, which causes an animation jam and frame skipping.
  • the scaling module 20 is configured to acquire the nonlinear time interpolator model according to a preset ratio pair Performing scaling to obtain a time interpolator model associated with two adjacent key frames, wherein the scaling manner is to scale the attribute values of the nonlinear time interpolator so that the attribute values of the nonlinear time interpolator boundary are The attribute values of adjacent nonlinear time interpolator boundaries are the same.
  • the acquiring module 10 first acquires a nonlinear time interpolator model between any two adjacent key frames, and then the scaling module 20 obtains the nonlinear time interpolator according to a preset ratio pair.
  • the model is scaled to obtain a time interpolator model associated with two adjacent key frames, and the scaling method is to scale the attribute values of the nonlinear time interpolator so that the attribute values of the nonlinear time interpolator boundary are The attribute values of adjacent nonlinear time interpolator boundaries are the same. That is, the attribute values of the nonlinear time interpolator in FIG.
  • the scaling module 20 includes:
  • the obtaining sub-module 21 is configured to acquire a nonlinear time interpolator model between two adjacent key frames
  • three key frames are exemplified, and it is known that two non-linear time interpolators are included.
  • two adjacent key frames are k0 and k1, at this time, k0 key frames.
  • the corresponding time point is a time point where the abscissa is 0.
  • the non-linear interpolator model between the key frames k0 and k1 is a curve close to the ordinate.
  • the acquiring sub-module 21 is further configured to acquire the first preset time point and the second preset time point corresponding to the non-linear time interpolator model in the preset time interval;
  • the acquiring sub-module 21 acquires the corresponding non-linear time interpolator model in a preset time interval.
  • the first preset time point and the second preset time point and similarly referring to FIG. 3, it can be seen that the non-linear time interpolator model has a corresponding first preset time point of 0 in the preset time interval, and the second preset The time point is k1.
  • the calculation sub-module 22 is configured to calculate, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval;
  • the starting time point of the nonlinear time interpolator model is k1, and the end time point is 1, then the nonlinearity
  • the scaling sub-module 23 is configured to scale the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  • the scaling sub-module 23 may scale the nonlinear time interpolator model according to the ratio to obtain the time associated with two adjacent key frames. Interpolator model.
  • the scaling submodule 23 includes:
  • the obtaining unit 231 is configured to acquire an abscissa and an ordinate of each point in the nonlinear time interpolator model
  • the multiplying unit 232 is configured to multiply the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
  • the processing unit 233 is configured to process the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames.
  • the acquiring unit 231 first acquires the abscissa and the ordinate of each point in the nonlinear time interpolator model, and then the multiplying unit 232 respectively sets the abscissa and the vertical of each point. The coordinate is multiplied by the ratio to obtain the scaled nonlinear time interpolator model. Finally, the processing unit 233 processes the scaled nonlinear time interpolator model to obtain two adjacent keys. Frame-associated time interpolator model.
  • processing unit 233 is configured to update a start time point of the nonlinear time interpolator model according to the first preset time point, and update the nonlinear time according to the second preset time point The end time point of the interpolator model, A time interpolator model associated with two adjacent said key frames is obtained.
  • a compressed time interpolator model is obtained, and at this time, the processing unit 233 is updated according to the first preset time point. a start time point of the nonlinear time interpolator model, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point, to obtain an association between two adjacent key frames Time interpolator model.
  • the entire calculation process can be realized by inheriting the TimeInterpolator class of the android system, adding a constructor, and passing in related parameters.
  • the constructor is configured to initialize an object when the object is created, and the incoming related parameter includes a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in the preset time interval.
  • the first preset time point is the start time point k1
  • the second preset time point is the end time point k2
  • the re-introduction time interpolator mInterpolator rewrites the getInterpolation(float input) interface to implement a new
  • the interpolator class KFTimeInterpolator, in the interpolation generation algorithm is equivalent to improving the original interpolator model, and the input interpolator model scales the input and output according to the ratio, as follows:
  • the object KFTi of a new time interpolator KFTimeInterpolator is generated by the start time point k1 of the incoming time interpolator, the end time point k2, and the TimeInterpolator model Ti, and finally the key frames are interpolated according to the newly generated time interpolator model.
  • KFTimeInterpolator is generated by the start time point k1 of the incoming time interpolator, the end time point k2, and the TimeInterpolator model Ti, and finally the key frames are interpolated according to the newly generated time interpolator model.
  • the interpolation module 30 is configured to interpolate two adjacent key frames according to the associated time interpolator model to generate a key frame animation.
  • the interpolation module 30 interpolates two adjacent key frames according to the associated time interpolator model. Generate keyframe animations.
  • the apparatus for generating a key frame animation includes: an obtaining module, a scaling module, and an interpolation module.
  • the acquiring module acquires a nonlinear time between two adjacent key frames.
  • the scaling module scales the obtained nonlinear time interpolator model according to a preset ratio, and obtains a time interpolator model associated with two adjacent key frames, wherein the scaling mode is to interpolate the nonlinear time
  • the attribute value of the device is scaled such that the attribute value of the nonlinear time interpolator boundary is the same as the attribute value of the adjacent nonlinear time interpolator boundary, and the interpolation module according to the associated time interpolator model pairs adjacent two
  • the keyframes are interpolated to generate keyframe animations, rather than when generating keyframe animations, only by manually writing code, using one property animation for each of the two keyframes, and then stitching the two property animations.
  • the attribute value of the non-linear time interpolator is scaled so that the boundary value of the non-linear time interpolator is the same as the attribute value of the adjacent non-linear time interpolator, and finally the smooth key is generated.
  • the embodiment of the present invention does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves the fluency of key frame animation generation.
  • the key frame animation is The generating device further includes:
  • the binding module 40 is configured to bind the time interpolator model associated with the two key frames to two adjacent key frames.
  • the binding module 40 compares the time interpolator model associated with the two key frames with two adjacent key frames. The binding is performed, and finally, according to the binding relationship, the time interpolator model can perform interpolation on the bound key frames to generate an animation.
  • an example application scenario is as follows:
  • the time interpolator model between each two key frames is a nonlinear time interpolator model.
  • the three key frames are k0 (starting frame), K1 (middle a frame), an end frame (k2), a time interpolator (kft1, a curve near the ordinate) between k0 and k1, and a time interpolator (kft2, a curve near the abscissa) between k1 and k2, then After scaling the above-mentioned nonlinear time interpolator according to the ratio, the kft1 and kft2 curves appear as the same value at the time of the key frame k1, and the time interpolator curve of the entire animation is as shown in FIG. 5, the whole animation process. There will be no jumps in the animation, and the animation will be smooth.
  • the method is the same as the key frame including 3 frames, and details are not described herein.
  • the application further provides a method for generating a key frame animation.
  • FIG. 9 is a schematic flowchart diagram of a first embodiment of a method for generating a key frame animation according to the present application.
  • This embodiment provides a method for generating a key frame animation, and the method for generating the key frame animation includes the following steps:
  • Step S10 when receiving the generation instruction of the key frame animation, acquiring a nonlinear time interpolator model between two adjacent key frames;
  • a nonlinear time interpolator model between two adjacent key frames is first acquired, and then the nonlinear time interpolator model is analyzed.
  • the time interpolator is used to specify the change rule of an attribute of the animation over time, and the time interval is normalized, and the start value of the time interpolator model can be set to 0, and the end value is set to 1. . Therefore, when acquiring the nonlinear time interpolator model, first look at the source code of the nonlinear time interpolator model between two adjacent key frames. Assuming that there are 3 keyframes now, two nonlinear time interpolator models are needed.
  • the two nonlinear time interpolator models refer to Figure 3, which are the two curves in Figure 3, and the three keyframes at this time, There are three key frames k0, k1 and k2 respectively. For three key frames, refer to Figure 4.
  • the time point corresponding to the k0 key frame is the origin in the abscissa, and the time point corresponding to the k2 key frame is 1 in the abscissa.
  • a nonlinear time interpolator model Ti1 is set between k0 and k1, and a nonlinear time interpolator model Ti2 is set again for the k1 and k2 time segments.
  • the system will think that the time starting point of Ti1 and Ti2 is k0 and the time ending point is k2, which will cause the system to use nonlinearity when doing animation in the k0 to k1 time period when doing key frame animation.
  • the value of the linear time interpolator's attribute value is different at the k1 position, that is, the curve corresponding to the two non-linear time interpolators is discontinuous at k1, which causes an animation jam and frame skipping phenomenon.
  • Step S20 The obtained nonlinear time interpolator model is scaled according to a preset ratio, and a time interpolator model associated with two adjacent key frames is obtained, wherein the scaling mode includes attributes of the nonlinear time interpolator.
  • the values are scaled such that the attribute values of the non-linear time interpolator boundary are the same as the attribute values of adjacent non-linear time interpolator boundaries;
  • the nonlinear time interpolator model between any two adjacent key frames is first obtained, and then the obtained nonlinear time interpolator model is scaled according to a preset ratio to obtain two adjacent stations.
  • the time interpolator model associated with the key frame is scaled by scaling the attribute values of the nonlinear time interpolator such that the attribute values of the boundary of the nonlinear time interpolator are adjacent to the boundary of the adjacent nonlinear time interpolator
  • the attribute values are the same. That is to say, the attribute value of the nonlinear time interpolator in FIG.
  • the step S20 includes:
  • Step S21 acquiring a nonlinear time interpolator model between two adjacent key frames
  • three key frames are exemplified, and it is known that two non-linear time interpolators are included.
  • two adjacent key frames are k0 and k1, at this time, k0 key frames.
  • the corresponding time point is a time point where the abscissa is 0.
  • the non-linear interpolator model between the key frames k0 and k1 is a curve close to the ordinate.
  • Step S22 acquiring a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in the preset time interval;
  • the nonlinear time interpolator model After acquiring the nonlinear time interpolator model between the two adjacent key frames, acquiring the first preset time point and the second preset time in the preset time interval of the nonlinear time interpolator model Point, similarly referring to FIG. 3, it can be seen that the non-linear time interpolator model has a corresponding first preset time point of 0 in the preset time interval, and the second preset time point is k1.
  • Step S23 calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval;
  • the starting time point of the nonlinear time interpolator model is k1
  • the ending time point is 1
  • the duration of the nonlinear time interpolator model is 1-k1
  • k1 is 0.3
  • the calculation result is 0.7.
  • Step S24 The nonlinear time interpolator model is scaled according to the ratio, and a time interpolator model associated with two adjacent key frames is obtained.
  • the nonlinear time interpolator model may be scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  • the step S24 includes:
  • Step S241 acquiring an abscissa and an ordinate of each point in the nonlinear time interpolator model
  • Step S242 multiplying the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model
  • Step S243 processing the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames.
  • the abscissa and the ordinate of each point in the nonlinear time interpolator model are first acquired, and then the abscissa and the ordinate of each point are respectively multiplied by the ratio to obtain a scaled position.
  • the nonlinear time interpolator model is described.
  • the scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
  • the step S243 may include:
  • a compressed time interpolator model is obtained, and at this time, the nonlinear time is updated according to the first preset time point.
  • the end time point of the nonlinear time interpolator model is updated according to the second preset time point, and a time interpolator model associated with two adjacent key frames is obtained.
  • the entire calculation process can be implemented by inheriting the TimeInterpolator class of the android system, adding a constructor, and passing in related parameters, wherein the constructor is used to initialize the object when the object is created, and the incoming related parameters include the
  • the non-linear time interpolator model corresponds to a first preset time point and a second preset time point in a preset time interval, where the first preset time point is a start time point k1 and a second preset time point is End time point k2, and re-introduction time interpolator mInterpolator, rewrite the getInterpolation(float input) interface to implement a new interpolator class KFTimeInterpolator, which is equivalent to the original interpolator model in the interpolation generation algorithm.
  • the incoming interpolator model is scaled to the input and output according to the ratio, as follows:
  • the object KFTi of a new time interpolator KFTimeInterpolator is generated by the start time point k1 of the incoming time interpolator, the end time point k2, and the TimeInterpolator model Ti, and finally the key frames are interpolated according to the newly generated time interpolator model.
  • KFTimeInterpolator is generated by the start time point k1 of the incoming time interpolator, the end time point k2, and the TimeInterpolator model Ti, and finally the key frames are interpolated according to the newly generated time interpolator model.
  • Step S30 interpolating two adjacent key frames according to the associated time interpolator model to generate a key frame animation.
  • the method for generating a key frame animation first acquires a nonlinear time interpolator model between two adjacent key frames when receiving a key frame animation generation instruction, and then acquires the preset time ratio pair according to a preset ratio.
  • the nonlinear time interpolator model is scaled to obtain a time interpolator model associated with two adjacent key frames, wherein the scaling manner is to scale the attribute values of the nonlinear time interpolator to make the nonlinearity
  • the attribute value of the time interpolator boundary is the same as the attribute value of the adjacent nonlinear time interpolator boundary, and finally the adjacent two key frames are interpolated according to the associated time interpolator model to generate a key frame animation, and Instead of generating keyframe animations, you can only manually write code, use one property animation for each of the two keyframes, and then stitch the two property animations.
  • the attribute value of the nonlinear time interpolator is scaled so that the boundary value of the nonlinear time interpolator is the same as the attribute value of the adjacent nonlinear time interpolator, and finally a smooth key frame is generated.
  • the animation does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves the fluency of key frame animation generation.
  • the method for generating the key frame animation further includes:
  • Step S40 binding the time interpolator model associated with the two key frames to two adjacent key frames.
  • the time interpolator model associated with the two key frames is bound to two adjacent key frames, and finally The bound relationship, the time interpolator model can be used to interpolate the bound keyframes to generate animations.
  • an example application scenario is as follows:
  • the time interpolator model between each two key frames is a nonlinear time interpolator model.
  • the three key frames are k0 (starting frame), K1 (one frame in the middle), end frame (k2), time interpolator between k0 and k1 (kft1, curve near ordinate), time interpolator between k1 and k2 (kft2, curve near the abscissa) ), that After scaling the above-mentioned nonlinear time interpolator according to the ratio, the kft1 and kft2 curves appear as the same value at the time of the key frame k1, and the time interpolator curve of the entire animation is as shown in FIG. 5, the whole animation. There will be no jumps in the process and the animation will be smooth.
  • the method is the same as the key frame including 3 frames, and details are not described herein.
  • an embodiment of the present invention further provides a key frame animation generating apparatus, including: a memory and a processor; the memory configured to store a program for generating a key frame animation; the program for generating a key frame animation is When executed by the processor, do the following:
  • the attribute values of the device boundaries are the same; two adjacent key frames are interpolated according to the associated time interpolator model to generate a key frame animation.
  • the time-interpolator model of the two adjacent key frames is obtained by scaling the acquired time-interpolator model according to the preset ratio, which may include:
  • the nonlinear time interpolator model is scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  • the method for scaling the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames may include:
  • the scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
  • the method of processing the scaled non-linear time interpolator model to obtain a time interpolator model associated with two adjacent key frames may include:
  • the program for generating a key frame animation may also perform the following operations when the processor reads and executes: binding the time interpolator model associated with the two key frames to two adjacent key frames. set.
  • the calculating the ratio of the duration of the non-linear time interpolator model to the preset time interval according to the first preset time point and the second preset time point may include:
  • the device for generating a key frame animation may further include: a user input unit configured to receive a generation instruction of the key frame animation.
  • the memory of this embodiment may be the memory 160 of FIG. 1
  • the processor may be the controller 180 of FIG. 1
  • the user input unit may be the user input unit 130 of FIG.
  • an embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the above-described key frame animation generation method.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
  • the embodiment of the present invention provides a device and a method for generating a key frame animation, which does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves key frame animation generation.
  • the fluency is not only improves the efficiency and intelligence of key frame animation generation, but also improves key frame animation generation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Disclosed are a keyframe animation creation device and method. The keyframe animation creation device comprises: an acquisition module (10) configured to acquire, upon reception of a keyframe animation creation command, a nonlinear temporal interpolator model between two adjacent keyframes; a scaling module (20) configured to perform, according to a preset ratio, scaling on the acquired nonlinear temporal interpolator model to obtain a temporal interpolator model associated with the two adjacent keyframes; and an interpolation module (30) configured to perform, according to the associated temporal interpolator model, interpolation on the two adjacent keyframes to create a keyframe animation.

Description

关键帧动画的生成装置及方法Key frame animation generating device and method 技术领域Technical field
本申请涉及但不限于动画处理领域,尤其涉及一种关键帧动画的生成装置及方法。The present application relates to, but is not limited to, the field of animation processing, and in particular, to a device and method for generating key frame animation.
背景技术Background technique
随着科学技术的发展,动画处理领域的各项技术也日益成熟,在动画处理领域中,关键帧是指物体在运动状态发生变化的那一帧,通过在两个关键帧之间设置非线性插值器以对两个关键帧进行衔接,最终形成流畅动画效果。With the development of science and technology, various technologies in the field of animation processing are becoming more and more mature. In the field of animation processing, the key frame refers to the frame in which the object changes in motion state, by setting nonlinearity between two key frames. The interpolator combines two keyframes to create a smooth animation.
然而,现在生成的关键帧动画,由于在关键帧之间设置的是非线性插值器,导致生成的动画可能出现跳跃不流畅的现象;而且现在的技术,对关键帧动画的生成方式,都是通过人工编写代码,分别对每两个关键帧之间设置属性动画进行拼接,这样有N个关键帧,就需要设置N-1个属性动画,例如,在关键帧为3帧时,此时包括两个非线性插值器,则需要分别对每两个关键帧使用一个属性动画,然后将两个属性动画进行拼接,以生成关键帧动画。然而,对每两个关键帧之间设置属性动画进行拼接,不仅编写的代码复杂,而且拼接的关键帧生成的动画,阅读性较差,生成的关键帧动画不够流畅。However, the key frame animation generated now, due to the non-linear interpolator set between the key frames, may cause the generated animation to be skipped smoothly; and the current technology, the key frame animation is generated by Manually write code to splicing property animations between each two keyframes. If there are N keyframes, you need to set N-1 property animations. For example, when the keyframe is 3 frames, this includes two For a non-linear interpolator, you need to use a property animation for each of the two keyframes separately, and then stitch the two property animations to generate a keyframe animation. However, setting the attribute animation between each two key frames is not only complicated, but also the animation generated by the stitched key frames is poorly read, and the generated key frame animation is not smooth enough.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
本发明实施例提出一种关键帧动画的生成装置及方法,旨在解决关键帧动画的生成方式,生成的关键帧动画不够流畅的技术问题。The embodiment of the invention provides a device and a method for generating a key frame animation, which aims to solve the technical problem that the key frame animation is generated and the generated key frame animation is not smooth enough.
本发明实施例提供的一种关键帧动画的生成装置,所述关键帧动画的生成装置包括:The apparatus for generating a key frame animation provided by the embodiment of the present invention includes:
获取模块,配置为在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型; An acquisition module configured to acquire a nonlinear time interpolator model between two adjacent key frames upon receiving a generation instruction of a key frame animation;
缩放模块,配置为按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;a scaling module configured to scale the obtained nonlinear time interpolator model according to a preset ratio to obtain a time interpolator model associated with two adjacent key frames, wherein the scaling manner includes a nonlinear time interpolator The attribute values are scaled such that the attribute values of the non-linear time interpolator boundary are the same as the attribute values of adjacent non-linear time interpolator boundaries;
插值模块,配置为根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。An interpolation module configured to interpolate two adjacent key frames according to the associated time interpolator model to generate a key frame animation.
在示例性实施方式中,所述缩放模块包括:In an exemplary embodiment, the scaling module includes:
获取子模块,配置为获取相邻两个所述关键帧之间的非线性时间插值器模型;Obtaining a submodule configured to acquire a nonlinear time interpolator model between two adjacent key frames;
所述获取子模块,还配置为获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;The acquiring sub-module is further configured to acquire the first preset time point and the second preset time point corresponding to the non-linear time interpolator model in the preset time interval;
计算子模块,配置为根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值;a calculation sub-module configured to calculate, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval;
缩放子模块,配置为将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。And a scaling submodule configured to scale the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
在示例性实施方式中,所述缩放子模块包括:In an exemplary embodiment, the scaling submodule includes:
获取单元,配置为获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;An obtaining unit configured to acquire an abscissa and an ordinate of each point in the nonlinear time interpolator model;
相乘单元,配置为分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;a multiplying unit configured to multiply the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
处理单元,配置为对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。And a processing unit configured to process the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames.
在示例性实施方式中,所述处理单元配置为根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。In an exemplary embodiment, the processing unit is configured to update a starting time point of the non-linear time interpolator model according to the first preset time point, and update the non-according according to the second preset time point The end time point of the linear time interpolator model is obtained as a time interpolator model associated with two adjacent key frames.
在示例性实施方式中,所述关键帧动画的生成装置还包括:绑定模块,配置为将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行 绑定。In an exemplary embodiment, the key frame animation generating apparatus further includes: a binding module configured to perform a time interpolator model associated with two of the key frames and two adjacent the key frames Bind.
在示例性实施方式中,所述计算子模块,配置为通过以下方式计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值:In an exemplary embodiment, the calculation submodule is configured to calculate a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval by:
计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长;计算所述时长占所述预设时间区间的比值。Calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model; calculating a ratio of the duration to the preset time interval.
此外,本发明实施例还提出一种关键帧动画的生成方法,所述关键帧动画的生成方法包括以下步骤:In addition, the embodiment of the present invention further provides a method for generating a key frame animation, and the method for generating the key frame animation includes the following steps:
在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;Obtaining a nonlinear time interpolator model between two adjacent key frames when receiving a generation instruction of a key frame animation;
按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;The obtained nonlinear time interpolator model is scaled according to a preset ratio, and a time interpolator model associated with two adjacent key frames is obtained, wherein the scaling manner includes scaling the attribute value of the nonlinear time interpolator So that the attribute value of the boundary of the nonlinear time interpolator is the same as the attribute value of the boundary of the adjacent nonlinear time interpolator;
根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。Two adjacent key frames are interpolated according to the associated time interpolator model to generate a key frame animation.
在示例性实施方式中,所述按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的步骤包括:In an exemplary embodiment, the step of scaling the acquired nonlinear time interpolator model according to a preset ratio to obtain a time interpolator model associated with two adjacent key frames includes:
获取相邻两个所述关键帧之间的非线性时间插值器模型;Obtaining a nonlinear time interpolator model between two adjacent said key frames;
获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;Obtaining a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in a preset time interval;
根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述时间区间的比值;Calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the time interval;
将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。The nonlinear time interpolator model is scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
在示例性实施方式中,所述将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的步骤包括: In an exemplary embodiment, the step of scaling the non-linear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames includes:
获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;Obtaining an abscissa and an ordinate of each point in the nonlinear time interpolator model;
分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;Multiplying the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。The scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
在示例性实施方式中,所述对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型的步骤包括:In an exemplary embodiment, the step of processing the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames includes:
根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。Updating a start time point of the nonlinear time interpolator model according to the first preset time point, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point to obtain an adjacent A time interpolator model associated with two of the key frames.
在示例性实施方式中,所述按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的步骤之后,所述关键帧动画的生成方法还包括:In an exemplary embodiment, after the step of scaling the acquired nonlinear time interpolator model according to a preset ratio to obtain a time interpolator model associated with two adjacent key frames, the key frame The animation generation method also includes:
将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。The time interpolator model associated with the two key frames is bound to two adjacent key frames.
在示例性实施方式中,所述根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值,包括:In an exemplary embodiment, the calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval, include:
计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长;计算所述时长占所述预设时间区间的比值。Calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model; calculating a ratio of the duration to the preset time interval.
本发明实施例还提供一种关键帧动画的生成装置,包括:存储器以及处理器;所述存储器,配置为存储用于生成关键帧动画的程序;该用于生成关键帧动画的程序在被处理器读取执行时,执行以下操作:An embodiment of the present invention further provides a key frame animation generating apparatus, including: a memory and a processor; the memory configured to store a program for generating a key frame animation; the program for generating a key frame animation is processed When the reader reads execution, do the following:
在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;根据所述关联的时间 插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。Obtaining a nonlinear time interpolator model between two adjacent key frames when receiving a key frame animation generation instruction; scaling the obtained nonlinear time interpolator model according to a preset ratio to obtain two adjacent a time interpolator model associated with the key frame, wherein the scaling manner comprises scaling an attribute value of the nonlinear time interpolator to interpolate the attribute value of the nonlinear time interpolator boundary with an adjacent nonlinear time The attribute values of the device boundary are the same; according to the associated time The interpolator model interpolates two adjacent keyframes to generate a keyframe animation.
其中,所述按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,可以包括:The time-interpolator model of the two adjacent key frames is obtained by scaling the acquired time-interpolator model according to the preset ratio, which may include:
获取相邻两个所述关键帧之间的非线性时间插值器模型;获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述时间区间的比值;将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。Obtaining a nonlinear time interpolator model between two adjacent key frames; acquiring a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in a preset time interval; Calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the time interval; and the nonlinear time interpolator model according to the The ratio is scaled to obtain a time interpolator model associated with two adjacent key frames.
其中,所述将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,可以包括:The method for scaling the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames may include:
获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。Obtaining the abscissa and the ordinate of each point in the nonlinear time interpolator model; respectively multiplying the abscissa and the ordinate of each point by the ratio, to obtain the scaled nonlinear time interpolator model; The scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
其中,所述对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型,可以包括:The method of processing the scaled non-linear time interpolator model to obtain a time interpolator model associated with two adjacent key frames may include:
根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。Updating a start time point of the nonlinear time interpolator model according to the first preset time point, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point to obtain an adjacent A time interpolator model associated with two of the key frames.
其中,该用于生成关键帧动画的程序在被处理器读取执行时,还可以执行以下操作:将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。The program for generating a key frame animation may also perform the following operations when the processor reads and executes: binding the time interpolator model associated with the two key frames to two adjacent key frames. set.
其中,所述根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值,可以包括:The calculating the ratio of the duration of the non-linear time interpolator model to the preset time interval according to the first preset time point and the second preset time point may include:
计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长;计算所述时长占所述预设时间区间的比值。Calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model; calculating a ratio of the duration to the preset time interval.
其中,所述关键帧动画的生成装置还可以包括:用户输入单元,配置为接收关键帧动画的生成指令。 The device for generating a key frame animation may further include: a user input unit configured to receive a generation instruction of the key frame animation.
本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述的关键帧动画的生成装置。The embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the above-described key frame animation generating apparatus.
本发明实施例提出的关键帧动画的生成装置及方法,该装置包括:获取模块、缩放模块和插值模块,在接收到关键帧动画的生成指令时,获取模块获取相邻两个关键帧之间的非线性时间插值器模型,缩放模块按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,所述缩放方式为对所述非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同,插值模块根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画,而不是在生成关键帧动画时,只能通过人工编写代码,分别对每两个关键帧使用一个属性动画,然后将两个属性动画进行拼接。本实施例中通过对所述非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器的边界值与相邻的非线性时间插值器的属性值相同,最终生成流畅的关键帧动画。本发明实施例不需要分别对每两个关键帧使用一个属性动画,不仅提高了关键帧动画生成的效率和智能性,而且提高了关键帧动画生成的流畅性。The apparatus and method for generating a key frame animation according to an embodiment of the present invention comprise: an acquisition module, a scaling module, and an interpolation module. When receiving a generation instruction of a key frame animation, the acquiring module acquires between two adjacent key frames. a non-linear time interpolator model, the scaling module scales the obtained nonlinear time interpolator model according to a preset ratio, and obtains a time interpolator model associated with two adjacent key frames, wherein the scaling mode To scale the attribute values of the non-linear time interpolator such that the attribute values of the non-linear time interpolator boundary are the same as the attribute values of adjacent non-linear time interpolator boundaries, the interpolation module is based on the association The time interpolator model interpolates two adjacent keyframes to generate keyframe animations, instead of generating keyframe animations, only by manually writing code, using one property animation for each of the two keyframes, and then Splicing two property animations. In this embodiment, the attribute value of the non-linear time interpolator is scaled so that the boundary value of the non-linear time interpolator is the same as the attribute value of the adjacent non-linear time interpolator, and finally the smooth key is generated. Frame animation. The embodiment of the invention does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves the fluency of key frame animation generation.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1为实现本发明实施例一个示例性的移动终端的硬件结构示意图;1 is a schematic structural diagram of hardware of an exemplary mobile terminal embodying an embodiment of the present invention;
图2为本申请的关键帧动画的生成装置第一实施例的功能模块示意图;2 is a schematic diagram of functional modules of a first embodiment of a key frame animation generating apparatus of the present application;
图3为本发明实施例的非线性时间插值器模型的示意图;3 is a schematic diagram of a nonlinear time interpolator model according to an embodiment of the present invention;
图4为传统的关键帧动画生成时,两个关键帧之间的非线性时间插值器模型的示意图;4 is a schematic diagram of a nonlinear time interpolator model between two key frames when a conventional key frame animation is generated;
图5为本申请的关键帧动画生成时,两个关键帧关联的时间插值器模型的示意图;5 is a schematic diagram of a time interpolator model associated with two key frames when the key frame animation of the present application is generated;
图6为图2中缩放模块的细化功能模块示意图; 6 is a schematic diagram of a refinement function module of the zoom module in FIG. 2;
图7为图6中缩放子模块的细化功能模块示意图;7 is a schematic diagram of a refinement function module of the scaling submodule in FIG. 6;
图8为本申请的关键帧动画的生成装置第二实施例的功能模块示意图;8 is a schematic diagram of functional modules of a second embodiment of a key frame animation generating apparatus of the present application;
图9为本申请的关键帧动画的生成方法第一实施例的流程示意图;9 is a schematic flowchart of a first embodiment of a method for generating a key frame animation according to the present application;
图10为本申请的按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的示例性实施例的流程示意图;10 is a schematic flowchart of an exemplary embodiment of a time interpolator model obtained by scaling the obtained nonlinear time interpolator model according to a preset ratio according to a preset ratio;
图11为本申请的将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的示例性实施例的流程示意图;FIG. 11 is a schematic flowchart diagram of an exemplary embodiment of a time interpolator model in which the nonlinear time interpolator model is scaled according to the ratio to obtain two adjacent key frames;
图12为本申请的关键帧动画的生成方法第二实施例的流程示意图。FIG. 12 is a schematic flowchart diagram of a second embodiment of a method for generating a key frame animation according to the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
本发明的实施方式Embodiments of the invention
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
现在将参考附图描述实现本发明实施例的移动终端。在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本申请的说明,其本身并没有特定的意义。因此,“模块”与“部件”可以混合地使用。A mobile terminal embodying an embodiment of the present invention will now be described with reference to the accompanying drawings. In the following description, the use of suffixes such as "module", "component" or "unit" for indicating an element is merely an explanation for facilitating the present application, and does not have a specific meaning per se. Therefore, "module" and "component" can be used in combination.
移动终端可以以各种形式来实施。例如,本发明实施例中描述的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。下面,假设终端是移动终端。然而,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本申请的实施方式的构造也能够应用于固定类型的终端。The mobile terminal can be implemented in various forms. For example, the terminal described in the embodiments of the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet), a PMP (Portable Multimedia Player), a navigation device Mobile terminals of the like and fixed terminals such as digital TVs, desktop computers, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, those skilled in the art will appreciate that configurations in accordance with embodiments of the present application can be applied to fixed type terminals in addition to elements that are specifically for mobile purposes.
图1为实现本发明实施例一个示例性的移动终端的硬件结构示意。FIG. 1 is a schematic diagram showing the hardware structure of an exemplary mobile terminal embodying an embodiment of the present invention.
移动终端100可以包括无线通信单元110、A/V(音频/视频)输入单元120、 用户输入单元130、感测单元140、输出单元150、存储器160、接口单元170、控制器180和电源单元190等等。图1示出了具有各种组件的移动终端,但是应理解的是,并不要求实施所有示出的组件。可以替代地实施更多或更少的组件。将在下面详细描述移动终端的元件。The mobile terminal 100 may include a wireless communication unit 110, an A/V (Audio/Video) input unit 120, The user input unit 130, the sensing unit 140, the output unit 150, the memory 160, the interface unit 170, the controller 180, the power supply unit 190, and the like. Figure 1 illustrates a mobile terminal having various components, but it should be understood that not all illustrated components are required to be implemented. More or fewer components can be implemented instead. The elements of the mobile terminal will be described in detail below.
无线通信单元110通常包括一个或多个组件,其允许移动终端100与无线通信装置或网络之间的无线电通信。 Wireless communication unit 110 typically includes one or more components that permit radio communication between mobile terminal 100 and a wireless communication device or network.
A/V输入单元120用于接收音频或视频信号。The A/V input unit 120 is for receiving an audio or video signal.
用户输入单元130可以根据用户输入的命令生成键输入数据以控制移动终端的各种操作。用户输入单元130允许用户输入各种类型的信息,并且可以包括键盘、锅仔片、触摸板(例如,检测由于被接触而导致的电阻、压力、电容等等的变化的触敏组件)、滚轮、摇杆等等。特别地,当触摸板以层的形式叠加在显示单元151上时,可以形成触摸屏。The user input unit 130 may generate key input data according to a command input by the user to control various operations of the mobile terminal. The user input unit 130 allows the user to input various types of information, and may include a keyboard, a pot, a touch pad (eg, a touch sensitive component that detects changes in resistance, pressure, capacitance, etc. due to contact), a scroll wheel , rocker, etc. In particular, when the touch panel is superimposed on the display unit 151 in the form of a layer, a touch screen can be formed.
感测单元140检测移动终端100的当前状态,(例如,移动终端100的打开或关闭状态)、移动终端100的位置、用户对于移动终端100的接触(即,触摸输入)的有无、移动终端100的取向、移动终端100的加速或将速移动和方向等等,并且生成用于控制移动终端100的操作的命令或信号。例如,当移动终端100实施为滑动型移动电话时,感测单元140可以感测该滑动型电话是打开还是关闭。另外,感测单元140能够检测电源单元190是否提供电力或者接口单元170是否与外部装置耦接。The sensing unit 140 detects the current state of the mobile terminal 100 (eg, the open or closed state of the mobile terminal 100), the location of the mobile terminal 100, the presence or absence of contact (ie, touch input) by the user with the mobile terminal 100, and the mobile terminal. The orientation of 100, the acceleration of the mobile terminal 100 or the speed of movement and direction, and the like, and generates a command or signal for controlling the operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide type mobile phone, the sensing unit 140 can sense whether the slide type phone is turned on or off. In addition, the sensing unit 140 can detect whether the power supply unit 190 provides power or whether the interface unit 170 is coupled to an external device.
接口单元170用作至少一个外部装置与移动终端100连接可以通过的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。识别模块可以是存储用于验证用户使用移动终端100的各种信息并且可以包括用户识别模块(UIM)、客户识别模块(SIM)、通用客户识别模块(USIM)等等。另外,具有识别模块的装置(下面称为“识别装置”)可以采取智能卡的形式,因此,识别装置可以经由端口或其它连接装置与移动终端100连接。接口单元170可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端100内的一个或多个元件或者可以用于在移 动终端和外部装置之间传输数据。The interface unit 170 serves as an interface through which at least one external device can connect with the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, and an audio input/output. (I/O) port, video I/O port, headphone port, and more. The identification module may be stored to verify various information used by the user using the mobile terminal 100 and may include a User Identification Module (UIM), a Customer Identification Module (SIM), a Universal Customer Identity Module (USIM), and the like. In addition, the device having the identification module (hereinafter referred to as "identification device") may take the form of a smart card, and thus the identification device may be connected to the mobile terminal 100 via a port or other connection device. The interface unit 170 can be configured to receive input (eg, data information, power, etc.) from an external device and transmit the received input to one or more components within the mobile terminal 100 or can be used to move Data is transferred between the mobile terminal and an external device.
另外,当移动终端100与外部底座连接时,接口单元170可以用作允许通过其将电力从底座提供到移动终端100的路径或者可以用作允许从底座输入的各种命令信号通过其传输到移动终端的路径。从底座输入的各种命令信号或电力可以用作用于识别移动终端是否准确地安装在底座上的信号。输出单元150被构造为以视觉、音频和/或触觉方式提供输出信号(例如,音频信号、视频信号、警报信号、振动信号等等)。输出单元150可以包括显示单元151。In addition, when the mobile terminal 100 is connected to the external base, the interface unit 170 may function as a path through which power is supplied from the base to the mobile terminal 100 or may be used as a transmission of various command signals allowing input from the base to the mobile terminal 100 The path to the terminal. Various command signals or power input from the base can be used as signals for identifying whether the mobile terminal is accurately mounted on the base. Output unit 150 is configured to provide an output signal (eg, an audio signal, a video signal, an alarm signal, a vibration signal, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151.
显示单元151可以显示在移动终端100中处理的信息。例如,当移动终端100处于电话通话模式时,显示单元151可以显示与通话或其它通信(例如,文本消息收发、多媒体文件下载等等)相关的用户界面(UI)或图形用户界面(GUI)。当移动终端100处于视频通话模式或者图像捕获模式时,显示单元151可以显示捕获的图像和/或接收的图像、示出视频或图像以及相关功能的UI或GUI等等。The display unit 151 can display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 can display a user interface (UI) or a graphical user interface (GUI) related to a call or other communication (eg, text messaging, multimedia file download, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or image and related functions, and the like.
同时,当显示单元151和触摸板以层的形式彼此叠加以形成触摸屏时,显示单元151可以用作输入装置和输出装置。显示单元151可以包括液晶显示器(LCD)、薄膜晶体管LCD(TFT-LCD)、有机发光二极管(OLED)显示器、柔性显示器、三维(3D)显示器等等中的至少一种。这些显示器中的一些可以被构造为透明状以允许用户从外部观看,这可以称为透明显示器,典型的透明显示器可以例如为TOLED(透明有机发光二极管)显示器等等。根据特定想要的实施方式,移动终端100可以包括两个或更多显示单元(或其它显示装置),例如,移动终端可以包括外部显示单元(未示出)和内部显示单元(未示出)。触摸屏可用于检测触摸输入压力以及触摸输入位置和触摸输入面积。Meanwhile, when the display unit 151 and the touch panel are superposed on each other in the form of a layer to form a touch screen, the display unit 151 can function as an input device and an output device. The display unit 151 may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as a transparent display, and a typical transparent display may be, for example, a TOLED (Transparent Organic Light Emitting Diode) display or the like. According to a particular desired embodiment, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown) . The touch screen can be used to detect touch input pressure as well as touch input position and touch input area.
存储器160可以存储由控制器180执行的处理和控制操作的软件程序等等,或者可以暂时地存储已经输出或将要输出的数据(例如,电话簿、消息、静态图像、视频等等)。而且,存储器160可以存储关于当触摸施加到触摸屏时输出的各种方式的振动和音频信号的数据。The memory 160 may store a software program or the like that performs processing and control operations performed by the controller 180, or may temporarily store data (for example, a phone book, a message, a still image, a video, and the like) that has been output or is to be output. Moreover, the memory 160 can store data regarding vibrations and audio signals of various manners that are output when a touch is applied to the touch screen.
存储器160可以包括至少一种类型的存储介质,所述存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储 器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。而且,移动终端100可以与通过网络连接执行存储器160的存储功能的网络存储装置协作。The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), random access storage. (RAM), static random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. . Moreover, the mobile terminal 100 can cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
控制器180通常控制移动终端的总体操作。例如,控制器180执行与语音通话、数据通信、视频通话等等相关的控制和处理。另外,控制器180可以包括用于再现(或回放)多媒体数据的多媒体模块181,多媒体模块181可以构造在控制器180内,或者可以构造为与控制器180分离。控制器180可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。The controller 180 typically controls the overall operation of the mobile terminal. For example, the controller 180 performs the control and processing associated with voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, which may be constructed within the controller 180 or may be configured to be separate from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
电源单元190在控制器180的控制下接收外部电力或内部电力并且提供操作各元件和组件所需的适当的电力。The power supply unit 190 receives external power or internal power under the control of the controller 180 and provides appropriate power required to operate the various components and components.
这里描述的各种实施方式可以以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,这里描述的实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施,在一些情况下,这样的实施方式可以在控制器180中实施。对于软件实施,诸如过程或功能的实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器160中并且由控制器180执行。The various embodiments described herein can be implemented in a computer readable medium using, for example, computer software, hardware, or any combination thereof. For hardware implementations, the embodiments described herein may be through the use of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays ( An FPGA, a processor, a controller, a microcontroller, a microprocessor, at least one of the electronic units designed to perform the functions described herein, in some cases, such an embodiment may be at the controller 180 Implemented in the middle. For software implementations, implementations such as procedures or functions may be implemented with separate software modules that permit the execution of at least one function or operation. The software code can be implemented by a software application (or program) written in any suitable programming language, which can be stored in memory 160 and executed by controller 180.
至此,已经按照其功能描述了移动终端。下面,为了简要起见,将描述诸如折叠型、直板型、摆动型、滑动型移动终端等等的各种类型的移动终端中的滑动型移动终端作为示例。因此,本发明实施例能够应用于任何类型的移动终端,并且不限于滑动型移动终端。So far, the mobile terminal has been described in terms of its function. Hereinafter, for the sake of brevity, a slide type mobile terminal among various types of mobile terminals such as a folding type, a bar type, a swing type, a slide type mobile terminal, and the like will be described as an example. Therefore, the embodiment of the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
基于上述移动终端硬件结构,提出本申请的关键帧动画的生成装置的实施例。Based on the above-described hardware structure of the mobile terminal, an embodiment of the apparatus for generating a key frame animation of the present application is proposed.
参照图2,图2为本申请的关键帧动画的生成装置的第一实施例的功能 模块示意图。Referring to FIG. 2, FIG. 2 is a function of a first embodiment of a key frame animation generating apparatus of the present application. Module schematic.
需要强调的是,对本领域的技术人员来说,图2所示功能模块图仅仅是一个实施例的示例图,本领域的技术人员围绕图2所示的关键帧动画的生成装置的功能模块,可轻易进行新的功能模块的补充;每个功能模块的名称是自定义名称,仅用于辅助理解关键帧动画的生成装置的每个程序功能块,不用于限定本申请的技术方案,本申请技术方案的核心是,每个自定义名称的功能模块所要达成的功能。It should be emphasized that, for those skilled in the art, the functional block diagram shown in FIG. 2 is merely an exemplary diagram of an embodiment, and those skilled in the art surround the functional modules of the key frame animation generating apparatus shown in FIG. 2, The new functional modules can be easily supplemented; the name of each functional module is a custom name, and is only used to assist in understanding each program function block of the key frame animation generating device, and is not used to limit the technical solution of the present application. At the heart of the technical solution is the function to be achieved by each functional module of a custom name.
本实施例提出一种关键帧动画的生成装置,所述关键帧动画的生成装置包括:The present embodiment provides a device for generating a key frame animation, and the device for generating the key frame animation includes:
获取模块10,配置为在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;The obtaining module 10 is configured to acquire a nonlinear time interpolator model between two adjacent key frames when receiving a generation instruction of the key frame animation;
在本实施例中,所述获取模块10获取相邻两个关键帧之间的非线性时间插值器(TimeInterpolator)模型,然后分析所述非线性时间插值器模型。In this embodiment, the acquiring module 10 acquires a nonlinear time interpolator model between two adjacent key frames, and then analyzes the nonlinear time interpolator model.
可以理解,时间插值器是用来指定动画的某一个属性随着时间的变化规律,并且将时间区间进行归一化,可以将时间插值器模型的起始值设为0,终止值设为1。因此,在获取到所述非线性时间插值器模型时,先查看相邻两个关键帧之间的非线性时间插值器模型的源码。假设现在有3个关键帧,则需要两个非线性时间插值器模型,两个非线性时间插值器模型参照图3,分别是图3中的两条曲线,而此时的三个关键帧,分别为k0、k1和k2三个关键帧,三个关键帧可参照图4,k0关键帧对应的时间点是横坐标中的原点,k2关键帧对应的时间点是横坐标中的1。对k0和k1之间设置一个非线性时间插值器模型Ti1,对k1和k2时间段再次设置一个非线性时间插值器模型Ti2。而此时,系统会认为Ti1、Ti2的时间起始点都为k0,时间终止点为k2,这样就会造成系统在做关键帧动画的时候,在k0到k1时间段内做动画时使用非线性时间插值器Ti1的k0到k1时间的曲线,而k1到k2时间段内做动画时使用非线性时间插值器Ti2的k1到k2时间的曲线,也就是说,两个非线性时间插值器的属性值在k1位置时的值不相同,即两个非线性时间插值器对应的曲线在k1处是不连续的,此时就会造成动画卡顿,跳帧现象。It can be understood that the time interpolator is used to specify the change rule of an attribute of the animation over time, and the time interval is normalized, and the start value of the time interpolator model can be set to 0, and the end value is set to 1. . Therefore, when acquiring the nonlinear time interpolator model, first look at the source code of the nonlinear time interpolator model between two adjacent key frames. Assuming that there are 3 keyframes now, two nonlinear time interpolator models are needed. The two nonlinear time interpolator models refer to Figure 3, which are the two curves in Figure 3, and the three keyframes at this time, There are three key frames k0, k1 and k2 respectively. For three key frames, reference may be made to FIG. 4. The time point corresponding to the k0 key frame is the origin in the abscissa, and the time point corresponding to the k2 key frame is 1 in the abscissa. A nonlinear time interpolator model Ti1 is set between k0 and k1, and a nonlinear time interpolator model Ti2 is set again for the k1 and k2 time segments. At this time, the system will think that the time starting point of Ti1 and Ti2 is k0 and the time ending point is k2, which will cause the system to use nonlinearity when doing animation in the k0 to k1 time period when doing key frame animation. The k0 to k1 time curve of the time interpolator Ti1, and the k1 to k2 time curve of the nonlinear time interpolator Ti2 when animating in the k1 to k2 time period, that is, the properties of two nonlinear time interpolators The values at the k1 position are not the same, that is, the curves corresponding to the two non-linear time interpolators are discontinuous at k1, which causes an animation jam and frame skipping.
缩放模块20,配置为按照预设比值对获取的所述非线性时间插值器模型 进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式为对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同。The scaling module 20 is configured to acquire the nonlinear time interpolator model according to a preset ratio pair Performing scaling to obtain a time interpolator model associated with two adjacent key frames, wherein the scaling manner is to scale the attribute values of the nonlinear time interpolator so that the attribute values of the nonlinear time interpolator boundary are The attribute values of adjacent nonlinear time interpolator boundaries are the same.
在本实施例中,所述获取模块10先获取任意相邻两个关键帧之间的非线性时间插值器模型,然后所述缩放模块20按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,而缩放方式为对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同。也就是说,将图4中的非线性时间插值器的属性值进行调整,以将非线性时间插值器边界的属性值与其它相邻的非线性时间插值器边界的属性值一致,非线性时间插值器边界的属性值与其它相邻的非线性时间插值器边界的属性值一致的结果可参照图5。In this embodiment, the acquiring module 10 first acquires a nonlinear time interpolator model between any two adjacent key frames, and then the scaling module 20 obtains the nonlinear time interpolator according to a preset ratio pair. The model is scaled to obtain a time interpolator model associated with two adjacent key frames, and the scaling method is to scale the attribute values of the nonlinear time interpolator so that the attribute values of the nonlinear time interpolator boundary are The attribute values of adjacent nonlinear time interpolator boundaries are the same. That is, the attribute values of the nonlinear time interpolator in FIG. 4 are adjusted to match the attribute values of the nonlinear time interpolator boundary with the attribute values of other adjacent nonlinear time interpolator boundaries, nonlinear time The result of the attribute value of the interpolator boundary being consistent with the attribute values of other adjacent nonlinear time interpolator boundaries can be referred to FIG.
为更好理解本实施例,参照图6,所述缩放模块20包括:For a better understanding of the embodiment, referring to FIG. 6, the scaling module 20 includes:
获取子模块21,配置为获取相邻两个所述关键帧之间的非线性时间插值器模型;The obtaining sub-module 21 is configured to acquire a nonlinear time interpolator model between two adjacent key frames;
在本实施例中,以三个关键帧举例,此时可知包括两个非线性时间插值器,同样参照图3,若相邻两个所述关键帧为k0和k1,此时,k0关键帧对应的时间点是横坐标为0的时间点,那么,所述关键帧为k0和k1之间的非线性插值器模型即为靠近纵坐标的曲线。In this embodiment, three key frames are exemplified, and it is known that two non-linear time interpolators are included. Referring also to FIG. 3, if two adjacent key frames are k0 and k1, at this time, k0 key frames. The corresponding time point is a time point where the abscissa is 0. Then, the non-linear interpolator model between the key frames k0 and k1 is a curve close to the ordinate.
所述获取子模块21,还配置为获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;The acquiring sub-module 21 is further configured to acquire the first preset time point and the second preset time point corresponding to the non-linear time interpolator model in the preset time interval;
在所述获取子模块21获取相邻两个所述关键帧之间的非线性时间插值器模型后,所述获取子模块21获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点,同理参照图3,可知所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点为0,第二预设时间点为k1。After the obtaining sub-module 21 acquires the nonlinear time interpolator model between two adjacent key frames, the acquiring sub-module 21 acquires the corresponding non-linear time interpolator model in a preset time interval. The first preset time point and the second preset time point, and similarly referring to FIG. 3, it can be seen that the non-linear time interpolator model has a corresponding first preset time point of 0 in the preset time interval, and the second preset The time point is k1.
计算子模块22,配置为根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值; The calculation sub-module 22 is configured to calculate, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval;
在所述获取子模块21获取到所述第一预设时间点和所述第二预设时间点后,所述计算子模块22计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长,然后计算所述时长占所述预设时间区间的比值,若此时所述k1为0.3,则可知此时所述非线性时间插值器模型对应的时长为0.3,而所述时长占所述预设时间区间的比值的计算公式为(k1-0)/1=k1,可得到计算结果为0.3;同理,在相邻两个所述关键帧之间的非线性时间插值器模型为图3中靠近横坐标的曲线时,此时,所述非线性时间插值器模型的起始时间点为k1,终止时间点为1,那么所述非线性时间插值器模型的时长为1-k1,那么所述时长占所述预设时间区间的比值的计算公式为(1-k1)/1=1-k1,若k1为0.3,可得到计算结果为0.7。After the acquiring sub-module 21 acquires the first preset time point and the second preset time point, the calculating sub-module 22 calculates a first preset time point of the nonlinear time interpolator model. And a duration between the second preset time point, and then calculating a ratio of the duration to the preset time interval. If the k1 is 0.3 at this time, it is known that the nonlinear time interpolator model corresponds to The duration is 0.3, and the ratio of the duration to the preset time interval is (k1-0)/1=k1, and the calculation result is 0.3; similarly, in the two adjacent key frames When the nonlinear time interpolator model is the curve near the abscissa in FIG. 3, at this time, the starting time point of the nonlinear time interpolator model is k1, and the end time point is 1, then the nonlinearity The time interpolator model has a duration of 1-k1, and the ratio of the duration to the preset time interval is (1-k1)/1=1-k1. If k1 is 0.3, the calculation result is 0.7.
缩放子模块23,配置为将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。The scaling sub-module 23 is configured to scale the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
在本实施例中,在得到所述比值后,所述缩放子模块23即可将所述非线性时间插值器模型按照所述比值进行缩放,以得到相邻两个所述关键帧关联的时间插值器模型。In this embodiment, after the ratio is obtained, the scaling sub-module 23 may scale the nonlinear time interpolator model according to the ratio to obtain the time associated with two adjacent key frames. Interpolator model.
参照图7,所述缩放子模块23包括:Referring to FIG. 7, the scaling submodule 23 includes:
获取单元231,配置为获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;The obtaining unit 231 is configured to acquire an abscissa and an ordinate of each point in the nonlinear time interpolator model;
相乘单元232,配置为分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;The multiplying unit 232 is configured to multiply the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
处理单元233,配置为对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。The processing unit 233 is configured to process the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames.
在本实施例中,所述获取单元231先获取所述非线性时间插值器模型中每个点的横坐标和纵坐标,然后,所述相乘单元232分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型,最后,所述处理单元233对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。进一步地,所述处理单元233,配置为根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点, 得到相邻两个所述关键帧关联的时间插值器模型。In this embodiment, the acquiring unit 231 first acquires the abscissa and the ordinate of each point in the nonlinear time interpolator model, and then the multiplying unit 232 respectively sets the abscissa and the vertical of each point. The coordinate is multiplied by the ratio to obtain the scaled nonlinear time interpolator model. Finally, the processing unit 233 processes the scaled nonlinear time interpolator model to obtain two adjacent keys. Frame-associated time interpolator model. Further, the processing unit 233 is configured to update a start time point of the nonlinear time interpolator model according to the first preset time point, and update the nonlinear time according to the second preset time point The end time point of the interpolator model, A time interpolator model associated with two adjacent said key frames is obtained.
在本实施例中,在对所述非线性时间插值器模型进行压缩后,得到的是压缩后的时间插值器模型,而此时,所述处理单元233根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,即可得到相邻两个所述关键帧关联的时间插值器模型。In this embodiment, after compressing the nonlinear time interpolator model, a compressed time interpolator model is obtained, and at this time, the processing unit 233 is updated according to the first preset time point. a start time point of the nonlinear time interpolator model, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point, to obtain an association between two adjacent key frames Time interpolator model.
其中,整个计算过程可通过继承android系统的TimeInterpolator类,添加构造函数,并传入相关参数实现。所述构造函数用于在创建对象时初始化对象,而传入相关参数包括传入所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点,所述第一预设时间点为起始时间点k1、第二预设时间点为终止时间点k2、以及重新传入时间插值器mInterpolator,重写getInterpolation(float input)接口,以实现一个新的插值器类KFTimeInterpolator,在插值生成算法中,相当于将原有的插值器模型进行改善,将传入的插值器模型按照所述比值对输入和输出进行缩放,计算方式如下:Among them, the entire calculation process can be realized by inheriting the TimeInterpolator class of the android system, adding a constructor, and passing in related parameters. The constructor is configured to initialize an object when the object is created, and the incoming related parameter includes a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in the preset time interval. The first preset time point is the start time point k1, the second preset time point is the end time point k2, and the re-introduction time interpolator mInterpolator rewrites the getInterpolation(float input) interface to implement a new The interpolator class KFTimeInterpolator, in the interpolation generation algorithm, is equivalent to improving the original interpolator model, and the input interpolator model scales the input and output according to the ratio, as follows:
if(input<=k1)If(input<=k1)
return mInterpolator.getInterpolation(0.0f)*(k2–k1)+k1Return mInterpolator.getInterpolation(0.0f)*(k2–k1)+k1
elseif(input>=k2)Elseif(input>=k2)
return mInterpolator.getInterpolation(1.0f)*(k2–k1)+k1Return mInterpolator.getInterpolation(1.0f)*(k2–k1)+k1
elseElse
return mInterpolator.getInterpolation((input–k1)/(k2–k1))*(k2–k1)+k1Return mInterpolator.getInterpolation((input–k1)/(k2–k1))*(k2–k1)+k1
即通过传入时间插值器的起始时间点k1、终止时间点k2、以及TimeInterpolator模型Ti生成一个新的时间插值器KFTimeInterpolator的对象KFTi,最终根据新生成的时间插值器模型对关键帧进行插值,以生成关键帧动画。That is, the object KFTi of a new time interpolator KFTimeInterpolator is generated by the start time point k1 of the incoming time interpolator, the end time point k2, and the TimeInterpolator model Ti, and finally the key frames are interpolated according to the newly generated time interpolator model. To generate keyframe animations.
插值模块30,配置为根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。 The interpolation module 30 is configured to interpolate two adjacent key frames according to the associated time interpolator model to generate a key frame animation.
在本实施例中,在得到相邻两个关键帧关联的时间插值器模型后,所述插值模块30根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值,即可生成关键帧动画。In this embodiment, after obtaining the time interpolator model associated with two adjacent key frames, the interpolation module 30 interpolates two adjacent key frames according to the associated time interpolator model. Generate keyframe animations.
本发明实施例提出的关键帧动画的生成装置,包括:获取模块、缩放模块和插值模块,在接收到关键帧动画的生成指令时,获取模块获取相邻两个关键帧之间的非线性时间插值器模型,缩放模块按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式为对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同,插值模块根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画,而不是在生成关键帧动画时,只能通过人工编写代码,分别对每两个关键帧使用一个属性动画,然后将两个属性动画进行拼接。本实施例中通过对所述非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器的边界值与相邻的非线性时间插值器的属性值相同,最终生成流畅的关键帧动画,本发明实施例不需要分别对每两个关键帧使用一个属性动画,不仅提高了关键帧动画生成的效率和智能性,而且提高了关键帧动画生成的流畅性。The apparatus for generating a key frame animation according to an embodiment of the present invention includes: an obtaining module, a scaling module, and an interpolation module. When receiving a generation instruction of a key frame animation, the acquiring module acquires a nonlinear time between two adjacent key frames. An interpolator model, the scaling module scales the obtained nonlinear time interpolator model according to a preset ratio, and obtains a time interpolator model associated with two adjacent key frames, wherein the scaling mode is to interpolate the nonlinear time The attribute value of the device is scaled such that the attribute value of the nonlinear time interpolator boundary is the same as the attribute value of the adjacent nonlinear time interpolator boundary, and the interpolation module according to the associated time interpolator model pairs adjacent two The keyframes are interpolated to generate keyframe animations, rather than when generating keyframe animations, only by manually writing code, using one property animation for each of the two keyframes, and then stitching the two property animations. In this embodiment, the attribute value of the non-linear time interpolator is scaled so that the boundary value of the non-linear time interpolator is the same as the attribute value of the adjacent non-linear time interpolator, and finally the smooth key is generated. In the frame animation, the embodiment of the present invention does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves the fluency of key frame animation generation.
进一步地,为了提高关键帧动画生成的灵活性,参照图8,基于第一实施例提出本申请的关键帧动画的生成装置的第二实施例,在本实施例中,所述关键帧动画的生成装置还包括:Further, in order to improve the flexibility of key frame animation generation, referring to FIG. 8, a second embodiment of the key frame animation generating apparatus of the present application is proposed based on the first embodiment. In this embodiment, the key frame animation is The generating device further includes:
绑定模块40,配置为将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。The binding module 40 is configured to bind the time interpolator model associated with the two key frames to two adjacent key frames.
在本实施例中,在得到相邻两个关键帧关联的时间插值器模型后,所述绑定模块40将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定,最终根据绑定的关系,所述时间插值器模型即可实现对绑定的关键帧进行插值以生成动画。In this embodiment, after obtaining the time interpolator model associated with two adjacent key frames, the binding module 40 compares the time interpolator model associated with the two key frames with two adjacent key frames. The binding is performed, and finally, according to the binding relationship, the time interpolator model can perform interpolation on the bound key frames to generate an animation.
在本实施例中,为更好理解,举例应用场景如下:In this embodiment, for better understanding, an example application scenario is as follows:
在关键帧为3帧,且每两个关键帧之间的时间插值器模型都为非线性时间插值器模型,此时,可参照图3,三个关键帧分别是k0(起始帧)、k1(中间 某一帧)、结束帧(k2),k0到k1之间使用时间插值器(kft1,靠近纵坐标的曲线),k1到k2之间使用时间插值器(kft2,靠近横坐标的曲线),那么将上述非线性时间插值器按照比值进行缩放以后,kft1、kft2曲线在关键帧k1时间点时,表现为属性值为同一个值,整个动画的时间插值器曲线如图5所示,整个动画过程中不会出现跳变,动画流畅。In the key frame is 3 frames, and the time interpolator model between each two key frames is a nonlinear time interpolator model. In this case, referring to FIG. 3, the three key frames are k0 (starting frame), K1 (middle a frame), an end frame (k2), a time interpolator (kft1, a curve near the ordinate) between k0 and k1, and a time interpolator (kft2, a curve near the abscissa) between k1 and k2, then After scaling the above-mentioned nonlinear time interpolator according to the ratio, the kft1 and kft2 curves appear as the same value at the time of the key frame k1, and the time interpolator curve of the entire animation is as shown in FIG. 5, the whole animation process. There will be no jumps in the animation, and the animation will be smooth.
同理,在关键帧包括4帧或更多的时候,采用与关键帧包括3帧的生成方式一致,此时不再赘述。For the same reason, when the key frame includes 4 frames or more, the method is the same as the key frame including 3 frames, and details are not described herein.
本申请进一步提供一种关键帧动画的生成方法。The application further provides a method for generating a key frame animation.
参照图9,图9为本申请的关键帧动画的生成方法第一实施例的流程示意图。Referring to FIG. 9, FIG. 9 is a schematic flowchart diagram of a first embodiment of a method for generating a key frame animation according to the present application.
本实施例提出一种关键帧动画的生成方法,所述关键帧动画的生成方法包括以下步骤:This embodiment provides a method for generating a key frame animation, and the method for generating the key frame animation includes the following steps:
步骤S10,在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;Step S10, when receiving the generation instruction of the key frame animation, acquiring a nonlinear time interpolator model between two adjacent key frames;
在本实施例中,首先获取相邻两个关键帧之间的非线性时间插值器(TimeInterpolator)模型,然后分析所述非线性时间插值器模型。In this embodiment, a nonlinear time interpolator model between two adjacent key frames is first acquired, and then the nonlinear time interpolator model is analyzed.
可以理解,时间插值器是用来指定动画的某一个属性随着时间的变化规律,并且将时间区间进行归一化,可以将时间插值器模型的起始值设为0,终止值设为1。因此,在获取到所述非线性时间插值器模型时,先查看相邻两个关键帧之间的非线性时间插值器模型的源码。假设现在有3个关键帧,则需要两个非线性时间插值器模型,两个非线性时间插值器模型参照图3,分别是图3中的两条曲线,而此时的三个关键帧,分别为k0、k1和k2三个关键帧,三个关键帧可参照图4,k0关键帧对应的时间点是横坐标中的原点,k2关键帧对应的时间点是横坐标中的1,对k0和k1之间设置一个非线性时间插值器模型Ti1,对k1和k2时间段再次设置一个非线性时间插值器模型Ti2。而此时,系统会认为Ti1、Ti2的时间起始点都为k0,时间终止点为k2,这样就会造成系统在做关键帧动画的时候,在k0到k1时间段内做动画时使用非线性时间插值器Ti1的k0到k1时间的曲线,而k1到k2时间段内做动画时使用非线性时间插值器Ti2的k1到k2时间的曲线,也就是说,两个非 线性时间插值器的属性值在k1位置时的值不相同,即两个非线性时间插值器对应的曲线在k1处是不连续的,此时就会造成动画卡顿,跳帧现象。It can be understood that the time interpolator is used to specify the change rule of an attribute of the animation over time, and the time interval is normalized, and the start value of the time interpolator model can be set to 0, and the end value is set to 1. . Therefore, when acquiring the nonlinear time interpolator model, first look at the source code of the nonlinear time interpolator model between two adjacent key frames. Assuming that there are 3 keyframes now, two nonlinear time interpolator models are needed. The two nonlinear time interpolator models refer to Figure 3, which are the two curves in Figure 3, and the three keyframes at this time, There are three key frames k0, k1 and k2 respectively. For three key frames, refer to Figure 4. The time point corresponding to the k0 key frame is the origin in the abscissa, and the time point corresponding to the k2 key frame is 1 in the abscissa. A nonlinear time interpolator model Ti1 is set between k0 and k1, and a nonlinear time interpolator model Ti2 is set again for the k1 and k2 time segments. At this time, the system will think that the time starting point of Ti1 and Ti2 is k0 and the time ending point is k2, which will cause the system to use nonlinearity when doing animation in the k0 to k1 time period when doing key frame animation. The time k1 to k1 time curve of the time interpolator Ti1, and the k1 to k2 time curve of the nonlinear time interpolator Ti2 when animating in the k1 to k2 time period, that is, two non- The value of the linear time interpolator's attribute value is different at the k1 position, that is, the curve corresponding to the two non-linear time interpolators is discontinuous at k1, which causes an animation jam and frame skipping phenomenon.
步骤S20,按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;Step S20: The obtained nonlinear time interpolator model is scaled according to a preset ratio, and a time interpolator model associated with two adjacent key frames is obtained, wherein the scaling mode includes attributes of the nonlinear time interpolator. The values are scaled such that the attribute values of the non-linear time interpolator boundary are the same as the attribute values of adjacent non-linear time interpolator boundaries;
在本实施例中,先获取任意相邻两个关键帧之间的非线性时间插值器模型,然后按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,而缩放方式为对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同。也就是说将图4中的非线性时间插值器的属性值进行调整,以使非线性时间插值器边界的属性值与其它相邻的非线性时间插值器边界的属性值一致,非线性时间插值器边界的属性值与其它相邻的非线性时间插值器边界的属性值一致的结果可参照图5。In this embodiment, the nonlinear time interpolator model between any two adjacent key frames is first obtained, and then the obtained nonlinear time interpolator model is scaled according to a preset ratio to obtain two adjacent stations. The time interpolator model associated with the key frame is scaled by scaling the attribute values of the nonlinear time interpolator such that the attribute values of the boundary of the nonlinear time interpolator are adjacent to the boundary of the adjacent nonlinear time interpolator The attribute values are the same. That is to say, the attribute value of the nonlinear time interpolator in FIG. 4 is adjusted so that the attribute value of the nonlinear time interpolator boundary is consistent with the attribute value of other adjacent nonlinear time interpolator boundaries, and the nonlinear time interpolation See Figure 5 for the results of the attribute values of the boundary of the device being consistent with the values of the attributes of other adjacent nonlinear time interpolator boundaries.
为更好理解本实施例,参照图10,所述步骤S20包括:For a better understanding of the embodiment, referring to FIG. 10, the step S20 includes:
步骤S21,获取相邻两个所述关键帧之间的非线性时间插值器模型;Step S21, acquiring a nonlinear time interpolator model between two adjacent key frames;
在本实施例中,以三个关键帧举例,此时可知包括两个非线性时间插值器,同样参照图3,若相邻两个所述关键帧为k0和k1,此时,k0关键帧对应的时间点是横坐标为0的时间点,那么,所述关键帧为k0和k1之间的非线性插值器模型即为靠近纵坐标的曲线。In this embodiment, three key frames are exemplified, and it is known that two non-linear time interpolators are included. Referring also to FIG. 3, if two adjacent key frames are k0 and k1, at this time, k0 key frames. The corresponding time point is a time point where the abscissa is 0. Then, the non-linear interpolator model between the key frames k0 and k1 is a curve close to the ordinate.
步骤S22,获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;Step S22, acquiring a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in the preset time interval;
在获取相邻两个所述关键帧之间的非线性时间插值器模型后,获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点,同理参照图3,可知所述非线性时间插值器模型在所述预设时间区间中对应的第一预设时间点为0,第二预设时间点为k1。After acquiring the nonlinear time interpolator model between the two adjacent key frames, acquiring the first preset time point and the second preset time in the preset time interval of the nonlinear time interpolator model Point, similarly referring to FIG. 3, it can be seen that the non-linear time interpolator model has a corresponding first preset time point of 0 in the preset time interval, and the second preset time point is k1.
步骤S23,根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值; Step S23, calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval;
在获取到所述第一预设时间点和所述第二预设时间点后,计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长,然后计算所述时长占所述预设时间区间的比值;若此时所述k1为0.3,则可知此时所述非线性时间插值器模型对应的时长为0.3,而所述时长占所述预设时间区间的比值的计算公式为(k1-0)/1=k1,可得到计算结果为0.3;同理,在相邻两个所述关键帧之间的非线性时间插值器模型为图3中,靠近横坐标的曲线时,此时,所述非线性时间插值器模型的起始时间点为k1,终止时间点为1,那么所述非线性时间插值器模型的时长为1-k1,那么所述时长占所述时间区间的比值的计算公式为(1-k1)/1=1-k1,若k1为0.3,可得到计算结果为0.7。After obtaining the first preset time point and the second preset time point, calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model, Then calculating a ratio of the duration to the preset time interval; if the k1 is 0.3 at this time, it can be known that the duration of the nonlinear time interpolator model corresponds to 0.3, and the duration is the pre- Let the ratio of the time interval be (k1-0)/1=k1, and the calculation result is 0.3; similarly, the nonlinear time interpolator model between two adjacent key frames is Figure 3. In the curve near the abscissa, at this time, the starting time point of the nonlinear time interpolator model is k1, and the ending time point is 1, then the duration of the nonlinear time interpolator model is 1-k1, Then, the ratio of the duration to the time interval is calculated as (1-k1)/1=1-k1, and if k1 is 0.3, the calculation result is 0.7.
步骤S24,将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。Step S24: The nonlinear time interpolator model is scaled according to the ratio, and a time interpolator model associated with two adjacent key frames is obtained.
在本实施例中,在得到所述比值后,即可将所述非线性时间插值器模型按照所述比值进行缩放,以得到相邻两个所述关键帧关联的时间插值器模型。In this embodiment, after the ratio is obtained, the nonlinear time interpolator model may be scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
参照图11,所述步骤S24包括:Referring to FIG. 11, the step S24 includes:
步骤S241,获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;Step S241, acquiring an abscissa and an ordinate of each point in the nonlinear time interpolator model;
步骤S242,分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;Step S242, multiplying the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
步骤S243,对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。Step S243, processing the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames.
在本实施例中,先获取所述非线性时间插值器模型中每个点的横坐标和纵坐标,然后分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型,最后对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。In this embodiment, the abscissa and the ordinate of each point in the nonlinear time interpolator model are first acquired, and then the abscissa and the ordinate of each point are respectively multiplied by the ratio to obtain a scaled position. The nonlinear time interpolator model is described. Finally, the scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
其中,所述步骤S243可以包括:The step S243 may include:
根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。 Updating a start time point of the nonlinear time interpolator model according to the first preset time point, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point to obtain an adjacent A time interpolator model associated with two of the key frames.
在本实施例中,在对所述非线性时间插值器模型进行压缩后,得到的是压缩后的时间插值器模型,而此时,根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,即可得到相邻两个所述关键帧关联的时间插值器模型。In this embodiment, after compressing the nonlinear time interpolator model, a compressed time interpolator model is obtained, and at this time, the nonlinear time is updated according to the first preset time point. At the start time point of the interpolator model, the end time point of the nonlinear time interpolator model is updated according to the second preset time point, and a time interpolator model associated with two adjacent key frames is obtained.
其中,整个计算过程可通过继承android系统的TimeInterpolator类,添加构造函数,并传入相关参数实现,其中,所述构造函数用于在创建对象时初始化对象,而传入相关参数包括传入所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点,所述第一预设时间点为起始时间点k1、第二预设时间点为终止时间点k2、以及重新传入时间插值器mInterpolator,重写getInterpolation(float input)接口,以实现一个新的插值器类KFTimeInterpolator,在插值生成算法中,相当于将原有的插值器模型进行改善,将传入的插值器模型进行按照所述比值对输入和输出进行缩放,计算方式如下:Wherein, the entire calculation process can be implemented by inheriting the TimeInterpolator class of the android system, adding a constructor, and passing in related parameters, wherein the constructor is used to initialize the object when the object is created, and the incoming related parameters include the The non-linear time interpolator model corresponds to a first preset time point and a second preset time point in a preset time interval, where the first preset time point is a start time point k1 and a second preset time point is End time point k2, and re-introduction time interpolator mInterpolator, rewrite the getInterpolation(float input) interface to implement a new interpolator class KFTimeInterpolator, which is equivalent to the original interpolator model in the interpolation generation algorithm. The incoming interpolator model is scaled to the input and output according to the ratio, as follows:
if(input<=k1)If(input<=k1)
return mInterpolator.getInterpolation(0.0f)*(k2–k1)+k1Return mInterpolator.getInterpolation(0.0f)*(k2–k1)+k1
elseif(input>=k2)Elseif(input>=k2)
return mInterpolator.getInterpolation(1.0f)*(k2–k1)+k1Return mInterpolator.getInterpolation(1.0f)*(k2–k1)+k1
elseElse
return mInterpolator.getInterpolation((input–k1)/(k2–k1))*(k2–k1)+k1Return mInterpolator.getInterpolation((input–k1)/(k2–k1))*(k2–k1)+k1
即通过传入时间插值器的起始时间点k1、终止时间点k2、以及TimeInterpolator模型Ti生成一个新的时间插值器KFTimeInterpolator的对象KFTi,最终根据新生成的时间插值器模型对关键帧进行插值,以生成关键帧动画。That is, the object KFTi of a new time interpolator KFTimeInterpolator is generated by the start time point k1 of the incoming time interpolator, the end time point k2, and the TimeInterpolator model Ti, and finally the key frames are interpolated according to the newly generated time interpolator model. To generate keyframe animations.
步骤S30,根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。Step S30, interpolating two adjacent key frames according to the associated time interpolator model to generate a key frame animation.
在本实施例中,在得到相邻两个关键帧关联的时间插值器模型后,根据 所述关联的时间插值器模型对相邻两个所述关键帧进行插值,即可生成关键帧动画。In this embodiment, after obtaining the time interpolator model associated with two adjacent key frames, according to The associated time interpolator model interpolates two adjacent key frames to generate a key frame animation.
本发明实施例提出的关键帧动画的生成方法,在接收到关键帧动画的生成指令时,先获取相邻两个关键帧之间的非线性时间插值器模型,然后按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式为对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同,最后根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画,而不是在生成关键帧动画时,只能通过人工编写代码,分别对每两个关键帧使用一个属性动画,然后将两个属性动画进行拼接。本实施中通过对所述非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器的边界值与相邻的非线性时间插值器的属性值相同,最终生成流畅的关键帧动画,本发明实施例不需要分别对每两个关键帧使用一个属性动画,不仅提高了关键帧动画生成的效率和智能性,而且提高了关键帧动画生成的流畅性。The method for generating a key frame animation according to an embodiment of the present invention first acquires a nonlinear time interpolator model between two adjacent key frames when receiving a key frame animation generation instruction, and then acquires the preset time ratio pair according to a preset ratio. The nonlinear time interpolator model is scaled to obtain a time interpolator model associated with two adjacent key frames, wherein the scaling manner is to scale the attribute values of the nonlinear time interpolator to make the nonlinearity The attribute value of the time interpolator boundary is the same as the attribute value of the adjacent nonlinear time interpolator boundary, and finally the adjacent two key frames are interpolated according to the associated time interpolator model to generate a key frame animation, and Instead of generating keyframe animations, you can only manually write code, use one property animation for each of the two keyframes, and then stitch the two property animations. In this implementation, the attribute value of the nonlinear time interpolator is scaled so that the boundary value of the nonlinear time interpolator is the same as the attribute value of the adjacent nonlinear time interpolator, and finally a smooth key frame is generated. The animation does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves the fluency of key frame animation generation.
进一步地,为了提高关键帧动画生成的灵活性,参照图12,基于第一实施例提出本申请的关键帧动画的生成方法的第二实施例,在本实施例中,所述步骤S20之后,所述关键帧动画的生成方法还包括:Further, in order to improve the flexibility of the key frame animation generation, referring to FIG. 12, a second embodiment of the method for generating a key frame animation of the present application is proposed based on the first embodiment. In this embodiment, after the step S20, The method for generating the key frame animation further includes:
步骤S40,将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。Step S40, binding the time interpolator model associated with the two key frames to two adjacent key frames.
在本实施例中,在得到相邻两个关键帧关联的时间插值器模型后,将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定,最终根据绑定的关系,所述时间插值器模型即可实现对绑定的关键帧进行插值以生成动画。In this embodiment, after obtaining the time interpolator model associated with two adjacent key frames, the time interpolator model associated with the two key frames is bound to two adjacent key frames, and finally The bound relationship, the time interpolator model can be used to interpolate the bound keyframes to generate animations.
在本实施例中,为更好理解,举例应用场景如下:In this embodiment, for better understanding, an example application scenario is as follows:
在关键帧为3帧,且每两个关键帧之间的时间插值器模型都为非线性时间插值器模型,此时,可参照图3,三个关键帧分别是k0(起始帧)、k1(中间某一帧)、结束帧(k2),k0到k1之间使用时间插值器(kft1,靠近纵坐标的曲线),k1到k2之间使用时间插值器(kft2,靠近横坐标的曲线),那 么将上述非线性时间插值器按照比值进行缩放以后,kft1、kft2曲线在关键帧k1时间点时,表现为属性值为同一个值,整个动画的时间插值器曲线如图5所示,整个动画过程中不会出现跳变,动画流畅。In the key frame is 3 frames, and the time interpolator model between each two key frames is a nonlinear time interpolator model. In this case, referring to FIG. 3, the three key frames are k0 (starting frame), K1 (one frame in the middle), end frame (k2), time interpolator between k0 and k1 (kft1, curve near ordinate), time interpolator between k1 and k2 (kft2, curve near the abscissa) ), that After scaling the above-mentioned nonlinear time interpolator according to the ratio, the kft1 and kft2 curves appear as the same value at the time of the key frame k1, and the time interpolator curve of the entire animation is as shown in FIG. 5, the whole animation. There will be no jumps in the process and the animation will be smooth.
同理,在关键帧包括4帧或更多的时候,采用与关键帧包括3帧的生成方式一致,此时不再赘述。For the same reason, when the key frame includes 4 frames or more, the method is the same as the key frame including 3 frames, and details are not described herein.
此外,本发明实施例还提供一种关键帧动画的生成装置,包括:存储器以及处理器;所述存储器,配置为存储用于生成关键帧动画的程序;该用于生成关键帧动画的程序在被处理器读取执行时,执行以下操作:In addition, an embodiment of the present invention further provides a key frame animation generating apparatus, including: a memory and a processor; the memory configured to store a program for generating a key frame animation; the program for generating a key frame animation is When executed by the processor, do the following:
在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。Obtaining a nonlinear time interpolator model between two adjacent key frames when receiving a key frame animation generation instruction; scaling the obtained nonlinear time interpolator model according to a preset ratio to obtain two adjacent a time interpolator model associated with the key frame, wherein the scaling manner comprises scaling an attribute value of the nonlinear time interpolator to interpolate the attribute value of the nonlinear time interpolator boundary with an adjacent nonlinear time The attribute values of the device boundaries are the same; two adjacent key frames are interpolated according to the associated time interpolator model to generate a key frame animation.
其中,所述按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,可以包括:The time-interpolator model of the two adjacent key frames is obtained by scaling the acquired time-interpolator model according to the preset ratio, which may include:
获取相邻两个所述关键帧之间的非线性时间插值器模型;Obtaining a nonlinear time interpolator model between two adjacent said key frames;
获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;Obtaining a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in a preset time interval;
根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述时间区间的比值;Calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the time interval;
将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。The nonlinear time interpolator model is scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
其中,所述将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,可以包括:The method for scaling the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames may include:
获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;Obtaining an abscissa and an ordinate of each point in the nonlinear time interpolator model;
分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型; Multiplying the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。The scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
其中,所述对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型,可以包括:The method of processing the scaled non-linear time interpolator model to obtain a time interpolator model associated with two adjacent key frames may include:
根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。Updating a start time point of the nonlinear time interpolator model according to the first preset time point, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point to obtain an adjacent A time interpolator model associated with two of the key frames.
其中,该用于生成关键帧动画的程序在被处理器读取执行时,还可以执行以下操作:将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。The program for generating a key frame animation may also perform the following operations when the processor reads and executes: binding the time interpolator model associated with the two key frames to two adjacent key frames. set.
其中,所述根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值,可以包括:The calculating the ratio of the duration of the non-linear time interpolator model to the preset time interval according to the first preset time point and the second preset time point may include:
计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长;Calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model;
计算所述时长占所述预设时间区间的比值。Calculating a ratio of the duration to the preset time interval.
其中,所述关键帧动画的生成装置还可以包括:用户输入单元,配置为接收关键帧动画的生成指令。The device for generating a key frame animation may further include: a user input unit configured to receive a generation instruction of the key frame animation.
需要说明的是,本实施例的存储器可以为图1中的存储器160,处理器可以为图1中的控制器180,用户输入单元可以为图1中的用户输入单元130。It should be noted that the memory of this embodiment may be the memory 160 of FIG. 1, the processor may be the controller 180 of FIG. 1, and the user input unit may be the user input unit 130 of FIG.
此外,本发明实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现上述的关键帧动画的生成方法。In addition, an embodiment of the present invention further provides a computer readable storage medium storing computer executable instructions, which are implemented by the processor to implement the above-described key frame animation generation method.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其它变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。 It is to be understood that the term "comprises", "comprising", or any other variants thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or system that comprises a plurality of elements includes not only those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, item, or system. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in a process, method, article, or system that includes the element, without further limitation.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理单元的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and functional blocks/units of the methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical units; for example, one physical component may have multiple functions, or one function or step may be composed of several physical The components work together. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer readable medium, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer. Moreover, it is well known to those skilled in the art that communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
以上仅为本申请的示例性实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其它相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only an exemplary embodiment of the present application, and thus does not limit the scope of patents of the present application, and the equivalent structure or equivalent process transformations made by the contents of the specification and the drawings of the present application, or directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of this application.
工业实用性Industrial applicability
本申请实施例提供一种关键帧动画的生成装置及方法,不需要分别对每两个关键帧使用一个属性动画,不仅提高了关键帧动画生成的效率和智能性,而且提高了关键帧动画生成的流畅性。 The embodiment of the present invention provides a device and a method for generating a key frame animation, which does not need to separately use one attribute animation for each two key frames, which not only improves the efficiency and intelligence of key frame animation generation, but also improves key frame animation generation. The fluency.

Claims (20)

  1. 一种关键帧动画的生成装置,包括:A key frame animation generating device includes:
    获取模块,配置为在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;An acquisition module configured to acquire a nonlinear time interpolator model between two adjacent key frames upon receiving a generation instruction of a key frame animation;
    缩放模块,配置为按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;a scaling module configured to scale the obtained nonlinear time interpolator model according to a preset ratio to obtain a time interpolator model associated with two adjacent key frames, wherein the scaling manner includes a nonlinear time interpolator The attribute values are scaled such that the attribute values of the non-linear time interpolator boundary are the same as the attribute values of adjacent non-linear time interpolator boundaries;
    插值模块,配置为根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。An interpolation module configured to interpolate two adjacent key frames according to the associated time interpolator model to generate a key frame animation.
  2. 如权利要求1所述的关键帧动画的生成装置,其中,所述缩放模块包括:The apparatus for generating a key frame animation according to claim 1, wherein the scaling module comprises:
    获取子模块,配置为获取相邻两个所述关键帧之间的非线性时间插值器模型;Obtaining a submodule configured to acquire a nonlinear time interpolator model between two adjacent key frames;
    所述获取子模块,还配置为获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;The acquiring sub-module is further configured to acquire the first preset time point and the second preset time point corresponding to the non-linear time interpolator model in the preset time interval;
    计算子模块,配置为根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值;a calculation sub-module configured to calculate, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval;
    缩放子模块,配置为将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。And a scaling submodule configured to scale the nonlinear time interpolator model according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  3. 如权利要求2所述的关键帧动画的生成装置,其中,所述缩放子模块包括:The apparatus for generating a key frame animation according to claim 2, wherein the scaling sub-module comprises:
    获取单元,配置为获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;An obtaining unit configured to acquire an abscissa and an ordinate of each point in the nonlinear time interpolator model;
    相乘单元,配置为分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;a multiplying unit configured to multiply the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
    处理单元,配置为对缩放后的所述非线性时间插值器模型进行处理,得 到相邻两个所述关键帧关联的时间插值器模型。a processing unit configured to process the scaled nonlinear time interpolator model A time interpolator model associated with two adjacent said key frames.
  4. 如权利要求3所述的关键帧动画的生成装置,其中,所述处理单元配置为根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。The key frame animation generating apparatus according to claim 3, wherein the processing unit is configured to update a start time point of the nonlinear time interpolator model according to the first preset time point, according to the first The second time point is updated to terminate the time point of the nonlinear time interpolator model, and a time interpolator model associated with two adjacent key frames is obtained.
  5. 如权利要求1至4任一项所述的关键帧动画的生成装置,其中,所述关键帧动画的生成装置还包括:The device for generating a key frame animation according to any one of claims 1 to 4, wherein the device for generating a key frame animation further comprises:
    绑定模块,配置为将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。And a binding module configured to bind the time interpolator model associated with the two key frames to two adjacent key frames.
  6. 如权利要求2所述的关键帧动画的生成装置,其中,所述计算子模块,配置为通过以下方式计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值:The key frame animation generating apparatus according to claim 2, wherein the calculating submodule is configured to calculate a ratio of a duration corresponding to the nonlinear time interpolator model to the preset time interval by:
    计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长;Calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model;
    计算所述时长占所述预设时间区间的比值。Calculating a ratio of the duration to the preset time interval.
  7. 一种关键帧动画的生成方法,包括以下步骤:A method for generating a key frame animation includes the following steps:
    在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;Obtaining a nonlinear time interpolator model between two adjacent key frames when receiving a generation instruction of a key frame animation;
    按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;The obtained nonlinear time interpolator model is scaled according to a preset ratio, and a time interpolator model associated with two adjacent key frames is obtained, wherein the scaling manner includes scaling the attribute value of the nonlinear time interpolator So that the attribute value of the boundary of the nonlinear time interpolator is the same as the attribute value of the boundary of the adjacent nonlinear time interpolator;
    根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。Two adjacent key frames are interpolated according to the associated time interpolator model to generate a key frame animation.
  8. 如权利要求7所述的关键帧动画的生成方法,其中,所述按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的步骤包括:The method for generating a key frame animation according to claim 7, wherein the nonlinear time interpolator model acquired according to a preset ratio is scaled to obtain a time interpolator associated with two adjacent key frames. The steps of the model include:
    获取相邻两个所述关键帧之间的非线性时间插值器模型; Obtaining a nonlinear time interpolator model between two adjacent said key frames;
    获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;Obtaining a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in a preset time interval;
    根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述时间区间的比值;Calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the time interval;
    将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。The nonlinear time interpolator model is scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  9. 如权利要求8所述的关键帧动画的生成方法,其中,所述将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的步骤包括:The method for generating a key frame animation according to claim 8, wherein said scaling the nonlinear time interpolator model according to said ratio to obtain a time interpolator model associated with two adjacent said key frames The steps include:
    获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;Obtaining an abscissa and an ordinate of each point in the nonlinear time interpolator model;
    分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;Multiplying the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
    对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。The scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
  10. 如权利要求9所述的关键帧动画的生成方法,其中,所述对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型的步骤包括:The method for generating a key frame animation according to claim 9, wherein the step of processing the scaled nonlinear time interpolator model to obtain a time interpolator model associated with two adjacent key frames include:
    根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。Updating a start time point of the nonlinear time interpolator model according to the first preset time point, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point to obtain an adjacent A time interpolator model associated with two of the key frames.
  11. 如权利要求7至10任一项所述的关键帧动画的生成方法,其中,所述按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型的步骤之后,所述关键帧动画的生成方法还包括:The method for generating a key frame animation according to any one of claims 7 to 10, wherein the nonlinear time interpolator model acquired according to a preset ratio is scaled to obtain two adjacent key frames. After the step of the associated time interpolator model, the method for generating the key frame animation further includes:
    将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。The time interpolator model associated with the two key frames is bound to two adjacent key frames.
  12. 如权利要求8所述的关键帧动画的生成方法,其中,所述根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对 应的时长占所述预设时间区间的比值,包括:The method for generating a key frame animation according to claim 8, wherein the calculating the nonlinear time interpolator model pair according to the first preset time point and the second preset time point The ratio of the length of time to the preset time interval, including:
    计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长;Calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model;
    计算所述时长占所述预设时间区间的比值。Calculating a ratio of the duration to the preset time interval.
  13. 一种关键帧动画的生成装置,包括:存储器以及处理器;A key frame animation generating device includes: a memory and a processor;
    所述存储器,配置为存储用于生成关键帧动画的程序;该用于生成关键帧动画的程序在被处理器读取执行时,执行以下操作:The memory is configured to store a program for generating a keyframe animation; the program for generating a keyframe animation, when executed by the processor, performs the following operations:
    在接收到关键帧动画的生成指令时,获取相邻两个关键帧之间的非线性时间插值器模型;Obtaining a nonlinear time interpolator model between two adjacent key frames when receiving a generation instruction of a key frame animation;
    按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,其中,缩放方式包括对非线性时间插值器的属性值进行缩放,以使所述非线性时间插值器边界的属性值与相邻的非线性时间插值器边界的属性值相同;The obtained nonlinear time interpolator model is scaled according to a preset ratio, and a time interpolator model associated with two adjacent key frames is obtained, wherein the scaling manner includes scaling the attribute value of the nonlinear time interpolator So that the attribute value of the boundary of the nonlinear time interpolator is the same as the attribute value of the boundary of the adjacent nonlinear time interpolator;
    根据所述关联的时间插值器模型对相邻两个所述关键帧进行插值以生成关键帧动画。Two adjacent key frames are interpolated according to the associated time interpolator model to generate a key frame animation.
  14. 如权利要求13所述的关键帧动画的生成装置,其中,所述按照预设比值对获取的所述非线性时间插值器模型进行缩放,得到相邻两个所述关键帧关联的时间插值器模型,包括:The key frame animation generating apparatus according to claim 13, wherein the nonlinear time interpolator model acquired according to a preset ratio is scaled to obtain a time interpolator associated with two adjacent key frames. Models, including:
    获取相邻两个所述关键帧之间的非线性时间插值器模型;Obtaining a nonlinear time interpolator model between two adjacent said key frames;
    获取所述非线性时间插值器模型在预设时间区间中对应的第一预设时间点和第二预设时间点;Obtaining a first preset time point and a second preset time point corresponding to the non-linear time interpolator model in a preset time interval;
    根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述时间区间的比值;Calculating, according to the first preset time point and the second preset time point, a ratio of a duration corresponding to the nonlinear time interpolator model to the time interval;
    将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关联的时间插值器模型。The nonlinear time interpolator model is scaled according to the ratio to obtain a time interpolator model associated with two adjacent key frames.
  15. 如权利要求14所述的关键帧动画的生成装置,其中,所述将所述非线性时间插值器模型按照所述比值进行缩放,得到相邻两个所述关键帧关 联的时间插值器模型,包括:The key frame animation generating apparatus according to claim 14, wherein said scaling said nonlinear time interpolator model according to said ratio to obtain two adjacent said key frames The time interpolator model, including:
    获取所述非线性时间插值器模型中每个点的横坐标和纵坐标;Obtaining an abscissa and an ordinate of each point in the nonlinear time interpolator model;
    分别将每个点的横坐标和纵坐标乘以所述比值,得到缩放后的所述非线性时间插值器模型;Multiplying the abscissa and the ordinate of each point by the ratio, respectively, to obtain the scaled nonlinear time interpolator model;
    对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型。The scaled nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent key frames.
  16. 如权利要求15所述的关键帧动画的生成装置,其中,所述对缩放后的所述非线性时间插值器模型进行处理,得到相邻两个所述关键帧关联的时间插值器模型,包括:The key frame animation generating apparatus according to claim 15, wherein said scaling said nonlinear time interpolator model is processed to obtain a time interpolator model associated with two adjacent said key frames, including :
    根据所述第一预设时间点更新所述非线性时间插值器模型的起始时间点,根据所述第二预设时间点更新所述非线性时间插值器模型的终止时间点,得到相邻两个所述关键帧关联的时间插值器模型。Updating a start time point of the nonlinear time interpolator model according to the first preset time point, and updating a termination time point of the nonlinear time interpolator model according to the second preset time point to obtain an adjacent A time interpolator model associated with two of the key frames.
  17. 如权利要求13至16任一项所述的关键帧动画的生成装置,其中,该用于生成关键帧动画的程序在被处理器读取执行时,还执行以下操作:The key frame animation generating apparatus according to any one of claims 13 to 16, wherein the program for generating a key frame animation further performs the following operations when executed by the processor:
    将两个所述关键帧关联的时间插值器模型与相邻两个所述关键帧进行绑定。The time interpolator model associated with the two key frames is bound to two adjacent key frames.
  18. 如权利要求14所述的关键帧动画的生成装置,其中,所述根据所述第一预设时间点和所述第二预设时间点,计算所述非线性时间插值器模型对应的时长占所述预设时间区间的比值,包括:The key frame animation generating apparatus according to claim 14, wherein the calculating the duration corresponding to the nonlinear time interpolator model according to the first preset time point and the second preset time point The ratio of the preset time interval includes:
    计算所述非线性时间插值器模型的第一预设时间点和第二预设时间点之间的时长;Calculating a duration between the first preset time point and the second preset time point of the nonlinear time interpolator model;
    计算所述时长占所述预设时间区间的比值。Calculating a ratio of the duration to the preset time interval.
  19. 如权利要求13所述的关键帧动画的生成装置,所述关键帧动画的生成装置还包括:用户输入单元,配置为接收关键帧动画的生成指令。The key frame animation generating apparatus according to claim 13, wherein the key frame animation generating means further comprises: a user input unit configured to receive a key frame animation generating instruction.
  20. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被处理器执行时实现权利要求7至12任一项所述的关键帧动画的生成方法。 A computer readable storage medium storing computer executable instructions that, when executed by a processor, implement the key frame animation generation method of any one of claims 7 to 12.
PCT/CN2016/111479 2016-01-27 2016-12-22 Keyframe animation creation device and method WO2017128893A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610056467.7 2016-01-27
CN201610056467.7A CN105578184B (en) 2016-01-27 2016-01-27 The generating means and method of key-frame animation

Publications (1)

Publication Number Publication Date
WO2017128893A1 true WO2017128893A1 (en) 2017-08-03

Family

ID=55887781

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111479 WO2017128893A1 (en) 2016-01-27 2016-12-22 Keyframe animation creation device and method

Country Status (2)

Country Link
CN (1) CN105578184B (en)
WO (1) WO2017128893A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872375A (en) * 2019-01-10 2019-06-11 珠海金山网络游戏科技有限公司 A kind of skeleton cartoon key frame compression method and device
CN110111402A (en) * 2019-03-28 2019-08-09 北京睿格致科技有限公司 Generation method, device, animation method and the device of 3D parameterized model
CN112634409A (en) * 2020-12-28 2021-04-09 稿定(厦门)科技有限公司 Custom animation curve generation method and device
US11689693B2 (en) 2020-04-30 2023-06-27 Boe Technology Group Co., Ltd. Video frame interpolation method and device, computer readable storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105578184B (en) * 2016-01-27 2018-11-20 努比亚技术有限公司 The generating means and method of key-frame animation
CN108446373A (en) * 2018-03-16 2018-08-24 五八有限公司 Animation playing method, device, equipment and storage medium
CN109710143B (en) * 2018-11-23 2021-09-28 努比亚技术有限公司 Interface switching control method, terminal and computer readable storage medium
WO2020133465A1 (en) * 2018-12-29 2020-07-02 Zhejiang Dahua Technology Co., Ltd. Systems and methods for multi-video stream transmission
CN111815737B (en) * 2019-04-26 2023-03-28 厦门雅基软件有限公司 Interpolation data processing method, device and equipment and computer readable storage medium
CN112891947B (en) * 2021-04-02 2024-02-23 网易(杭州)网络有限公司 Jump animation processing method, apparatus, electronic device and computer readable medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070159487A1 (en) * 2003-07-21 2007-07-12 Felt Adam C Processing image data
CN102682459A (en) * 2011-03-15 2012-09-19 新奥特(北京)视频技术有限公司 Method for interpolating keyframe animation curve
CN104123735A (en) * 2014-07-24 2014-10-29 无锡梵天信息技术股份有限公司 Method for blending multiple actions
CN104967893A (en) * 2014-07-10 2015-10-07 腾讯科技(北京)有限公司 Video generation method and apparatus for portable electronic equipment
CN105578184A (en) * 2016-01-27 2016-05-11 努比亚技术有限公司 Key-frame animation generation apparatus and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070159487A1 (en) * 2003-07-21 2007-07-12 Felt Adam C Processing image data
CN102682459A (en) * 2011-03-15 2012-09-19 新奥特(北京)视频技术有限公司 Method for interpolating keyframe animation curve
CN104967893A (en) * 2014-07-10 2015-10-07 腾讯科技(北京)有限公司 Video generation method and apparatus for portable electronic equipment
CN104123735A (en) * 2014-07-24 2014-10-29 无锡梵天信息技术股份有限公司 Method for blending multiple actions
CN105578184A (en) * 2016-01-27 2016-05-11 努比亚技术有限公司 Key-frame animation generation apparatus and method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872375A (en) * 2019-01-10 2019-06-11 珠海金山网络游戏科技有限公司 A kind of skeleton cartoon key frame compression method and device
CN109872375B (en) * 2019-01-10 2023-04-14 珠海金山数字网络科技有限公司 Skeleton animation key frame compression method and device
CN110111402A (en) * 2019-03-28 2019-08-09 北京睿格致科技有限公司 Generation method, device, animation method and the device of 3D parameterized model
CN110111402B (en) * 2019-03-28 2023-12-29 北京睿格致科技有限公司 Method and device for generating 3D parameterized model, and method and device for producing animation
US11689693B2 (en) 2020-04-30 2023-06-27 Boe Technology Group Co., Ltd. Video frame interpolation method and device, computer readable storage medium
CN112634409A (en) * 2020-12-28 2021-04-09 稿定(厦门)科技有限公司 Custom animation curve generation method and device
CN112634409B (en) * 2020-12-28 2022-04-19 稿定(厦门)科技有限公司 Custom animation curve generation method and device

Also Published As

Publication number Publication date
CN105578184A (en) 2016-05-11
CN105578184B (en) 2018-11-20

Similar Documents

Publication Publication Date Title
WO2017128893A1 (en) Keyframe animation creation device and method
US11973723B2 (en) Method for transmitting message and electronic device thereof
US8520019B1 (en) Drag handle for applying image filters in picture editor
KR102243855B1 (en) Method and apparatus for operating image in a electronic device
AU2014250635B2 (en) Apparatus and method for editing synchronous media
CN105578045A (en) Terminal and shooting method of terminal
US9959487B2 (en) Method and device for adding font
US20150063785A1 (en) Method of overlappingly displaying visual object on video, storage medium, and electronic device
EP3015997A1 (en) Method and device for facilitating selection of blocks of information
CN109271587A (en) A kind of page generation method and device
CN106202327B (en) Picture display method and mobile terminal
KR20160059455A (en) Method and device for identifying encoding of web page
CN105892869A (en) Image position adjusting method and device
EP3040856B1 (en) Firmware refreshing method and device
CN110221739A (en) A kind of data processing method, device and electronic equipment
WO2017181544A1 (en) Method and device for managing task of instant messaging application
CN105808145A (en) Method and terminal for achieving image processing
WO2017124897A1 (en) Terminal, method for video frame positioning by terminal, and computer storage medium
CN104765542A (en) Control method and terminal of display interface
JP2016526246A (en) User data update method, apparatus, program, and recording medium
TWI706310B (en) Display method and device of application identification code
CN107368562B (en) Page display method and device and terminal
CN105808107A (en) Picture processing device and method
CN105975188B (en) Picture position adjusting method and device
CN106060253B (en) Information presentation method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16887764

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16887764

Country of ref document: EP

Kind code of ref document: A1