CN116091659A - Method, device, equipment and medium for simulating image fragmentation caused by stress - Google Patents

Method, device, equipment and medium for simulating image fragmentation caused by stress Download PDF

Info

Publication number
CN116091659A
CN116091659A CN202310361610.3A CN202310361610A CN116091659A CN 116091659 A CN116091659 A CN 116091659A CN 202310361610 A CN202310361610 A CN 202310361610A CN 116091659 A CN116091659 A CN 116091659A
Authority
CN
China
Prior art keywords
fragmentation
fragments
image
fragment
action
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
CN202310361610.3A
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.)
Shenzhen Qutui Technology Co ltd
Original Assignee
Shenzhen Qutui 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 Shenzhen Qutui Technology Co ltd filed Critical Shenzhen Qutui Technology Co ltd
Priority to CN202310361610.3A priority Critical patent/CN116091659A/en
Publication of CN116091659A publication Critical patent/CN116091659A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation

Landscapes

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

Abstract

The invention relates to the field of image processing and video special effects, and discloses a method, a device, equipment and a medium for simulating image fragmentation caused by stress. According to the method, the fragmentation coordinates of the preset image are obtained, the image is subjected to polygon fragmentation processing, so that a plurality of fragments and the center coordinates of the fragments are obtained, two different-direction offset actions are introduced into each fragment, offset vectors of the fragments in unit time are obtained, a rotation action is introduced into each fragment, a fragmentation special effect is obtained, and the stereoscopic impression and the authenticity of image fragmentation are improved.

Description

Method, device, equipment and medium for simulating image fragmentation caused by stress
Technical Field
The invention relates to the field of image processing and video special effects, in particular to a method, a device, equipment and a medium for simulating image fragmentation caused by stress.
Background
Auxiliary special effects in the video production process are common nowadays, and in order to make the video effect more cool, special effect auxiliary technologies are more various, and polishing and optimization are more needed.
At present, the effects are used in the directions of pictures and videos, some of the effects are simply and barely effective, and the sense is not real.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a medium for solving the problem that the simulation stress causes image fragmentation.
The first aspect of the invention provides a method of simulating stress-induced image fragmentation, comprising:
obtaining fragmentation coordinates of a preset image;
performing polygon reduction processing on the image to obtain a plurality of fragments and center coordinates of the fragments;
introducing two offset actions in different directions into each fragment to obtain an offset vector of the fragment in unit time;
and introducing a rotation action into each fragment to obtain a fragmentation special effect.
Wherein said inducing a rotational action in each of said fragments comprises:
a third coordinate axis is additionally arranged on the center coordinate of each fragment;
one rotation motion of a horizontal axis rotation motion, a vertical axis rotation motion and a third coordinate axis rotation motion is randomly introduced into each of the fragments.
Optionally, in a second implementation manner of the first aspect of the present invention, the fragmentation coordinate is a center coordinate of the image, and the performing polygon fragmentation processing on the image to obtain a plurality of fragments and the center coordinate of the fragments includes:
square fragmentation processing is carried out on the image to obtain a plurality of fragments;
calculating the number of fragments of the image under the transverse and longitudinal axes according to a preset number calculation algorithm and the side length of the fragments;
and traversing each fragment based on the fragment number to obtain the center coordinate of each fragment.
Optionally, in a third implementation manner of the first aspect of the present invention, the equation for calculating the number of fragments is:
Figure SMS_1
Figure SMS_2
wherein said->
Figure SMS_3
For the number of fragments at half of the horizontal axis of the image, said +.>
Figure SMS_4
For the number of fragments of the half of the vertical axis of the image, said +.>
Figure SMS_5
Said->
Figure SMS_6
The length and width dimensions of the image, respectively, the +.>
Figure SMS_7
For the side length of the chip, the +.>
Figure SMS_8
Is a function of taking digital integers; />
The equation for calculating the center coordinates of each of the fragments is:
Figure SMS_9
Figure SMS_12
wherein, said->
Figure SMS_15
And +.>
Figure SMS_18
For the center coordinates of the fragments, the +.>
Figure SMS_11
And +.>
Figure SMS_14
For randomly fetched sequence number coordinates of the fragments, the
Figure SMS_17
Is of the value of (2)In the range of [ - ] of>
Figure SMS_20
,/>
Figure SMS_10
]Said->
Figure SMS_13
The value range of (2) is [ - ], which is [ - ], a>
Figure SMS_16
,/>
Figure SMS_19
]。
Optionally, in a fourth implementation manner of the first aspect of the present invention, the introducing, in each of the fragments, two offset actions in different directions includes:
introducing a gravitational acceleration shifting action in each of said fragments;
and introducing a diffusion acceleration shift action into each fragment, wherein the diffusion direction of the diffusion shift action is a direction away from the fragmentation coordinate.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the calculation equation of the offset vector is:
Figure SMS_21
wherein, said->
Figure SMS_22
Is an offset vector, said->
Figure SMS_23
For the time, said->
Figure SMS_24
For the vector of the gravitational acceleration offset action, said +.>
Figure SMS_25
Offset motion vectors for the diffuse accelerationSaid->
Figure SMS_26
For the intensity of the gravitational acceleration shifting action, said +.>
Figure SMS_27
The intensity of the diffusion acceleration offset motion.
Optionally, in a sixth implementation manner of the first aspect of the present invention, after one rotation action of the horizontal axis rotation action, the vertical axis rotation action, and the third coordinate axis rotation action is randomly introduced into each of the fragments, the method further includes:
acquiring a preset random value in each fragment;
and calculating the random value, the deflection angle value of the horizontal axis rotation action, the deflection angle value of the vertical axis rotation action and the deflection angle value of the third coordinate axis rotation action respectively to obtain the random deflection angle value of each rotation action.
In a second aspect, the invention provides an apparatus for simulating stress induced image fragmentation, comprising:
the fragmentation position module is used for acquiring fragmentation coordinates of a preset image;
the fragmentation module is used for carrying out polygon fragmentation on the image to obtain a plurality of fragments and center coordinates of the fragments;
the offset module is used for respectively introducing offset actions in two different directions into each fragment to obtain offset vectors of the fragments in unit time;
and the rotating module is used for introducing a rotating action into each fragment to obtain a fragmentation special effect.
A third aspect of the invention provides an apparatus for simulating stress induced image fragmentation, comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; the at least one processor invokes the instructions in the memory to cause the apparatus for simulating stress induced image fragmentation to perform the method for simulating stress induced image fragmentation described above.
A fourth aspect of the invention provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the above-described method of simulating stress causing image fragmentation.
In the embodiment of the invention, the image is fragmented, and a plurality of actions are added in fragments to simulate the motion trail of the true fragments which burst and fall, so that the stereoscopic impression and the reality are improved, and the special effect of simulating the image fragmentation caused by stress is realized.
Drawings
FIG. 1 is a schematic representation of a first embodiment of a method for simulating stress causing image fragmentation in accordance with embodiments of the present invention;
FIG. 2 is a schematic diagram of a second embodiment of a method for simulating stress causing image fragmentation in accordance with embodiments of the present invention;
FIG. 3 is a schematic diagram of a fourth embodiment of a method for simulating stress causing image fragmentation in accordance with embodiments of the present invention;
FIG. 4 is a schematic diagram of a sixth embodiment of a method for simulating stress causing image fragmentation in accordance with embodiments of the present invention;
FIG. 5 is a schematic representation of one embodiment of an apparatus for simulating stress causing image fragmentation in accordance with embodiments of the present invention;
FIG. 6 is a schematic representation of one embodiment of an apparatus for simulating stress causing image fragmentation in accordance with embodiments of the present invention;
FIG. 7 is an original image of an embodiment of the present invention;
FIG. 8 is a graph showing the effect of applying a method for simulating stress-induced image fragmentation in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a medium for simulating image fragmentation caused by stress.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
For ease of understanding, a detailed flow of an embodiment of the present invention is described below with reference to fig. 1-4, and one embodiment of a method for simulating stress-induced image fragmentation in an embodiment of the present invention includes:
101. obtaining fragmentation coordinates of a preset image;
in this embodiment, the image includes, but is not limited to, a still picture, a dynamic video, etc., and the present embodiment is applied to the dynamic video, where the still picture is included in the dynamic video, so that the image needs to be subjected to the processing of the special effect of breaking, that is, the location of the breaking point, that is, the breaking center, is required to be determined, and for convenience of explanation, in this embodiment, the location of the breaking point is used to be placed at the very center of the image.
102. Performing polygon reduction processing on the image to obtain a plurality of fragments and center coordinates of the fragments;
in this embodiment, the effect of the fragmentation is actually formed by splicing a plurality of fragments with irregular shapes, so that the images need to be subjected to polygon fragmentation in advance, wherein a fragmentation processing mode with uniform shapes can be adopted in the polygon fragmentation processing, and a fragmentation mode with random shapes can also be adopted, and if the fragmentation mode with random shapes is adopted, the state that a real plane is physically fragmented is considered, that is, the state extends outwards from a fragmentation point, the fragments which are closer to the position of the fragmentation point are found to be finer, the mode can enable the special effect to be more real, but the complexity is improved by several orders of magnitude, so that the fragmentation effect which is relatively more real is realized under the condition of limited resource utilization by adopting the former in this embodiment.
Further, in step 102, the method may specifically further include:
1021. square fragmentation processing is carried out on the image to obtain a plurality of fragments;
1022. calculating the number of fragments of the image on the transverse axis and the longitudinal axis according to a preset number calculation algorithm and the side length of the fragments;
1023. traversing each fragment based on the number of fragments to obtain the center coordinates of each fragment.
In steps 1021-1023, the calculation equation for the number of fragments is:
Figure SMS_28
Figure SMS_29
wherein said->
Figure SMS_30
For the number of fragments at half of the horizontal axis of the image, said +.>
Figure SMS_31
For the number of fragments of the half of the vertical axis of the image, said +.>
Figure SMS_32
Said->
Figure SMS_33
The length and width dimensions of the image, respectively, the +.>
Figure SMS_34
For the side length of the chip, the +.>
Figure SMS_35
Is a function of taking digital integers;
the equation for calculating the center coordinates of each of the fragments is:
Figure SMS_36
Figure SMS_38
wherein, said->
Figure SMS_42
And +.>
Figure SMS_45
For the center coordinates of the fragments, the +.>
Figure SMS_39
And +.>
Figure SMS_41
For randomly fetched sequence number coordinates of the fragments, the
Figure SMS_44
The value range of (2) is [ - ], which is [ - ], a>
Figure SMS_47
,/>
Figure SMS_37
]Said->
Figure SMS_40
The value range of (2) is [ - ], which is [ - ], a>
Figure SMS_43
,/>
Figure SMS_46
];
The central coordinate value corresponding to each fragment can be obtained from the equation, so that any pixel is taken from the image
Figure SMS_48
With the center coordinates of the fragments as the origin, one can calculate:
Figure SMS_49
Figure SMS_50
wherein->
Figure SMS_51
And +.>
Figure SMS_52
Is the position coordinate relative to the centre of the fragment, where control is also required>
Figure SMS_53
,/>
Figure SMS_54
In this way, the fragments in which each pixel is located can be located quickly, wherein +.>
Figure SMS_55
To take an absolute function.
103. Introducing two offset actions in different directions into each fragment to obtain an offset vector of the fragment in unit time;
in this embodiment, in order to achieve the animation effect of fragmentation, each fragment needs to be introduced into the action separately, and the action of each fragment is independent.
Further, in step 103, the method may specifically further include:
1031. introducing a gravitational acceleration shifting action in each of the fragments;
1032. a diffusion acceleration shift action is introduced into each fragment, wherein the diffusion direction of the diffusion shift action is toward a direction away from the fragmentation coordinates.
In step 1031-1032, in order to simulate the fracture situation, there is a gravitational acceleration in the real space, so that a first deviation motion is introduced into the fracture, namely a gravitational acceleration deviation motion, to improve the sense of reality, and meanwhile, as the fracture situation is seen from the real angle, the center point of the fracture is exploded, that is, the fragments around the fracture point scatter outwards around the fracture point as the center of the circle, so that a diffusion acceleration deviation motion is introduced into the fracture, and under the holding of the two deviation motions, a parabolic motion far away from the fracture point is formed, so as to achieve the effect of approaching the real fracture.
The calculation equation of the offset action is:
Figure SMS_56
wherein, said->
Figure SMS_57
Is an offset vector, said->
Figure SMS_58
For the time, said->
Figure SMS_59
For the vector of the gravitational acceleration offset action, said +.>
Figure SMS_60
For the vector of the diffusion acceleration offset action, the +.>
Figure SMS_61
For the intensity of the gravitational acceleration shifting action, said +.>
Figure SMS_62
The intensity of the diffusion acceleration offset motion.
Wherein the vector of the diffusion acceleration shift motion
Figure SMS_63
Is calculated as follows:
Figure SMS_64
wherein->
Figure SMS_65
For any vector taking a pixel to the center of the image, +.>
Figure SMS_66
And +.>
Figure SMS_67
Is the coordinate value of the pixel;
Figure SMS_68
104. and introducing a rotation action into each fragment to obtain a fragmentation special effect.
Wherein said inducing a rotational action in each fragment comprises:
a third coordinate axis is additionally arranged on the center coordinate of each fragment;
one of a horizontal axis rotation motion, a vertical axis rotation motion, and a third coordinate axis rotation motion is randomly introduced into each of the fragments.
In this embodiment, because the real fragments interfere with external elements such as air resistance in the falling process, the real fragments cannot well keep a state of falling, but can self-turn or self-rotate unpredictably, and if only a single parabolic offset action is performed, the three-dimensional effect and the sense of reality are lacking.
Further, the step 104 may specifically further be performed:
1041. acquiring a preset random value in each fragment;
1042. and calculating the random value with the deflection angle value of the horizontal axis rotation action, the deflection angle value of the vertical axis rotation action and the deflection angle value of the third coordinate axis rotation action respectively to obtain the random deflection angle value of each rotation action.
In steps 1041-1042, since the coordinates of the fragment are only two-dimensional coordinates, if the fragment rotates on the two axes, the fragment also rotates on a regular plane, and the third coordinate axis extends on the two axes, so that the fragment can rotate on three axes, and the specific matrix equation is as follows:
at an x-axis rotation angle
Figure SMS_69
Is a matrix of (a):
Figure SMS_70
at a rotation angle of y-axis
Figure SMS_71
Is a matrix of (a):
Figure SMS_72
at a third axis (z axis) rotation angle
Figure SMS_73
Is a matrix of (a):
Figure SMS_74
of course, if all fragments are to be rotated in the same direction, there is a sense of discomfort, and therefore, it is necessary to calculate the random value seed preset in each fragment:
Figure SMS_75
taking the decimal of the calculated random value seed:
Figure SMS_76
wherein->
Figure SMS_77
As a function of taking the fractional part of the number; />
Here, it is necessary to relate the angle of the rotation action to time, so that the rotation of the rotation angle has a certain randomness:
Figure SMS_78
Figure SMS_79
Figure SMS_80
wherein->
Figure SMS_81
For time (I)>
Figure SMS_82
Is the circumference ratio.
By the three matrix-by-matrix combined transformation, the total rotation matrix can be obtained:
Figure SMS_83
the position coordinates calculated relative to the center of the fragment are obtained
Figure SMS_84
,/>
Figure SMS_85
) Since only two-dimensional coordinates are used, coordinates of more than one third axis, i.e. (. A +.)>
Figure SMS_86
,/>
Figure SMS_87
,/>
Figure SMS_88
) Here, it is assumed that the original image pixel coordinates before transformation are
Figure SMS_89
Substituting the coordinates into the total rotation matrix:
Figure SMS_90
is available in the form of
Figure SMS_91
Substituting it into the other two:
Figure SMS_92
Figure SMS_93
at this time, the pixel value of the pixel coordinate of the original image can be assigned to the current display pixel coordinate to realize the special effect of the image fragmentation effect, and the specific implementation effect is shown in fig. 7 and 8.
In the embodiment, the image is fragmented, and a plurality of actions are added in fragments to simulate the movement track of the true fragments which burst and fall, so that the stereoscopic impression and the reality are improved, and the effect of simulating the image fragmentation caused by stress is realized.
While the method for simulating stress to cause image fragmentation in the embodiment of the present invention is described above, the following describes a device for simulating stress to cause image fragmentation in the embodiment of the present invention, referring to fig. 5, one embodiment of the device for simulating stress to cause image fragmentation in the embodiment of the present invention includes:
a fragmentation position module 201, configured to obtain fragmentation coordinates of a preset image;
the fragmentation module 202 is configured to perform polygon fragmentation on the image to obtain a plurality of fragments and center coordinates of the fragments;
the offset module 203 is configured to introduce offset actions in two different directions into each of the fragments, so as to obtain an offset vector of the fragment in unit time;
and the rotation module 204 is used for introducing rotation action into each fragment to obtain a fragmentation special effect.
In the embodiment, the image is fragmented, and a plurality of actions are added in fragments to simulate the movement track of the true fragments which burst and fall, so that the stereoscopic impression and the reality are improved, and the effect of simulating the image fragmentation caused by stress is realized.
Another embodiment of an apparatus for simulating stress causing image fragmentation in an embodiment of the present invention includes:
a fragmentation position module 201, configured to obtain fragmentation coordinates of a preset image;
the fragmentation module 202 is configured to perform polygon fragmentation on the image to obtain a plurality of fragments and center coordinates of the fragments;
the offset module 203 is configured to introduce offset actions in two different directions into each fragment, so as to obtain an offset vector of the fragment in unit time;
the rotation module 204 is used for introducing rotation action into each fragment to obtain a fragmentation special effect.
Wherein the fragmentation coordinate is the center coordinate of the image.
Further, the reducing module 202 may further specifically perform:
square fragmentation processing is carried out on the image to obtain a plurality of fragments;
calculating the number of fragments of the image on the transverse axis and the longitudinal axis according to a preset number calculation algorithm and the side length of the fragments;
traversing each fragment based on the number of fragments to obtain the center coordinates of each fragment.
Wherein, the calculation equation of the fragment number is:
Figure SMS_94
Figure SMS_95
wherein said->
Figure SMS_96
For the number of fragments at half of the horizontal axis of the image, said +.>
Figure SMS_97
For the number of fragments of the half of the vertical axis of the image, said +.>
Figure SMS_98
Said->
Figure SMS_99
The length and width dimensions of the image, respectively, the +.>
Figure SMS_100
For the side length of the chip, the +.>
Figure SMS_101
Is a function of taking digital integers;
the equation for calculating the center coordinates of each of the fragments is:
Figure SMS_102
Figure SMS_105
wherein, said->
Figure SMS_108
And +.>
Figure SMS_111
For the center coordinates of the fragments, the +.>
Figure SMS_104
And +.>
Figure SMS_107
For randomly fetched sequence number coordinates of the fragments, the
Figure SMS_110
The value range of (2) is [ - ], which is [ - ], a>
Figure SMS_113
,/>
Figure SMS_103
]Said->
Figure SMS_106
The value range of (2) is [ - ], which is [ - ], a>
Figure SMS_109
,/>
Figure SMS_112
]。
Further, the offset module 203 may further specifically perform:
introducing a gravitational acceleration shifting action in each of the fragments;
introducing a diffusion acceleration shift action into each fragment, wherein the diffusion direction of the diffusion shift action is a direction away from the fragmentation coordinate;
the calculation equation of the offset vector is as follows:
Figure SMS_114
wherein, said->
Figure SMS_115
Is an offset vector, said->
Figure SMS_116
For the time, said->
Figure SMS_117
For the vector of the gravitational acceleration offset action, said +.>
Figure SMS_118
For the vector of the diffusion acceleration offset action, the +.>
Figure SMS_119
For the intensity of the gravitational acceleration shifting action, said +.>
Figure SMS_120
The intensity of the diffusion acceleration offset motion.
Further, the rotation module 204 may further specifically perform:
a third coordinate axis is additionally arranged on the center coordinate of each fragment;
randomly introducing one rotation motion of a transverse axis rotation motion, a longitudinal axis rotation motion and a third coordinate axis rotation motion into each fragment;
acquiring a preset random value in each fragment;
and calculating the random value with the deflection angle value of the horizontal axis rotation action, the deflection angle value of the vertical axis rotation action and the deflection angle value of the third coordinate axis rotation action respectively to obtain the random deflection angle value of each rotation action.
In the embodiment, the image is fragmented, and a plurality of actions are added in fragments to simulate the movement track of the true fragments which burst and fall, so that the stereoscopic impression and the reality are improved, and the effect of simulating the image fragmentation caused by stress is realized.
The device for simulating stress to cause image fragmentation in the embodiment of the present invention is described in detail above in terms of the modularized functional entity in fig. 5, and the device for simulating stress to cause image fragmentation in the embodiment of the present invention is described in detail below in terms of hardware processing.
Fig. 6 is a schematic structural diagram of an apparatus for simulating stress-induced image fragmentation, where the apparatus 300 for simulating stress-induced image fragmentation may have a relatively large difference due to different configurations or performances, and may include one or more processors central processing units, a CPU310, for example, one or more processors and a memory 320, and one or more storage media 330, for example, one or more mass storage devices, for storing applications 333 or data 332, according to an embodiment of the present invention. Wherein memory 320 and storage medium 330 may be transitory or persistent storage. The program stored on the storage medium 330 may include one or more block diagrams, not shown, each of which may include a series of instruction operations in the apparatus 300 for inducing image fragmentation by an analog stress. Still further, the processor 310 may be configured to communicate with the storage medium 330 to execute a series of instructional operations in the storage medium 330 on the device 300 simulating a stress induced image fragmentation.
The device 300 based on simulating stress causing image fragmentation may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input output interfaces 330, and/or one or more operating systems 331, such as Windows Serve, mac OS X, unix, linux, freeBSD, and the like. It will be appreciated by those skilled in the art that the device configuration shown in fig. 6 that simulates a force causing image fragmentation does not constitute a limitation of devices that simulate a force causing image fragmentation, and may include more or fewer components than illustrated, or may combine certain components, or a different arrangement of components.
The present invention also provides a computer readable storage medium, which may be a non-volatile computer readable storage medium, and which may also be a volatile computer readable storage medium, having stored therein instructions that, when executed on a computer, cause the computer to perform the steps of the method of image fragmentation based on simulated stress.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the system or apparatus and unit described above may refer to the corresponding process in the foregoing method embodiment, which is not repeated herein.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for enabling a computer device to be a personal computer, a server, or a network device, etc. to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory, a ROM, a random access memory random access memory, a RAM, a magnetic disk, or an optical disk, etc., which can store program codes.
The above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method of simulating stress induced image fragmentation comprising:
obtaining fragmentation coordinates of a preset image;
performing polygon reduction processing on the image to obtain a plurality of fragments and center coordinates of the fragments;
introducing two offset actions in different directions into each fragment to obtain an offset vector of the fragment in unit time;
introducing a rotation action into each fragment to obtain a fragmentation special effect;
wherein said inducing a rotational action in each of said fragments comprises:
a third coordinate axis is additionally arranged on the center coordinate of each fragment;
one rotation motion of a horizontal axis rotation motion, a vertical axis rotation motion and a third coordinate axis rotation motion is randomly introduced into each of the fragments.
2. The method of simulating a force induced image fragmentation according to claim 1, wherein the fragmentation coordinates are center coordinates of the image, wherein the subjecting the image to polygon fragmentation to obtain a plurality of fragments and the center coordinates of the fragments comprises:
square fragmentation processing is carried out on the image to obtain a plurality of fragments;
calculating the number of fragments of the image under the transverse and longitudinal axes according to a preset number calculation algorithm and the side length of the fragments;
and traversing each fragment based on the fragment number to obtain the center coordinate of each fragment.
3. The method of simulating a force induced image fragmentation according to claim 2, wherein the equation for calculating the number of fragments is:
Figure QLYQS_1
Figure QLYQS_2
wherein said->
Figure QLYQS_3
For the number of fragments at half of the horizontal axis of the image, said +.>
Figure QLYQS_4
For the number of fragments of the half of the vertical axis of the image, said +.>
Figure QLYQS_5
Said->
Figure QLYQS_6
The length and width dimensions of the image, respectively, the +.>
Figure QLYQS_7
For the side length of the chip, the +.>
Figure QLYQS_8
Is a function of taking digital integers;
the equation for calculating the center coordinates of each of the fragments is:
Figure QLYQS_9
Figure QLYQS_11
wherein, said->
Figure QLYQS_15
And +.>
Figure QLYQS_18
For the center coordinates of the fragments, the +.>
Figure QLYQS_12
And +.>
Figure QLYQS_14
For the sequence number coordinates of the fragments taken randomly, the +.>
Figure QLYQS_17
The value range of (2) is [ - ], which is [ - ], a>
Figure QLYQS_20
,/>
Figure QLYQS_10
]Said->
Figure QLYQS_13
The value range of (2) is [ - ], which is [ - ], a>
Figure QLYQS_16
,/>
Figure QLYQS_19
]。
4. The method of simulating a force induced image fragmentation according to claim 1, wherein said introducing two different directional offset actions into each of said fragments comprises:
introducing a gravitational acceleration shifting action in each of said fragments;
and introducing a diffusion acceleration shift action into each fragment, wherein the diffusion direction of the diffusion shift action is a direction away from the fragmentation coordinate.
5. The method of modeling stress induced image fragmentation according to claim 4, wherein the calculation equation for the offset vector is:
Figure QLYQS_21
wherein, said->
Figure QLYQS_22
Is an offset vector, said->
Figure QLYQS_23
For the time, said->
Figure QLYQS_24
For the vector of the gravitational acceleration offset action, said +.>
Figure QLYQS_25
For the vector of the diffusion acceleration offset action, the +.>
Figure QLYQS_26
For the intensity of the gravitational acceleration shifting action, said +.>
Figure QLYQS_27
The intensity of the diffusion acceleration offset motion.
6. The method of simulating a force induced image fragmentation according to claim 1, further comprising, after said randomly introducing one of a horizontal axis rotation motion, a vertical axis rotation motion, and a third coordinate axis rotation motion in each of said fragments:
acquiring a preset random value in each fragment;
and calculating the random value, the deflection angle value of the horizontal axis rotation action, the deflection angle value of the vertical axis rotation action and the deflection angle value of the third coordinate axis rotation action respectively to obtain the random deflection angle value of each rotation action.
7. An apparatus for simulating stress induced image fragmentation, the apparatus comprising:
the fragmentation position module is used for acquiring fragmentation coordinates of a preset image;
the fragmentation module is used for carrying out polygon fragmentation on the image to obtain a plurality of fragments and center coordinates of the fragments;
the offset module is used for respectively introducing offset actions in two different directions into each fragment to obtain offset vectors of the fragments in unit time;
and the rotating module is used for introducing a rotating action into each fragment to obtain a fragmentation special effect.
8. An apparatus for simulating a force causing image fragmentation, the apparatus for simulating a force causing image fragmentation comprising: a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line;
the at least one processor invoking the instructions in the memory to cause the apparatus to perform the method of simulating stress induced image fragmentation of any of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the method of simulating a stress induced image fragmentation according to any of claims 1-6.
CN202310361610.3A 2023-04-07 2023-04-07 Method, device, equipment and medium for simulating image fragmentation caused by stress Pending CN116091659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310361610.3A CN116091659A (en) 2023-04-07 2023-04-07 Method, device, equipment and medium for simulating image fragmentation caused by stress

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310361610.3A CN116091659A (en) 2023-04-07 2023-04-07 Method, device, equipment and medium for simulating image fragmentation caused by stress

Publications (1)

Publication Number Publication Date
CN116091659A true CN116091659A (en) 2023-05-09

Family

ID=86210492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310361610.3A Pending CN116091659A (en) 2023-04-07 2023-04-07 Method, device, equipment and medium for simulating image fragmentation caused by stress

Country Status (1)

Country Link
CN (1) CN116091659A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120162226A1 (en) * 2010-12-22 2012-06-28 Electronics And Telecommunications Research Institute Fracture pattern generation apparatus and method for crumbling effect
CN103886630A (en) * 2014-03-13 2014-06-25 华侨大学 Animation generating method and system of fragment pictures
CN113132799A (en) * 2021-03-30 2021-07-16 腾讯科技(深圳)有限公司 Video playing processing method and device, electronic equipment and storage medium
CN113436300A (en) * 2021-07-19 2021-09-24 上海米哈游璃月科技有限公司 Method and device for realizing explosion animation, electronic equipment and storage medium
CN115713586A (en) * 2022-11-15 2023-02-24 网易(杭州)网络有限公司 Method and device for generating fragmentation animation and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120162226A1 (en) * 2010-12-22 2012-06-28 Electronics And Telecommunications Research Institute Fracture pattern generation apparatus and method for crumbling effect
CN103886630A (en) * 2014-03-13 2014-06-25 华侨大学 Animation generating method and system of fragment pictures
CN113132799A (en) * 2021-03-30 2021-07-16 腾讯科技(深圳)有限公司 Video playing processing method and device, electronic equipment and storage medium
CN113436300A (en) * 2021-07-19 2021-09-24 上海米哈游璃月科技有限公司 Method and device for realizing explosion animation, electronic equipment and storage medium
CN115713586A (en) * 2022-11-15 2023-02-24 网易(杭州)网络有限公司 Method and device for generating fragmentation animation and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈大菜: ""cosos creator模拟重力爆炸效果"", 《HTTPS://BLOG.CSDN.NET/QQ_40065163/ARTICLE/DETAILS/81031047》, pages 1 - 2 *

Similar Documents

Publication Publication Date Title
US10795434B2 (en) Interface-based modeling and design of three dimensional spaces using two dimensional representations
CN110546951B (en) Composite stereoscopic image content capture
CN108269305A (en) A kind of two dimension, three-dimensional data linkage methods of exhibiting and system
JP2009515261A (en) Method and apparatus for image classification and segmentation based on binary
US11605198B2 (en) Systems and methods for generating dynamic real-time high-quality lighting for digital animation
US7652670B2 (en) Polynomial encoding of vertex data for use in computer animation of cloth and other materials
CN111161398A (en) Image generation method, device, equipment and storage medium
US5732204A (en) Method and device for 3D image processing
US10650575B2 (en) Method and system for computer graphics rendering
CN116091659A (en) Method, device, equipment and medium for simulating image fragmentation caused by stress
CN107329566B (en) Virtual object processing method and system and virtual reality equipment
CN105069838B (en) A kind of clothing show method and device
CN114254501A (en) Large-scale grassland rendering and simulating method
CN107784132A (en) CAD Mapping Systems based on body-sensing technology
CN106990838B (en) Method and system for locking display content in virtual reality mode
US10692172B2 (en) Method of plane tracking
Timokhin et al. Effective technology to visualize virtual environment using 360-degree video based on cubemap projection
Savoy et al. Crowd simulation rendering for web
Yuan et al. Real-time simulation of tissue cutting with CUDA based on GPGPU
US11946744B2 (en) Synchronization of a gyroscope in a virtual-reality environment
US20230310999A1 (en) In-game Physics with Affine Bodies
JPH03175588A (en) Viewpoint rotating system
CN106599893B (en) Processing method and device for object deviating from recognition graph based on augmented reality
CN115457186A (en) Method, apparatus, device and medium for matching view angles of entity object and camera
CN114299199A (en) Fluid animation processing method and device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230509