CN113064530A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN113064530A
CN113064530A CN202110453643.1A CN202110453643A CN113064530A CN 113064530 A CN113064530 A CN 113064530A CN 202110453643 A CN202110453643 A CN 202110453643A CN 113064530 A CN113064530 A CN 113064530A
Authority
CN
China
Prior art keywords
animation
image
display
moving
display position
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110453643.1A
Other languages
Chinese (zh)
Inventor
杨泽红
邵帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202110453643.1A priority Critical patent/CN113064530A/en
Publication of CN113064530A publication Critical patent/CN113064530A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04812Interaction techniques based on cursor appearance or behaviour, e.g. being affected by the presence of displayed objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides an image processing method and an image processing device, wherein the image processing method comprises the following steps: setting at least one display position for the animation object in a preset moving area of a background image to be animated under the condition that an animation triggering condition is detected; determining a position image of the animated object at the at least one display position; and constructing a target image of the animation object according to the background image and the position image. Therefore, the whole content of each frame of image of the animation to be made does not need to be drawn repeatedly, the repeated background content only needs to be obtained and rendered once initially, and the previously rendered background content can be reused subsequently, so that the reuse rate of the animation content is improved, and the processing resource is saved.

Description

Image processing method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to an image processing method. The application also relates to an image processing apparatus, a computing device, and a computer-readable storage medium.
Background
With the rapid development of computer technology, animations are more and more popular with people, and various small animations are visible everywhere in life and work. In the prior art, each frame of animation needs to be drawn by a designer, the drawn frames are synthesized into corresponding animation, and the animation is downloaded and played subsequently. However, each frame of animation needs to be drawn separately, repeated contents cannot be multiplexed, each frame of picture of the animation needs to be reproduced as long as the animation contents slightly change, the multiplexing rate of the animation contents is low, a large amount of processing resources are wasted, and the animation production efficiency is low. In addition, when the animation is played, the manufactured complete animation needs to be downloaded in advance, the resources needed to be acquired are large, the time for acquiring the animation is long, blank time may occur on a page, and the user experience is poor.
Disclosure of Invention
In view of this, an embodiment of the present application provides an image processing method. The application also relates to an image processing device, a computing device and a computer readable storage medium, which are used for solving the problems of low reuse rate of animation content and waste of processing resources in the prior art.
According to a first aspect of embodiments of the present application, there is provided an image processing method, including:
setting at least one display position for the animation object in a preset moving area of a background image to be animated under the condition that an animation triggering condition is detected;
determining a position image of the animated object at the at least one display position;
and constructing a target image of the animation object according to the background image and the position image.
According to a second aspect of embodiments of the present application, there is provided an image processing apparatus comprising:
the animation display device comprises a setting module, a display module and a display module, wherein the setting module is configured to set at least one display position for an animation object in a preset moving area of a background image to be animated under the condition that an animation trigger condition is detected;
a first determination module configured to determine a position image of the animated object at the at least one display position;
a first construction module configured to construct a target image of the animated object from the background image and the position image.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is to store computer-executable instructions, and the processor is to execute the computer-executable instructions to:
setting at least one display position for the animation object in a preset moving area of a background image to be animated under the condition that an animation triggering condition is detected;
determining a position image of the animated object at the at least one display position;
and constructing a target image of the animation object according to the background image and the position image.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of any of the image processing methods.
According to the image processing method, under the condition that an animation triggering condition is detected, at least one display position is set for an animation object in a preset moving area of a background image to be animated, then a position image of the animation object at the at least one display position is determined, and then a target image of the animation object can be constructed according to the background image and the position image.
Under the condition, the animation object can be controlled to move according to the set display position, the position image displayed by the animation object at each display position is determined, the target image can be constructed and obtained only according to the background image and the position image subsequently, the whole content of each frame image of the animation to be manufactured does not need to be drawn repeatedly, the repeated background content only needs to be obtained and rendered once initially, the previously rendered background content can be reused in the subsequent animation frame, the reuse rate of the animation content is improved, and the processing resource is saved; in addition, only the background image and the animation object need to be loaded, complete animation does not need to be loaded, the resources needing to be obtained are small, time is saved, blank time of a page is avoided, and user experience is improved.
Drawings
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an initial image provided by an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a display position of an animated object according to an embodiment of the present application;
FIG. 4 is a diagram illustrating a configuration of a scrolling screen according to an embodiment of the present application;
fig. 5 is a process flow diagram of an image processing method applied to a scenario of configuring an egg twisting machine according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present application;
fig. 7 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the present application, an image processing method is provided, and the present application relates to an image processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present application, which specifically includes the following steps:
step 102: the method comprises the steps of obtaining and rendering a background image of an animation to be made, obtaining a preset initial position of an animation object, generating an initial position image of the animation object according to the preset initial position, and generating the initial image of the animation to be made according to the background image and the initial position image.
In practical application, each frame of the animation needs to be drawn by a designer, the drawn frames are synthesized into the corresponding animation, and the animation is downloaded and played subsequently. However, each frame of animation needs to be drawn separately, repeated contents cannot be multiplexed, each frame of picture of the animation needs to be reproduced as long as the animation contents slightly change, the multiplexing rate of the animation contents is low, a large amount of processing resources are wasted, and the animation production efficiency is low. In addition, when the animation is played, each frame of content of the animation needs to be loaded in advance, the resource needing to be acquired is large, the time for acquiring the animation is long, blank time may occur on a page, and the user experience is poor.
Therefore, in order to improve the reuse rate of animation contents and save processing resources, the application provides an image processing method, which can acquire and render a background image of an animation to be made, acquire a preset initial position of an animation object, generate an initial position image of the animation object according to the preset initial position, and then generate an initial image of the animation to be made according to the background image and the initial position image; under the condition that an animation triggering condition is detected, setting at least one display position for an animation object in a preset moving area of a background image to be animated, and determining a position image of the animation object at the at least one display position; and constructing a target image of the animation object according to the background image and the position image. Therefore, the whole content of each frame of image of the animation to be made does not need to be drawn repeatedly, the repeated background content only needs to be obtained and rendered once initially, and the previously rendered background content can be reused in the subsequent animation frames, so that the reuse rate of the animation content is improved, and the processing resources are saved; and the resources required to be acquired are small, so that the time is saved, the blank time of the page is avoided, and the user experience is improved.
Specifically, the animation to be produced refers to the animation which needs to be synthesized at the end of the terminal which needs to play the animation, that is, the animation which needs to be played at the end of the terminal; the background image refers to background content of the animation, that is, content that does not change, the animation object refers to an object that moves in the background image, that is, an object whose position may change, and the preset initial position refers to an initial display position of the animation object in the background image. The position image is an image including only an animation object displayed at a certain position, and the initial position image is an image including only an animation object displayed at a preset initial position.
It should be noted that the preset initial position is a position manually set in advance by a designer, and the position may be a coordinate in the background image, and an initial display position of the animation object in the background image may be determined according to the preset initial position, so as to generate an initial position image of the animation object, and then the initial position image is formed in combination with the background image. In actual implementation, for each animation object, a preset initial position of the animation object and a corresponding picture may be obtained, and then an initial position image of the animation object may be generated according to the preset initial position and the corresponding picture.
In addition, because the whole animation may have a plurality of animation objects moving, that is, the number of animation objects may be one, two, or even a plurality of, the preset initial position of at least one animation object may be obtained, that is, for each animation object, the corresponding initial position is obtained, and the initial position image of the animation object is generated according to each obtained preset initial position, so that the initial image is obtained by combining the background image.
For example, fig. 2 is a schematic diagram of an initial image provided by an embodiment of the present application, as shown in (a) of fig. 2, which is a background image obtained and rendered, assuming that there are 3 animation objects, corresponding pictures of which are shown in (b) of fig. 2, and assuming that preset initial positions thereof are position 1, position 2, and position 3, respectively, at this time, initial position images of the 3 animation objects may be generated according to position 1, position 2, and position 3, as shown in (c) of fig. 2, and then the generated initial position images are combined with the background image, so that an initial image may be obtained, as shown in (d) of fig. 2.
In an optional implementation manner of this embodiment, after generating the initial image, the method may further control the animation object to swing at the current position, so as to generate an animation effect with a more vivid image, that is, after generating the initial image to be animated according to the background image and the initial position image, the method further includes:
acquiring swing parameters of the animation objects, wherein the swing parameters of different animation objects are the same or different;
and controlling the animation object to swing by taking the preset initial position as a center according to the swing parameter to construct a swing picture of the animation object.
Specifically, the swing parameter refers to a value of the animation object swinging, such as a swing delay, a swing period, a swing direction, a swing amplitude, and the like. It should be noted that the number of the animation objects may be at least one, so that the swing parameters of the animation objects may be controlled to be the same, that is, the swings of each animation object are consistent, so that all the animation objects swing neatly and consistently; or, the swing parameters of the animation objects can be controlled to be different, namely, each animation object has a swing mode, so that the swing of the animation objects is more flexible, and the animation effect is more vivid. In actual implementation, the swing parameter of each animation object in at least one animation object is randomly set, that is, the swing parameter of each animation object can be randomly obtained.
In an optional implementation manner of this embodiment, the swing parameter includes a swing delay, a swing period, a swing direction, and a swing amplitude; the controlling the animation object to swing by taking the preset initial position as a center according to the swing parameter to construct a swing picture of the animation object comprises the following steps:
and under the condition of reaching the swinging delay, controlling the animation object to swing along the swinging direction by taking the preset initial position as a center and the swinging period and the swinging amplitude to construct a swinging picture of the animation object.
Specifically, the swing time delay is what time the animation object starts to swing, and if the swing time delay is 3 seconds, all the animation objects are rendered in the background image, and after the initial image is synthesized, when the time reaches 3 seconds, the animation object is controlled to start to swing. The swing period refers to the time taken for the animation object to complete one complete swing and return to the initial position, and if the swing period is 2.8 seconds, the animation object needs to complete one complete swing within 2.8 seconds. The swing direction refers to a direction in which the moving object swings, and the direction may be a horizontal swing left and right, a vertical swing up and down, or the like. The swing amplitude refers to a distance, such as 0.5 mm, 0.8 mm, etc., that the animation object moves during the swing.
It should be noted that, the animation object is controlled to swing along the swing direction with the preset initial position as a center and with the swing period and the swing amplitude, so as to construct a swing picture of the at least one animation object, and actually, the swing position of the animation object at each time is determined, and the animation object is controlled to display at the swing position and store the corresponding swing picture.
In addition, when the animation trigger condition is not detected, the animation object can be controlled to swing, namely, the swinging picture is displayed, and the swinging picture is stopped from being displayed until the animation trigger condition is detected.
For example, there are 3 animation objects, and the swing parameters of animation object 1 are: the swing time delay is 3 seconds, the swing period is 2.8 seconds, the swing direction is left and right, and the swing amplitude is 0.5 mm; the swing parameters of the animated object 2 are: the swing time delay is 2 seconds, the swing period is 3.2 seconds, the swing direction is left and right, and the swing amplitude is 0.5 mm; the swing parameters of the animated object 3 are: the swing time delay is 4 seconds, the swing period is 3.6 seconds, the swing direction is left and right swing, and the swing amplitude is 0.5 mm.
According to the method and the device, the terminal which needs to play the animation can only acquire the background image and the animation object of the animation, then the terminal can generate the corresponding initial position image according to the animation object and the initial position, and generate the initial image of the animation to be made according to the background image and the initial position image, the animation which is made does not need to be directly acquired, and time and resource consumption are saved; and then, the animation object can be controlled to swing in a small amplitude in the background image by taking the current position as the center to obtain a corresponding swing picture, namely the swing picture can be constructed only according to the randomly obtained swing parameters without independently generating each frame of swing picture, so that a more vivid and more flexible animation effect is achieved, the multiplexing rate of animation content is improved on the basis of improving user experience, and the animation production efficiency is further improved.
Step 104: and under the condition that an animation triggering condition is detected, setting at least one display position for the animation object in a preset moving area of the background image to be animated.
Specifically, the animation trigger condition refers to a condition for displaying a scrolling animation, such as that a "lottery control" is triggered, a "play control" is triggered, and the like. The preset moving area refers to a safe area beyond which the center position of the animation object cannot be exceeded. The display position refers to each moving position of the animation object in the process of moving in the preset moving area, namely each moving point position of the center of the animation object, and the display position is represented by a horizontal coordinate and a vertical coordinate, for example, the display position is (lift, top).
It should be noted that at least one animation object may be provided, and the scrolling process of each animation object is not completely the same, that is, each animation object has a corresponding display position, so that at least one display position may be set for each of at least one animation object, and at least one display position of each different animation object may be the same or different.
In an optional implementation manner of this embodiment, before setting the display position, it is further required to determine an area in which the animation object may move, that is, before setting at least one display position for the animation object in a preset moving area of a background image to be animated, the method further includes:
identifying the background image and determining an animation area in the background image;
determining a maximum inscribed polygon of the animation region;
and determining the maximum inscribed polygon as the preset moving area.
Specifically, the animation area refers to the maximum moving range of the animation object, and a safe area, namely a preset moving area, which cannot be exceeded by the center position in the moving process of the animation object can be determined according to the animation area, wherein the preset moving area is located in the animation area. Because the moving object usually occupies a certain area, such as the 'twisting egg' in the egg twisting machine, which is usually a circular object, in order to ensure that the edge of the 'twisting egg' does not exceed the animation area in the moving process, the center position of the 'twisting egg' needs to be controlled to be located in the preset moving area.
For example, as shown in fig. 2 (a), the animation region is within a circle of the background region, and the preset movement region is the largest inscribed quadrangle of the circle.
The concept of the preset moving area is introduced, and the preset moving area is introduced to ensure that the autorotation of each animation object cannot exceed the animation area in the moving process because each animation object can rotate along the central point of the preset moving area in the moving process of the set track.
In an optional implementation manner of this embodiment, when setting at least one display position for an animation object, determining a number of turns of movement of the animation object, and then determining a display position of each turn, that is, setting at least one display position for the animation object in a preset movement region of a background image to be animated, may include:
determining preset animation parameters of the animation object, wherein the preset animation parameters comprise the moving turns of the animation object moving along the preset moving area;
acquiring a plurality of sets of position coordinates of the moving circle, wherein each set of position coordinates is corresponding to the moving circle of the animation object along the moving area, and the position coordinates are located in the preset moving area;
determining each set of the location coordinates as the at least one display location.
Specifically, the preset animation parameters refer to various parameter values of the movement of the animation object, for example, the preset animation parameters may include the number of moving turns of the animation object moving along a preset moving area, that is, the number of rolling turns of the animation object. It should be noted that the moving turns of each animation object moving along the preset moving area may be the same or different, and in this application, the moving turns of each different animation object are the same as an example for explanation.
In addition, since the animation object is scrolling from the current position, when the first loop is moved along the preset movement region, the current display position (i.e., the preset initial position) may be determined as the first display position of the first loop; in addition, after the animation object is scrolled, the initial position can be returned, so that the current display position (i.e. the preset initial position) can be determined as the last display position of the last circle of scrolling.
In practical application, the preset animation parameters comprise the moving turns of the animation object moving along the preset moving area, and the moving turns can be randomly set; and each display position of the animation object in each circle of moving process can be randomly set, namely, the moving position can be randomly set for the animation object in the application, so that the animation object can be conveniently controlled to move according to the randomly set display position.
For example, fig. 3 is a schematic diagram of display positions of an animation object according to an embodiment of the present application, and as shown in fig. 3, positions corresponding to respective numbers represent respective display positions of a certain animation object moving along a preset moving area, where a number "1" represents respective display positions moving a first circle, a number "2" represents respective display positions moving a second circle, and a number "3" represents respective display positions moving a third circle.
According to the method and the device, each moving position of each animation object in the at least one animation object in the preset moving area can be randomly set, namely at least one display position of the animation object is randomly determined, so that the corresponding position image can be conveniently and directly displayed and stored according to the display position, and designers do not need to draw each frame of picture independently.
In an optional implementation manner of this embodiment, in addition to determining at least one display position where the animation object moves in the preset movement region, when the animation object is displayed at each display position, the method may further include:
determining a total path length of the animated object moving the number of movements in the background image;
for each display position, determining the length of a moving path between the display position and the preset initial position;
and determining the moving progress corresponding to the display position according to the moving path length and the total path length.
Specifically, the moving progress is a percentage of the current moving distance in the total distance to be moved, so that the number of moving turns obtained by rolling the animation object in the background image, the total distance to be moved, and the total path length can be calculated first; calculating the distance of moving to the current display position, namely the length of the moving path; and then calculating the proportion of the length of the moving path to the total path length, namely the current moving progress, namely the animation progress.
In an optional implementation manner of this embodiment, the preset animation parameters further include a moving direction in which the animation object moves along the preset moving area;
determining a total path length for the animated object to move the number of movements in the background image, including:
determining the sequence of each display position corresponding to the animation object according to the moving direction;
determining the moving distance between two adjacent display positions according to the sequence;
and determining the total path length according to the moving distance between the two adjacent display positions.
It should be noted that, when determining the movement distance between two adjacent display positions, the horizontal and vertical coordinates of the two adjacent display positions may be determined, and then the distance between the two display positions is calculated according to the horizontal and vertical coordinates of the two adjacent display positions, and the distance is determined as the movement distance. The specific implementation process is shown in the following formula (1):
Figure BDA0003039702900000101
wherein L represents a moving distance between two adjacent display positions, and X1Abscissa, Y, representing the first display position1A vertical coordinate representing the first display position; x2An abscissa indicating a second display position; y is2The ordinate of the second display position is indicated.
In the above example, as shown in fig. 3, assuming that the moving direction is clockwise movement and the animation object finally returns to the initial position, the moving distance between the first number "1" and the second number "1", the moving distance between the second number "1" and the third number "1", the moving distance between the third number "1" and the fourth number "1", the moving distance between the fourth number "1" and the first number "2", the moving distance between the first number "2" and the second number "2", the moving distance between the second number "2" and the third number "2", the moving distance between the third number "2" and the fourth number "2", the moving distance between the fourth number "2" and the first number "3", the moving distance between the first number "3" and the second number "3", and the moving distance between the first number "3" and the second number "3" are sequentially determined from left to right, The distance of movement between the second digit "3" and the third digit "3", the distance of movement between the third digit "3" and the fourth digit "3", and the distance of movement between the fourth digit "3" and the first digit "1". And sequentially adding the determined moving distances to obtain the total path length of the moving turns of the animation object in the background image.
In an optional implementation manner of this embodiment, determining, for each display position, a moving path length between the display position and the preset initial position includes:
determining the preset initial position, the display position and each display position between the preset initial position and the display position as a reference display position;
determining the sequence of each reference display position corresponding to the animation object according to the moving direction;
determining the moving distance between two adjacent reference display positions according to the sequence;
and determining the length of the moving path according to the moving distance between the two adjacent reference display positions.
Specifically, the preset initial position is an initial position before the animation object starts to move, and the display position refers to a current display position to which the animation object is to be moved.
Along the above example, assume that the currently determined display position is the position corresponding to the second number "2" in fig. 3, i.e. the animation object is to move to the position corresponding to the second number "2". At this time, the first number "1", the second number "1", the third number "1", the fourth number "1", the first number "2", and the second number "2" are determined as the reference display positions. And then, according to the clockwise movement of the movement direction, determining the movement distance between two adjacent reference display positions, namely sequentially determining the movement distance between a first number '1' and a second number '1', the movement distance between the second number '1' and a third number '1', the movement distance between the third number '1' and a fourth number '1', the movement distance between the fourth number '1' and a first number '2', and the movement distance between the first number '2' and a second number '2'. And sequentially adding the determined moving distances to obtain the moving path length between the current display position and the preset initial position.
For example, the movement progress corresponding to the display position (130, 200) is 0%, that is, the display position (130, 200) is the initial display position; the moving progress corresponding to the display positions (240, 108) is 7%; the moving progress corresponding to the display positions (215, 85) is 8%; the corresponding movement progress of the display position (95, 188) is 16%; the moving progress corresponding to the display positions (166, 205) is 20%; the corresponding movement progress of the display position (240, 179) is 24%; the display position (185, 85) corresponds to a movement progress of 29%.
Step 106: a position image of the animated object at the at least one display position is determined.
Specifically, under the condition that an animation trigger condition is detected, on the basis of setting at least one display position for an animation object in a preset moving area of a background image to be animated, further, a position image of the animation object at the at least one display position is determined. Here, the position image refers to an image in which the animation object is displayed at the display position, that is, the position image refers to an image including only the animation object displayed at the display position.
It should be noted that after at least one display position is set for the animation object, each moving point position at which the animation object moves within a preset moving area is determined, and then the animation object can be controlled to be displayed at the at least one display position, that is, the animation object is controlled to move according to the acquired display position, so that a position image when the animation object moves to each position can be obtained.
In an optional implementation manner of this embodiment, the determining the position image of the animation object at the at least one display position may be implemented as follows:
and controlling the animation object to be displayed at the corresponding display position in the background image, and displaying the moving progress corresponding to the display position to obtain a corresponding position image.
It should be noted that, if the corresponding moving progress is obtained by calculation for each display position, the moving progress corresponding to the display position may be displayed while the animation object is displayed at the display position to obtain a corresponding position image, so that the user may clearly know the moving progress of the current animation object, that is, the playing progress of the animation.
In an optional implementation manner of this embodiment, the preset animation parameters further include a display duration of the animation object at the display position, and the display durations corresponding to different animation objects are the same or different;
determining a position image of the animated object at the at least one display position, comprising:
and controlling the animation object to display the display duration at the at least one display position to obtain a corresponding position image.
It should be noted that the total animation time lengths corresponding to different animation objects may be different or the same, where the total animation time length refers to the time length consumed by the animation object to complete the movement of all turns, for example, 5 seconds is consumed when the animation object 1 finishes moving 3 turns, 5.2 seconds is consumed when the animation object 2 finishes moving 3 turns, and 5.4 seconds is consumed when the animation object 3 finishes moving 3 turns.
In practical application, the total animation duration is divided by the total number of the display positions, so that the display duration of the animation object displayed at each display position can be determined, then each of the at least one animation object is controlled to display the display duration at the at least one display position, and the corresponding position image is stored. Thus, the animation objects can be controlled to move at the same speed or different speeds, and the corresponding scroll animation can be obtained.
In an optional implementation manner of this embodiment, determining that the animated object is in front of the position image of the at least one display position further includes:
acquiring autorotation parameters of the animation objects, wherein the autorotation parameters corresponding to different animation objects are the same or different;
accordingly, determining a position image of the animated object at the at least one display position comprises:
and controlling the animation object to be displayed at the at least one display position according to the display position and the rotation parameter, and rotating according to the rotation parameter to obtain a corresponding position image.
Specifically, the rotation parameter refers to parameters such as a rotation direction and a rotation speed of the animation object. The rotation parameters of different animation objects may be the same or different. The autorotation parameters of an animation object at different moments can also be different, for example, the animation object autorotates at a first speed within a preset time length when the animation object starts to move, and autorotates at a second speed after the preset time length until the movement is stopped, and the autorotation is stopped; or the animation object autorotates at the first speed within the preset time length when the animation object starts to move, and after the preset time length, the autorotating speed is decreased from the second speed until the movement is stopped and the autorotating is stopped.
It should be noted that, in addition to scrolling in the preset moving area, the animation object may also rotate during the scrolling process, so that the rotation parameter of each animation object may also be obtained, and in the process of controlling the animation object to move from one display position to another display position, the animation object moves along with the rotation, so as to obtain the corresponding position image, thereby enriching the animation effect.
Step 108: and constructing a target image of the animation object according to the background image and the position image.
Specifically, on the basis of determining the position image of the animation object at the at least one display position, a target image of the animation object is further constructed according to the background image and the position image. The target image is a complete image obtained by synthesizing the background image and the position image, namely the target image is an image frame in the animation to be made.
In an optional implementation manner of this embodiment, since the constructed target images together are to be animated, after constructing the target image of the animated object according to the background image and the position image, the method further includes:
and constructing the rolling animation of the animation to be made according to the target image.
In practical application, after each target image of the animation object is constructed and obtained according to the background image and each position image, the terminal needing to play the animation can splice each target image in sequence and play the target image, and then the animation can be played.
It should be noted that the animation object can obtain a corresponding position image when displayed at each display position, and a corresponding rolling animation can be constructed based on the background image and each position image, without separately drawing all animation contents of each frame, thereby improving the reuse rate of the same animation contents and greatly saving processing resources.
For example, fig. 4 is a schematic diagram of a configuration of a scroll screen according to an embodiment of the present application, as shown in fig. 4, (a) refers to an initial image generated according to a background image to be animated and an initial position image, (b) refers to a position image saved when an animation object moves to a position X1, (c) refers to a position image saved when the animation object moves to a position X2, and (d) refers to a position image saved when the animation object moves to a position X3, and then the background image in the initial image (a) and the position images in (b), (c), and (d) are respectively combined in sequence, so that a corresponding scroll animation can be configured.
It should be noted that, in the prior art, each frame of animation is often produced separately, and assuming that the animation includes 10 frames of animation, the size of each frame of animation is 10M, wherein the background image occupies 7M, and the animation object occupies 3M, then the size of the animation that needs to be transferred and downloaded in the prior art is 10M × 10M, which is equal to 100M. In the application, only during the initial rendering, the background image is obtained once, and only the position image of the animation object is transmitted subsequently (namely the moving process of the animation object), namely, the size of the animation needing to be transmitted and downloaded is 10M +3 × 10M and is equal to 40M, so that the processing resources can be greatly saved.
According to the image processing method, the background image of the animation to be made can be obtained and rendered, the preset initial position of the animation object is obtained, the initial position image of the animation object is generated according to the preset initial position, and then the initial image of the animation to be made is generated according to the background image and the initial position image; then, under the condition that an animation triggering condition is detected, at least one display position is set for an animation object in a preset moving area of a background image of the animation to be made, a position image of the animation object at the at least one display position is determined, then a target image of the animation object is constructed according to the background image and the position image, and then a rolling animation of the animation to be made is constructed according to the target image.
Under the condition, only the background image of the animation needs to be obtained and rendered once at the beginning, then the animation object can be controlled to move according to the set display position, the position image displayed by the animation object at each display position is determined, and the target image of the animation object can be constructed and obtained only according to the background image and the position image subsequently, so that the rolling animation of the animation to be made is obtained, the whole content of each frame of image of the animation to be made does not need to be drawn repeatedly, the repeated background content only needs to be obtained and rendered once at the beginning, the previously rendered background content can be reused in the subsequent animation frame, the reuse rate of the animation content is improved, and the processing resource is saved; in addition, only the background image and the animation object need to be loaded, complete animation does not need to be loaded, the resources needing to be obtained are small, time is saved, blank time of a page is avoided, and user experience is improved.
The following description will further describe the image processing method with reference to fig. 5, by taking an example of an application of the image processing method provided by the present application in a scenario where an egg twisting machine is configured in an operation activity management platform. Fig. 5 shows a processing flow chart of an image processing method applied to configuring a scene of an egg twisting machine according to an embodiment of the present application, which specifically includes the following steps:
step 502: the method comprises the steps of obtaining and rendering an image of an egg twisting machine, obtaining a preset initial position of an egg, generating an initial egg twisting image of the egg twisting according to the preset initial position, and generating an initial image of the animation to be made according to the image of the egg twisting machine and the initial egg twisting image.
In practical applications, in the implementation of the present egg twisting machine, a designer needs to draw each frame (each frame includes the state of the egg twisting machine, the position and the rotation angle of each twisted egg), and then synthesize the picture frames of the static swing animation and the rolling animation into animation respectively, or render each frame into static or rolling animation in a fixed sequence by the front end. However, each frame of animation needs to be drawn separately, repeated contents cannot be multiplexed, each frame of picture of the animation needs to be reproduced as long as the animation contents slightly change, the multiplexing rate of the animation contents is low, a large amount of processing resources are wasted, and the animation production efficiency is low. In addition, when the animation is played, each frame of content of the animation needs to be loaded in advance, the resource needing to be acquired is large, the time for acquiring the animation is long, blank time may occur on a page, and the user experience is poor.
Therefore, in order to improve the reuse rate of animation contents and save processing resources, the application provides an image processing method, a swinging picture and a rolling picture can be dynamically generated by configuring the initial position and the display position of each twisted egg, the configuration is more flexible, each frame of the animation does not need to be drawn independently, repeated background contents only need to be obtained and rendered once initially, the previously rendered contents can be reused in subsequent animation frames, the reuse rate of the animation contents is improved, and the processing resources are saved; in addition, only the background image and the animation object need to be loaded, complete animation does not need to be loaded, the resources needing to be obtained are small, time is saved, blank time of a page is avoided, and user experience is improved.
Step 504: and setting a safety zone for the twisted eggs.
In specific implementation, the image of the egg twisting machine can be identified, a sphere area in the image of the egg twisting machine is determined, the maximum inscribed quadrangle of the sphere area is determined, and the maximum inscribed quadrangle is determined as the safety area.
The safety zone concept is introduced in the application, and the safety zone can ensure that the self-rotation of each twisted egg cannot exceed the container in the moving process because each twisted egg can rotate along with the rotation of the center point of each twisted egg in the moving process of the given track.
Step 506: and acquiring swing parameters of the twisted eggs, controlling the twisted eggs to swing by taking a preset initial position as a center according to the swing parameters, and constructing swing pictures of the twisted eggs.
Step 508: setting at least one display position for the twisted eggs in a safety area of the image of the egg twisting machine under the condition that a lottery drawing control is detected to be triggered; and then determining the total path length of the twisted eggs, determining the moving path length between the display position and the preset initial position aiming at each display position, and determining the moving progress corresponding to the display position according to the moving path length and the total path length.
Step 510: and acquiring rotation parameters of the twisted eggs, controlling the twisted eggs to be displayed at least one display position according to the display positions and the rotation parameters, rotating according to the rotation parameters, and displaying the movement progress corresponding to the display positions to obtain corresponding twisted egg images.
In specific implementation, after the preset initial position, at least one display position and the corresponding moving progress are obtained, a keyframes character string of the CSS can be created according to the information, an animation is generated and named (such as rotate) and added into a style sheet, and therefore the corresponding twisted egg image is obtained.
Step 512: and constructing a target image of the twisted egg according to the image of the egg twisting machine and the image of the twisted egg, and constructing a rolling animation of the twisted egg according to the target image.
Step 514: when the scroll animation display is completed, the process returns to step 506, and the swing screen is displayed.
According to the image processing method, only the image of the egg twisting machine of the animation to be made needs to be obtained and rendered once, then the egg twisting machine can be controlled to move according to the set display position, the egg twisting image displayed at each display position of the egg twisting machine is determined, the target image of the animation object can be constructed and obtained only according to the image of the egg twisting machine and the image of the egg twisting machine subsequently, and therefore the rolling animation of the animation to be made is obtained, the whole content of each frame of the image of the egg twisting animation does not need to be drawn repeatedly, the repeated content of the egg twisting machine only needs to be obtained and rendered once initially, the content of the egg twisting machine rendered before can be reused in the subsequent animation frames, the reuse rate of the animation content is improved, and processing resources are saved; in addition, only the image of the egg twisting machine and the egg twisting are loaded, complete animation is not required to be loaded, the resource required to be obtained is small, time is saved, blank time of a page is avoided, and user experience is improved.
Corresponding to the above method embodiment, the present application further provides an image processing apparatus embodiment, and fig. 6 shows a schematic structural diagram of an image processing apparatus provided in an embodiment of the present application. As shown in fig. 6, the apparatus includes:
a setting module 602 configured to set at least one display position for the animation object within a preset moving area of a background image to be animated, in case that an animation trigger condition is detected;
a first determining module 604 configured to determine a position image of the animated object at the at least one display position;
a first construction module 606 configured to construct a target image of the animated object from the background image and the position image.
Optionally, the apparatus further comprises a second determining module configured to:
identifying the background image and determining an animation area in the background image;
determining a maximum inscribed polygon of the animation region;
and determining the maximum inscribed polygon as the preset moving area.
Optionally, the setup module 602 is further configured to:
determining preset animation parameters of the animation object, wherein the preset animation parameters comprise the moving turns of the animation object moving along the preset moving area;
acquiring a plurality of sets of position coordinates of the moving circle, wherein each set of position coordinates is corresponding to the moving circle of the animation object along the moving area, and the position coordinates are located in the preset moving area;
determining each set of the location coordinates as the at least one display location.
Optionally, the setup module 602 is further configured to:
determining a total path length of the animated object moving the number of movements in the background image;
for each display position, determining the length of a moving path between the display position and the preset initial position;
and determining the moving progress corresponding to the display position according to the moving path length and the total path length.
Optionally, the preset animation parameters further include a moving direction of the animation object moving along the preset moving area;
the setup module 602 is further configured to:
determining the sequence of each display position corresponding to the animation object according to the moving direction;
determining the moving distance between two adjacent display positions according to the sequence;
and determining the total path length according to the moving distance between the two adjacent display positions.
Optionally, the setup module 602 is further configured to:
determining the preset initial position, the display position and each display position between the preset initial position and the display position as a reference display position;
determining the sequence of each reference display position corresponding to the animation object according to the moving direction;
determining the moving distance between two adjacent reference display positions according to the sequence;
and determining the length of the moving path according to the moving distance between the two adjacent reference display positions.
Optionally, the first determining module 604 is further configured to:
and controlling the animation object to be displayed at the corresponding display position in the background image, and displaying the moving progress corresponding to the display position to obtain a corresponding position image.
Optionally, the preset animation parameters further include display durations of the animation objects at the display positions, and the display durations corresponding to different animation objects are the same or different;
the first determination module 604 is further configured to:
and controlling the animation object to display the display duration at the at least one display position to obtain a corresponding position image.
Optionally, the apparatus further comprises a generating module configured to:
acquiring and rendering the background image of the animation to be made;
acquiring a preset initial position of the animation object, and generating an initial position image of the animation object according to the preset initial position;
and generating the initial image of the animation to be made according to the background image and the initial position image.
Optionally, the apparatus further comprises a first obtaining module configured to:
acquiring autorotation parameters of the animation objects, wherein the autorotation parameters corresponding to different animation objects are the same or different;
accordingly, the first determination module 604 is further configured to:
and controlling the animation object to be displayed at the at least one display position according to the display position and the rotation parameter, and rotating according to the rotation parameter to obtain a corresponding position image.
Optionally, the apparatus further comprises a second obtaining module configured to:
acquiring swing parameters of the animation objects, wherein the swing parameters of different animation objects are the same or different;
and controlling the animation object to swing by taking the preset initial position as a center according to the swing parameter to construct a swing picture of the animation object.
Optionally, the swing parameters include a swing delay, a swing period, a swing direction, and a swing amplitude;
the second acquisition module is further configured to:
and under the condition of reaching the swinging delay, controlling the animation object to swing along the swinging direction by taking the preset initial position as a center and the swinging period and the swinging amplitude to construct a swinging picture of the animation object.
Optionally, the apparatus further comprises a second construction module configured to:
and constructing the rolling animation of the animation to be made according to the target image.
According to the image processing device, only the background image of the animation needs to be obtained and rendered once at the beginning, then the animation object can be controlled to move according to the set display position, the position image displayed by the animation object at each display position is determined, the target image of the animation object can be constructed and obtained only according to the background image and the position image, so that the rolling animation of the animation to be made is obtained, the whole content of each frame of the image of the animation to be made does not need to be drawn repeatedly, the repeated background content only needs to be obtained and rendered once at the beginning, the previously rendered background content can be reused in the subsequent animation frames, the reuse rate of the animation content is improved, and the processing resources are saved; in addition, only the background image and the animation object need to be loaded, complete animation does not need to be loaded, the resources needing to be obtained are small, time is saved, blank time of a page is avoided, and user experience is improved.
The above is a schematic configuration of an image processing apparatus of the present embodiment. It should be noted that the technical solution of the image processing apparatus belongs to the same concept as the technical solution of the image processing method, and details that are not described in detail in the technical solution of the image processing apparatus can be referred to the description of the technical solution of the image processing method.
Fig. 7 illustrates a block diagram of a computing device 700 provided according to an embodiment of the present application. The components of the computing device 700 include, but are not limited to, memory 710 and a processor 720. Processor 720 is coupled to memory 710 via bus 730, and database 750 is used to store data.
Computing device 700 also includes access device 770, which access device 770 enables computing device 700 to communicate via one or more networks 760. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 770 may include one or more of any type of network interface (e.g., a Network Interface Card (NIC)) whether wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the application, the above-described components of the computing device 700 and other components not shown in fig. 7 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 7 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 700 may also be a mobile or stationary server.
Wherein processor 720 is configured to execute the following computer-executable instructions:
setting at least one display position for the animation object in a preset moving area of a background image to be animated under the condition that an animation triggering condition is detected;
determining a position image of the animated object at the at least one display position;
and constructing a target image of the animation object according to the background image and the position image.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the image processing method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the image processing method.
An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, which when executed by a processor, are used for the operation steps of the image processing method.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the image processing method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the image processing method.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (16)

1. An image processing method, comprising:
setting at least one display position for the animation object in a preset moving area of a background image to be animated under the condition that an animation triggering condition is detected;
determining a position image of the animated object at the at least one display position;
and constructing a target image of the animation object according to the background image and the position image.
2. The image processing method according to claim 1, wherein before setting at least one display position for the animation object within a preset movement region of the background image to be animated, further comprising:
identifying the background image and determining an animation area in the background image;
determining a maximum inscribed polygon of the animation region;
and determining the maximum inscribed polygon as the preset moving area.
3. The image processing method according to claim 2, wherein setting at least one display position for the animation object within a preset movement region of the background image to be animated comprises:
determining preset animation parameters of the animation object, wherein the preset animation parameters comprise the moving turns of the animation object moving along the preset moving area;
acquiring a plurality of sets of position coordinates of the moving circle, wherein each set of position coordinates is corresponding to the moving circle of the animation object along the moving area, and the position coordinates are located in the preset moving area;
determining each set of the location coordinates as the at least one display location.
4. The image processing method according to claim 3, wherein after determining each set of the location coordinates as the at least one display location, further comprising:
determining a total path length of the animated object moving the number of movements in the background image;
for each display position, determining the length of a moving path between the display position and the preset initial position;
and determining the moving progress corresponding to the display position according to the moving path length and the total path length.
5. The image processing method according to claim 4, wherein the preset animation parameters further include a moving direction in which the animated object moves along the preset moving region;
determining a total path length for the animated object to move the number of movements in the background image, including:
determining the sequence of each display position corresponding to the animation object according to the moving direction;
determining the moving distance between two adjacent display positions according to the sequence;
and determining the total path length according to the moving distance between the two adjacent display positions.
6. The image processing method according to claim 5, wherein determining, for each of the display positions, a movement path length between the display position and the preset initial position comprises:
determining the preset initial position, the display position and each display position between the preset initial position and the display position as a reference display position;
determining the sequence of each reference display position corresponding to the animation object according to the moving direction;
determining the moving distance between two adjacent reference display positions according to the sequence;
and determining the length of the moving path according to the moving distance between the two adjacent reference display positions.
7. The image processing method of claim 4, wherein determining a position image of the animated object at the at least one display position comprises:
and controlling the animation object to be displayed at the corresponding display position in the background image, and displaying the moving progress corresponding to the display position to obtain a corresponding position image.
8. The image processing method according to claim 3, wherein the preset animation parameters further include a display duration of the animation object at the display position, and the display durations corresponding to different animation objects are the same or different;
determining a position image of the animated object at the at least one display position, comprising:
and controlling the animation object to display the display duration at the at least one display position to obtain a corresponding position image.
9. The image processing method according to any one of claims 1 to 8, wherein, in a case where the animation trigger condition is detected, before setting at least one display position for the animation object within a preset movement region of the background image to be animated, further comprising:
acquiring and rendering the background image of the animation to be made;
acquiring a preset initial position of the animation object, and generating an initial position image of the animation object according to the preset initial position;
and generating the initial image of the animation to be made according to the background image and the initial position image.
10. The image processing method of any of claims 1-8, wherein determining the position image of the animated object at the at least one display position further comprises:
acquiring autorotation parameters of the animation objects, wherein the autorotation parameters corresponding to different animation objects are the same or different;
accordingly, determining a position image of the animated object at the at least one display position comprises:
and controlling the animation object to be displayed at the at least one display position according to the display position and the rotation parameter, and rotating according to the rotation parameter to obtain a corresponding position image.
11. The image processing method according to claim 9, further comprising, after generating the initial image to be animated based on the background image and the initial position image:
acquiring swing parameters of the animation objects, wherein the swing parameters of different animation objects are the same or different;
and controlling the animation object to swing by taking the preset initial position as a center according to the swing parameter to construct a swing picture of the animation object.
12. The image processing method according to claim 11, wherein the wobble parameters include a wobble delay, a wobble period, a wobble direction, and a wobble amplitude; the controlling the animation object to swing by taking the preset initial position as a center according to the swing parameter to construct a swing picture of the animation object comprises the following steps:
and under the condition of reaching the swinging delay, controlling the animation object to swing along the swinging direction by taking the preset initial position as a center and the swinging period and the swinging amplitude to construct a swinging picture of the animation object.
13. The image processing method according to any one of claims 1 to 8, further comprising, after constructing a target image of the animated object from the background image and the position image:
and constructing the rolling animation of the animation to be made according to the target image.
14. An image processing apparatus characterized by comprising:
the animation display device comprises a setting module, a display module and a display module, wherein the setting module is configured to set at least one display position for an animation object in a preset moving area of a background image to be animated under the condition that an animation trigger condition is detected;
a first determination module configured to determine a position image of the animated object at the at least one display position;
a first construction module configured to construct a target image of the animated object from the background image and the position image.
15. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions to implement the method of:
setting at least one display position for the animation object in a preset moving area of a background image to be animated under the condition that an animation triggering condition is detected;
determining a position image of the animated object at the at least one display position;
and constructing a target image of the animation object according to the background image and the position image.
16. A computer-readable storage medium storing computer-executable instructions which, when executed by a processor, perform the steps of the image processing method of any one of claims 1 to 13.
CN202110453643.1A 2021-04-26 2021-04-26 Image processing method and device Pending CN113064530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110453643.1A CN113064530A (en) 2021-04-26 2021-04-26 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110453643.1A CN113064530A (en) 2021-04-26 2021-04-26 Image processing method and device

Publications (1)

Publication Number Publication Date
CN113064530A true CN113064530A (en) 2021-07-02

Family

ID=76567478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110453643.1A Pending CN113064530A (en) 2021-04-26 2021-04-26 Image processing method and device

Country Status (1)

Country Link
CN (1) CN113064530A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568548A (en) * 2021-08-05 2021-10-29 北京达佳互联信息技术有限公司 Animation information processing method and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8251821B1 (en) * 2007-06-18 2012-08-28 Ailive, Inc. Method and system for interactive control using movable controllers
CN103157281A (en) * 2013-04-03 2013-06-19 广州博冠信息科技有限公司 Display method and display equipment of two-dimension game scene
CN105376500A (en) * 2014-08-18 2016-03-02 三星电子株式会社 Video processing apparatus for generating paranomic video and method thereof
CN108289234A (en) * 2018-01-05 2018-07-17 武汉斗鱼网络科技有限公司 A kind of virtual present special efficacy animated show method, apparatus and equipment
CN112102422A (en) * 2020-11-19 2020-12-18 蚂蚁智信(杭州)信息技术有限公司 Image processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8251821B1 (en) * 2007-06-18 2012-08-28 Ailive, Inc. Method and system for interactive control using movable controllers
CN103157281A (en) * 2013-04-03 2013-06-19 广州博冠信息科技有限公司 Display method and display equipment of two-dimension game scene
CN105376500A (en) * 2014-08-18 2016-03-02 三星电子株式会社 Video processing apparatus for generating paranomic video and method thereof
CN108289234A (en) * 2018-01-05 2018-07-17 武汉斗鱼网络科技有限公司 A kind of virtual present special efficacy animated show method, apparatus and equipment
CN112102422A (en) * 2020-11-19 2020-12-18 蚂蚁智信(杭州)信息技术有限公司 Image processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568548A (en) * 2021-08-05 2021-10-29 北京达佳互联信息技术有限公司 Animation information processing method and apparatus

Similar Documents

Publication Publication Date Title
CN110704768B (en) Webpage rendering method and device based on graphics processor
CN113630615B (en) Live broadcast room virtual gift display method and device
CN110298907B (en) Virtual character action control method and device, computing equipment and storage medium
US10685472B1 (en) Animation brushes
CN112489171A (en) Animation effect simulation method and device
US11989814B2 (en) Image processing method and apparatus, electronic device, and storage medium
CN111899319A (en) Expression generation method and device of animation object, storage medium and electronic equipment
CN115423923A (en) Model rendering method and device
CN110930484B (en) Animation configuration method and device, storage medium and electronic device
CN113064530A (en) Image processing method and device
CN112604287B (en) Virtual role state control method and device
CN112604279A (en) Special effect display method and device
CN111145318B (en) Rendering method and device based on NGUI
CN113127126A (en) Object display method and device
CN116342787A (en) Picture rendering system, method and image processing platform
CN113209626B (en) Game picture rendering method and device
CN112221150B (en) Ripple simulation method and device in virtual scene
CN112604282B (en) Virtual lens control method and device
CN114565707A (en) 3D object rendering method and device
CN111135580B (en) Game character standby animation generation method and device
CN111063013A (en) Role action splicing method and device
CN110860084A (en) Virtual picture processing method and device
CN111127602B (en) Animation production method and device based on NGUI
CN111617470B (en) Interface special effect rendering method and device
CN111124582B (en) Icon calling method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination