CN111741332B - Particle swarm rotating video production method and medium - Google Patents

Particle swarm rotating video production method and medium Download PDF

Info

Publication number
CN111741332B
CN111741332B CN202010575941.3A CN202010575941A CN111741332B CN 111741332 B CN111741332 B CN 111741332B CN 202010575941 A CN202010575941 A CN 202010575941A CN 111741332 B CN111741332 B CN 111741332B
Authority
CN
China
Prior art keywords
particle
video frame
current video
rotation
motion
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.)
Active
Application number
CN202010575941.3A
Other languages
Chinese (zh)
Other versions
CN111741332A (en
Inventor
詹令
林杰兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoding Xiamen Technology Co Ltd
Original Assignee
Gaoding Xiamen 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 Gaoding Xiamen Technology Co Ltd filed Critical Gaoding Xiamen Technology Co Ltd
Priority to CN202010575941.3A priority Critical patent/CN111741332B/en
Publication of CN111741332A publication Critical patent/CN111741332A/en
Application granted granted Critical
Publication of CN111741332B publication Critical patent/CN111741332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47205End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a method and a medium for making particle swarm rotating videos, wherein the method comprises the following steps: acquiring motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame; calculating the pre-position of the particle in the current video frame according to the final position and the speed of the particle in the previous video frame, and calculating the speed, the rotation angular velocity, the rotation motion length and the rotation angle of the particle in the current video frame; acquiring a random unit vector, calculating a direction vector of the particle in the current video frame, and calculating a final position of the particle in the current video frame according to the direction vector of the particle; rendering the current video frame according to the final position of each particle in the current video frame so as to finish the production of the particle swarm rotating video according to all the video frames; the particle swarm rotating video can be generated quickly, the calculation process is simple and quick, calculation resources required to be consumed in the particle swarm video generation process are reduced, and the particle swarm video generation efficiency is improved.

Description

Particle swarm rotating video production method and medium
Technical Field
The present invention relates to the field of video generation technologies, and in particular, to a method for generating a particle swarm rotating video and a computer-readable storage medium.
Background
In the related art, when an attenuation rotation video of a particle swarm is generated, a complicated calculation method is often needed; presenting the particle swarm attenuation motion in a video mode; further, a large amount of computing power is consumed in the generation process of the particle swarm rotating video in the existing mode, waste of manpower and material resources is caused, and the generation efficiency is low.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide a method for producing a particle swarm rotating video, which can generate a particle swarm rotating video quickly, has a simple and quick calculation process, reduces the calculation resources required to be consumed in the particle swarm video generation process, and improves the particle swarm video generation efficiency.
A second object of the invention is to propose a computer-readable storage medium.
In order to achieve the above object, a first embodiment of the present invention provides a method for particle swarm rotation video production, which includes the following steps: acquiring motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame; when the position of the particle in the current video frame is updated, calculating the pre-position of the particle in the current video frame according to the final position and the speed of the particle in the previous video frame, and calculating the speed, the rotational angular velocity, the rotational motion length and the rotational angle of the particle in the current video frame according to the speed, the rotational angular velocity, the rotational motion length, the rotational angle and the particle motion attenuation coefficient of the particle in the previous video frame; acquiring a random unit vector, calculating a direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame, and calculating a final position of the particle in the current video frame according to the direction vector of the particle; and rendering the current video frame according to the final position of each particle in the current video frame so as to finish the production of the particle swarm rotating video according to all the video frames.
According to the particle swarm rotating video production method, firstly, motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame are obtained; then, when the position of the particle in the current video frame is updated, calculating the pre-position of the particle in the current video frame according to the final position and the speed of the particle in the previous video frame, and calculating the speed, the rotational angular velocity, the rotational motion length and the rotational angle of the particle in the current video frame according to the speed, the rotational angular velocity, the rotational motion length, the rotational angle and the particle motion attenuation coefficient of the particle in the previous video frame; then, obtaining a random unit vector, calculating a direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame, and calculating a final position of the particle in the current video frame according to the direction vector of the particle; then, rendering the current video frame according to the final position of each particle in the current video frame so as to finish the production of the particle swarm rotating video according to all the video frames; therefore, the particle swarm rotary video is generated quickly, the calculation process is simple and quick, calculation resources required to be consumed in the particle swarm video generation process are reduced, and the particle swarm video generation efficiency is improved.
In addition, the particle swarm rotation video production method proposed by the above embodiment of the present invention may further have the following additional technical features:
optionally, the pre-position of the particle in the current video frame is calculated according to the following formula:
P(n)`=P(n-1)+V(n-1)*deltaT
wherein P (n) represents the pre-position of the particle in the current video frame, P (n-1) represents the final position of the particle in the previous video frame, V (n-1) represents the velocity of the particle in the previous video frame, and deltaT represents the time step required for updating each video frame.
Optionally, the particle motion attenuation coefficient comprises a velocity attenuation coefficient, a rotational angular velocity attenuation coefficient, and a rotational motion length attenuation coefficient.
Optionally, the velocity of the particle in the current video frame is calculated according to the following formula:
V(n)=V(n-1)*dampingV
where V (n) represents the velocity of the particle in the current video frame, V (n-1) represents the velocity of the particle in the previous video frame, and dampingV represents the velocity attenuation coefficient.
Optionally, the rotational angular velocity of the particle in the current video frame is calculated according to the following formula:
W(n)=W(n-1)*dampingW
wherein W (n) represents the rotational angular velocity of the particle in the current video frame, W (n-1) represents the rotational angular velocity of the particle in the previous video frame, and dampingW represents the rotational angular velocity attenuation coefficient.
Optionally, the length of the rotational motion of the particle in the current video frame is calculated according to the following formula:
R(n)=R(n-1)*dampingR
wherein, R (n) represents the length of the rotational motion of the particle in the current video frame, R (n-1) represents the length of the rotational motion of the particle in the previous video frame, and dampingR represents the attenuation coefficient of the length of the rotational motion.
Optionally, the rotation angle of the particle in the current video frame is calculated according to the following formula:
θ(n)=θ(n-1)+W(n)*deltaT
where θ (n) represents the rotation angle of the particle in the current video frame, θ (n-1) represents the rotation angle of the particle in the previous video frame, and deltaT represents the time step required for updating each video frame.
Optionally, calculating a direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame includes:
and obtaining a velocity vector corresponding to the particle in the current video frame, calculating and vertically obtaining a unit vector vertical to the velocity vector according to the velocity vector and the random unit vector, and rotating the unit vector according to the rotation angle of the particle in the current video frame to generate a direction vector of the particle in the current video frame.
Optionally, the final position of the particle in the current video frame is calculated according to the following formula:
P(n)=P(n)`+r(n)*R(n)
wherein p (n) represents the final position of the particle in the current video frame, p (n ") represents the pre-position of the particle in the current video frame, r (n) represents the direction vector of the particle in the current video frame, and r (n) represents the length of the rotational motion of the particle in the current video frame.
To achieve the above object, a second embodiment of the present invention proposes a computer-readable storage medium having stored thereon a particle swarm rotating video production program, which when executed by a processor implements the particle swarm rotating video production method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the particle swarm rotary video production program is stored, so that the processor can realize the particle swarm rotary video production method when executing the particle swarm rotary video production program, thereby realizing the rapid generation of the particle swarm rotary video, achieving the simple and rapid calculation process, reducing the calculation resources required to be consumed in the particle swarm video generation process, and improving the particle swarm video generation efficiency.
Drawings
Fig. 1 is a schematic flow chart of a particle swarm rotation video production method according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative and intended to explain the present invention and should not be construed as limiting the present invention.
In the related art, when the attenuated rotation video of the particle swarm is generated, a large amount of calculation power is consumed, waste of manpower and material resources is caused, and the generation efficiency is low. According to the particle swarm rotating video production method, firstly, motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame are obtained; then, when the position of the particle in the current video frame is updated, calculating the pre-position of the particle in the current video frame according to the final position and the speed of the particle in the previous video frame, and calculating the speed, the rotational angular velocity, the rotational motion length and the rotational angle of the particle in the current video frame according to the speed, the rotational angular velocity, the rotational motion length, the rotational angle and the particle motion attenuation coefficient of the particle in the previous video frame; then, obtaining a random unit vector, calculating a direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame, and calculating a final position of the particle in the current video frame according to the direction vector of the particle; then, rendering the current video frame according to the final position of each particle in the current video frame so as to finish the production of the particle swarm rotating video according to all the video frames; therefore, the particle swarm rotating video can be generated quickly, the calculation process is simple and quick, calculation resources required to be consumed in the particle swarm video generation process are reduced, and the particle swarm video generation efficiency is improved.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Fig. 1 is a schematic flow chart of a particle swarm rotation video production method according to an embodiment of the present invention, as shown in fig. 1, the particle swarm rotation video production method includes the following steps:
s101, acquiring motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame.
S102, when the position of the particle in the current video frame is updated, the pre-position of the particle in the current video frame is calculated according to the final position and the speed of the particle in the previous video frame, and the speed, the rotation angular velocity, the rotation motion length, the rotation angle and the rotation angle of the particle in the current video frame are calculated according to the speed, the rotation angular velocity, the rotation motion length, the rotation angle and the particle motion attenuation coefficient of the particle in the previous video frame.
That is, first, motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame are acquired; when the positions of the particles in the current video frame are updated, the positions of all the particles are updated respectively; firstly, calculating a pre-position of the particle in a current video frame according to a final position and a speed of the particle in a previous video frame (wherein, if the current video frame is a first video frame, the previous video frame is an initial video frame), wherein the pre-position is used for calculating the final position of the particle; then, the speed, the rotational angular velocity, the rotational motion length and the rotational angle of the particle in the current video frame are calculated according to the speed, the rotational angular velocity, the rotational motion length, the rotational angle and the particle motion attenuation coefficient of the particle in the previous video frame.
As an example, first, an initial video frame is set as a 0 th frame, and the motion initial information of a plurality of particles in the initial video frame includes an initial velocity V (0) of each particle, an initial rotational angular velocity W of each particle, an initial rotational angle θ of each particle, and an initial rotational motion length R (0) of each particle.
It should be noted that, in the process of producing a video, a preset number N of frames per second of the video may be obtained, and then, a time step deltaT required by each video frame may be calculated according to N as 1.0/N; t (total) can be obtained according to the number of video frames required by the video, and whether the video is manufactured or not can be judged according to the T (total) so as to judge whether the manufacturing task of the current video is finished or not.
In some embodiments, the pre-position of the particle in the current video frame is calculated according to the following formula:
P(n)`=P(n-1)+V(n-1)*deltaT
wherein P (n) represents the pre-position of the particle in the current video frame, P (n-1) represents the final position of the particle in the previous video frame, V (n-1) represents the velocity of the particle in the previous video frame, and deltaT represents the time step required for updating each video frame.
In some embodiments, the particle motion attenuation coefficients include a velocity attenuation coefficient, a rotational angular velocity attenuation coefficient, and a rotational motion length attenuation coefficient.
In some embodiments, the velocity of the particle in the current video frame is calculated according to the following formula:
V(n)=V(n-1)*dampingV
where V (n) represents the velocity of the particle in the current video frame, V (n-1) represents the velocity of the particle in the previous video frame, and dampingV represents the velocity attenuation coefficient.
It should be noted that, in the process of updating the speed of the particle, it may also be determined whether the speed of the particle in the current video frame is less than a speed threshold; if so, the update of the particle is stopped, thereby further reducing the waste of computing resources.
In some embodiments, the rotational angular velocity of the particle in the current video frame is calculated according to the following formula:
W(n)=W(n-1)*dampingW
wherein W (n) represents the rotational angular velocity of the particle in the current video frame, W (n-1) represents the rotational angular velocity of the particle in the previous video frame, and dampingW represents the rotational angular velocity attenuation coefficient.
In the process of updating the rotational angular velocity of the particle, it may be determined whether the rotational angular velocity of the particle in the current video frame is smaller than a rotational angular velocity threshold, and if so, the updating of the particle may be stopped, thereby further reducing the waste of computing resources.
In some embodiments, the length of the rotational motion of the particle in the current video frame is calculated according to the following formula:
R(n)=R(n-1)*dampingR
wherein, R (n) represents the length of the rotational motion of the particle in the current video frame, R (n-1) represents the length of the rotational motion of the particle in the previous video frame, and dampingR represents the attenuation coefficient of the length of the rotational motion.
It should be noted that, in the process of updating the length of the rotational motion of the particle, it may also be determined whether the length of the rotational motion of the particle in the current video frame is smaller than a threshold value of the length of the rotational motion, and if so, the updating of the particle is stopped, thereby further reducing the waste of computing resources.
In some embodiments, the rotation angle of the particle in the current video frame is calculated according to the following formula:
θ(n)=θ(n-1)+W(n)*deltaT
where θ (n) represents the rotation angle of the particle in the current video frame, θ (n-1) represents the rotation angle of the particle in the previous video frame, and deltaT represents the time step required for updating each video frame.
S103, acquiring a random unit vector, calculating a direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame, and calculating the final position of the particle in the current video frame according to the direction vector of the particle.
That is, a random unit vector (which may be obtained only when the video frame of the first frame is produced) is obtained, and further, the calculation of the direction vector of the particle in the current video frame may be performed according to the random unit vector and the rotation angle of the particle in the current video frame, so as to calculate the final position of the particle in the current video frame according to the direction vector.
In some embodiments, calculating the direction vector of the particle in the current video frame based on the random unit vector and the rotation angle of the particle in the current video frame comprises:
and the unit vector is rotated according to the rotation angle of the particle in the current video frame so as to generate the direction vector of the particle in the current video frame.
As an example, assume that the random unit vector is unitRandom; then a unit vector perpendicular to the velocity vector corresponding to the particle in the current video frame can be calculated from the random unit vector: r (n) ',' normaize (cross (v (n)), unitRandom); then, the unit vector r (n) is rotated by an angle θ (the rotation angle of the particle in the current video frame) with the velocity vector v (n) as the rotation axis, so as to obtain r (n).
And S104, rendering the current video frame according to the final position of each particle in the current video frame so as to finish the production of the particle swarm rotating video according to all the video frames.
In some embodiments, the final position of the particle in the current video frame is calculated according to the following formula:
P(n)=P(n)`+r(n)*R(n)
wherein, p (n) represents the final position of the particle in the current video frame, p (n) "represents the pre-position of the particle in the current video frame, r (n) represents the direction vector of the particle in the current video frame, and r (n) represents the length of the rotational motion of the particle in the current video frame.
In summary, according to the particle swarm rotation video production method of the embodiment of the present invention, first, motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame are obtained; then, when the position of the particle in the current video frame is updated, calculating the pre-position of the particle in the current video frame according to the final position and the speed of the particle in the previous video frame, and calculating the speed, the rotational angular velocity, the rotational motion length and the rotational angle of the particle in the current video frame according to the speed, the rotational angular velocity, the rotational motion length, the rotational angle and the particle motion attenuation coefficient of the particle in the previous video frame; then, obtaining a random unit vector, calculating a direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame, and calculating the final position of the particle in the current video frame according to the direction vector of the particle; then, rendering the current video frame according to the final position of each particle in the current video frame so as to finish the manufacturing of the particle swarm rotary video according to all the video frames; therefore, the particle swarm rotary video is generated quickly, the calculation process is simple and quick, calculation resources required to be consumed in the particle swarm video generation process are reduced, and the particle swarm video generation efficiency is improved.
In order to achieve the above embodiments, an embodiment of the present invention proposes a computer-readable storage medium having stored thereon a particle swarm rotated video production program that, when executed by a processor, implements the particle swarm rotated video production method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the particle swarm rotary video production program is stored, so that the processor can realize the particle swarm rotary video production method when executing the particle swarm rotary video production program, thereby realizing the rapid generation of the particle swarm rotary video, achieving the simple and rapid calculation process, reducing the calculation resources required to be consumed in the particle swarm video generation process, and improving the particle swarm video generation efficiency.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise explicitly stated or limited, the terms "mounted," "connected," "fixed," and the like are to be construed broadly, e.g., as being permanently connected, detachably connected, or integral; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description of the specification, reference to the description of "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present invention, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A method for making particle swarm rotating video is characterized by comprising the following steps:
acquiring motion initial information and particle motion attenuation coefficients of a plurality of particles in an initial video frame;
when the position of the particle in the current video frame is updated, calculating the pre-position of the particle in the current video frame according to the final position and the speed of the particle in the previous video frame, and calculating the speed, the rotational angular velocity, the rotational motion length and the rotational angle of the particle in the current video frame according to the speed, the rotational angular velocity, the rotational motion length, the rotational angle and the particle motion attenuation coefficient of the particle in the previous video frame;
acquiring a random unit vector, calculating a direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame, and calculating a final position of the particle in the current video frame according to the direction vector of the particle, the rotation motion length of the particle in the current video frame and the pre-position of the particle in the current video frame;
and rendering the current video frame according to the final position of each particle in the current video frame so as to finish the production of the particle swarm rotating video according to all the video frames.
2. The particle swarm rotation video production method of claim 1, wherein the pre-position of the particle in the current video frame is calculated according to the following formula:
P(n)`=P(n-1)+V(n-1)*deltaT
wherein P (n) represents the pre-position of the particle in the current video frame, P (n-1) represents the final position of the particle in the previous video frame, V (n-1) represents the velocity of the particle in the previous video frame, and deltaT represents the time step required for updating each video frame.
3. The particle swarm rotational video production method of claim 1, wherein the particle motion attenuation coefficients comprise a velocity attenuation coefficient, a rotation angular velocity attenuation coefficient, and a rotation motion length attenuation coefficient.
4. The particle swarm rotation video production method of claim 3, wherein the velocity of the particle in the current video frame is calculated according to the following formula:
V(n)=V(n-1)*dampingV
where V (n) represents the velocity of the particle in the current video frame, V (n-1) represents the velocity of the particle in the previous video frame, and dampingV represents the velocity attenuation coefficient.
5. The particle swarm rotation video production method of claim 3, wherein the angular velocity of rotation of the particle in the current video frame is calculated according to the following formula:
W(n)=W(n-1)*dampingW
wherein W (n) represents the rotational angular velocity of the particle in the current video frame, W (n-1) represents the rotational angular velocity of the particle in the previous video frame, and dampingW represents the rotational angular velocity attenuation coefficient.
6. The particle swarm rotation video production method of claim 3, wherein the rotation motion length of the particle in the current video frame is calculated according to the following formula:
R(n)=R(n-1)*dampingR
wherein, R (n) represents the length of the rotational motion of the particle in the current video frame, R (n-1) represents the length of the rotational motion of the particle in the previous video frame, and dampingR represents the attenuation coefficient of the length of the rotational motion.
7. The particle swarm rotation video production method of claim 5, wherein the rotation angle of the particle in the current video frame is calculated according to the following formula:
θ(n)=θ(n-1)+W(n)*deltaT
where θ (n) represents the rotation angle of the particle in the current video frame, θ (n-1) represents the rotation angle of the particle in the previous video frame, and deltaT represents the time step required for updating each video frame.
8. The particle swarm rotation video production method of any one of claims 1-7, wherein calculating the direction vector of the particle in the current video frame according to the random unit vector and the rotation angle of the particle in the current video frame comprises:
and the unit vector is rotated according to the rotation angle of the particle in the current video frame so as to generate the direction vector of the particle in the current video frame.
9. The particle swarm rotation video production method of claim 8, wherein the final position of the particle in the current video frame is calculated according to the following formula:
P(n)=P(n)`+r(n)*R(n)
wherein, p (n) represents the final position of the particle in the current video frame, p (n) "represents the pre-position of the particle in the current video frame, r (n) represents the direction vector of the particle in the current video frame, and r (n) represents the length of the rotational motion of the particle in the current video frame.
10. A computer-readable storage medium, having stored thereon a particle swarm rotated video production program that, when executed by a processor, implements the particle swarm rotated video production method as recited in any of claims 1-9.
CN202010575941.3A 2020-06-22 2020-06-22 Particle swarm rotating video production method and medium Active CN111741332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010575941.3A CN111741332B (en) 2020-06-22 2020-06-22 Particle swarm rotating video production method and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010575941.3A CN111741332B (en) 2020-06-22 2020-06-22 Particle swarm rotating video production method and medium

Publications (2)

Publication Number Publication Date
CN111741332A CN111741332A (en) 2020-10-02
CN111741332B true CN111741332B (en) 2022-08-26

Family

ID=72652000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010575941.3A Active CN111741332B (en) 2020-06-22 2020-06-22 Particle swarm rotating video production method and medium

Country Status (1)

Country Link
CN (1) CN111741332B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113689534B (en) * 2021-10-25 2022-03-01 腾讯科技(深圳)有限公司 Physical special effect rendering method and device, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9827496B1 (en) * 2015-03-27 2017-11-28 Electronics Arts, Inc. System for example-based motion synthesis
CN106780568B (en) * 2016-12-20 2019-08-13 云南大学 A kind of video target tracking method based on the irregular piecemeal LBP of compression

Also Published As

Publication number Publication date
CN111741332A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
US9613291B2 (en) Method and system for patching up a point cloud of an object
CN111741332B (en) Particle swarm rotating video production method and medium
CN112669429A (en) Image distortion rendering method and device
EP2629531A1 (en) Method for converting 2d into 3d based on image motion information
CN111462283A (en) Method, medium, device and apparatus for playing a large number of animations of the same character
CN109242807B (en) Rendering parameter adaptive edge softening method, medium, and computer device
CN105575254A (en) Electronic map road rendering method and apparatus
CN104751506B (en) A kind of Cluster Rendering method and apparatus for realizing three-dimensional graphics images
CN112929733A (en) Video preview playing method and device
CN112954233A (en) Video synthesis system and method based on GPU
CN112130598A (en) Torque filtering method and device
CN109808593A (en) A kind of automobile engine voice analogy method and system
TWI423164B (en) Method for generating a high quality up-scaled image, and associated device
CN115345285B (en) GPU-based timing chart neural network training method and system and electronic equipment
CN109529342B (en) Data rendering method and device
CN111462278A (en) Depth-based material sorting rendering method, medium, equipment and device
CN113256758B (en) Graphic smoothing method
CN110706161A (en) Image brightness adjusting method, medium, device and apparatus
CN112598802B (en) Thermodynamic diagram generation method and system based on crowdsourcing data
CN114092906A (en) Lane line segment fitting method and system, electronic device and storage medium
CN113034350B (en) Vegetation model processing method and device
CN112767236B (en) Image distortion effect rendering method and device
CN112929792A (en) Sox-based audio processing method and device
CN111432291B (en) View updating method and device under video segmentation frame taking scene
CN112720455A (en) Optimal joint acceleration and deceleration calculation method and device and application thereof

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
GR01 Patent grant
GR01 Patent grant