Crowd formation change style migration method
By calculating the motion vector of the agent and generating the navigation field sequence, the problem of low efficiency and high cost of formation style transfer transformation is solved, and the simulation of the same movement style population under different parameters is quickly achieved under low computing power loss, which improves the production efficiency of formation transformation.
Patent Information
- Application Number
- CN202510173313.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-24
AI Technical Summary
The formation style transfer and transformation in the prior art is low efficiency and high cost, which leads to a lot of manpower and material resources required to be consumed when the existing formation style transformation production is required, and the flow process that has been produced will be wasted.
By calculating the motion vector of each agent in the original formation transformation process, a navigation field sequence is generated to reflect the movement trend of the crowd, and the navigation field sequence is applied to the new initial formation, and a new formation transformation arrangement is iteratively generated.
On the basis of creating the simulation effect only once, through the movement style transfer based on the navigation field, the rapid production of people who are the same movement style under different parameters is achieved, greatly saving manpower and computer computing power, and improving the production efficiency of formation transformation.
Smart Images

Figure CN120197341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method for migrating the style of crowd formation transformation. Background Art
[0002] Crowd formation transformation is a new crowd simulation technology that has emerged in the past decade. Its essence is to achieve highly controllable and visually appealing crowd formation flow by imposing constraints based on geometry, graphics, etc. on the crowd. Crowd formation transformation technology has been widely applied in fields such as movie special effects, the choreography of the opening and closing ceremonies of large-scale art performances, and crowd simulation. The key to realizing crowd formation transformation is to write computer algorithms to control the flow of a large number of groups in a virtual environment.
[0003] Currently, there is a demand in the industry that after a complete crowd formation transformation is made, it may be desired to migrate the style of this flow process to another crowd (for example, perform formation transformation on different initial arrangements, perform formation transformation on crowds of different numbers, etc.). If the crowd formation transformation is remade according to the new requirements, it may consume a large amount of human and material resources, and the already made flow process will also be wasted.
[0004] Therefore, how to improve the efficiency of formation style migration transformation and reduce the cost of formation style migration transformation has become an urgent technical problem to be solved. Summary of the Invention
[0005] The present invention provides a method for migrating the style of crowd formation transformation to solve the defects of low efficiency and high cost in the prior art for formation style migration transformation.
[0006] The present invention provides a method for migrating the style of crowd formation transformation, including the following steps: Calculate the motion vector of each agent in the original formation transformation process; Generate a navigation field sequence based on all the motion vectors, and the navigation field sequence reflects the motion trend of the crowd; Apply the navigation field sequence to the new initial formation and iteratively generate a new formation transformation arrangement.
[0007] According to the method for migrating the style of crowd formation transformation provided by the present invention, the calculation of the motion vector of each agent in the original formation transformation process includes: For any agent in the transformation process of the original formation, obtain the position of the agent at each moment; For any moment, based on the position of the agent at the current moment and the position of the agent at the next moment, determine the motion vector of the agent at the current moment; Calculate the motion vector of each agent at each moment.
[0008] A method for migrating the formation transformation style of a crowd provided by the present invention, generating a navigation field sequence based on all the motion vectors, includes: For any moment, generating the navigation field of the current moment based on the motion vectors of all agents at the current moment; Obtaining the navigation fields of each moment and combining them in order as the navigation field sequence.
[0009] A method for migrating the formation transformation style of a crowd provided by the present invention, applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation layout, includes: Taking the navigation field of the first moment as the navigation field of the current moment and taking the new initial formation as the formation layout of the current moment; Applying the navigation field of the current moment to the formation layout of the current moment to obtain the formation layout of the next moment; Taking the navigation field of the next moment as the new navigation field of the current moment and taking the formation layout of the next moment as the new formation layout of the current moment, and returning to the step of applying the navigation field of the current moment to the formation layout of the current moment to obtain the formation layout of the next moment until the formation layout of the last moment is generated to obtain a new formation transformation layout.
[0010] A method for migrating the formation transformation style of a crowd provided by the present invention, before applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation layout, further includes: Receiving a new initial formation input by the user.
[0011] A method for migrating the formation transformation style of a crowd provided by the present invention, before applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation layout, further includes: Receiving a formation modification instruction input by the user, where the formation modification instruction includes at least one of adding an agent, deleting an agent, and moving the position of a specified agent; Based on the formation modification instruction, modifying the original formation to obtain the new initial formation.
[0012] The present invention also provides a device for migrating the formation transformation style of a crowd, including the following modules: A calculation module, configured to: calculate the motion vector of each agent during the original formation transformation process; A generation module, configured to: generate a navigation field sequence based on all the motion vectors, where the navigation field sequence reflects the motion trend of the crowd; A transformation module for: applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation arrangement.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method for migrating the crowd formation transformation style as described in any one of the above is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for migrating the crowd formation transformation style as described in any one of the above is implemented.
[0015] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for migrating the crowd formation transformation style as described in any one of the above is implemented.
[0016] The method for migrating the crowd formation transformation style provided by the present invention calculates the motion vectors of each agent during the original formation transformation process; based on all the motion vectors, a navigation field sequence is generated, and the navigation field sequence reflects the motion trend of the crowd; the navigation field sequence is applied to a new initial formation, and a new formation transformation arrangement is iteratively generated. The method for migrating the crowd formation transformation style provided by the present invention generates a navigation field sequence according to each extracted motion slice, and then applies the navigation field sequence to a new initial formation to automatically generate a new formation transformation arrangement. It can, based on only making a simulation effect once, through motion style migration based on the navigation field, achieve rapid production of crowd simulations with the same motion style under different parameters with extremely low computing power loss. Compared with repeated production, it greatly saves manpower and computer computing power and improves the production efficiency of formation transformation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 is one of the flow diagrams of the method for migrating the crowd formation transformation style provided by the present invention; Figure 2 is another flow diagram of the method for migrating the crowd formation transformation style provided by the present invention; Figure 3 is a schematic diagram of the formation transformation migration provided by the present invention; Figure 4It is a schematic structural diagram of the crowd formation transformation style transfer device provided by the present invention; Figure 5 It is a schematic structural diagram of the electronic device provided by the present invention. Detailed implementation manners
[0019] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without making creative efforts shall fall within the protection scope of the present invention.
[0020] It should be noted that in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element. The orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be construed as a limitation of the present invention. Unless otherwise expressly specified and limited, the terms "mounted", "connected" and "coupled" should be construed broadly, for example, it may be a fixed connection, a detachable connection or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0021] The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category and do not limit the number of objects. For example, the first object can be one or more. In addition, "and / or" represents at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.
[0022] The following combinationFigures 1 - 5 Describe the method, apparatus, electronic device and storage medium for crowd formation transformation style transfer provided by the embodiments of the present invention.
[0023] Figure 1 It is one of the flow diagrams of the crowd formation transformation style transfer method provided by the present invention. As Figure 1 shown, the method includes the following: S110, calculate the motion vector of each agent during the original formation transformation; S120, generate a navigation field sequence based on all the motion vectors, and the navigation field sequence reflects the motion trend of the crowd; S130, apply the navigation field sequence to the new initial formation, and iteratively generate a new formation transformation layout.
[0024] It should be noted that the execution subject of the crowd formation transformation style transfer method provided by the embodiments of the present application can be a server or a computer device, such as a mobile phone, a tablet computer, a notebook computer, a handheld computer, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc.
[0025] In the embodiments of the present invention, an agent is a simulated person in a simulation scenario.
[0026] In S110, assume that there are n agents in total, and the motion in the original formation transformation involves m time steps (moments). Then calculate the motion vectors of the n agents at each moment during the original formation transformation.
[0027] In S120, according to the motion vectors of the n agents at each moment, generate the navigation field at each moment. The navigation field is a continuous and smooth vector function to show the instantaneous motion trend of the entire crowd, and combine the navigation fields at each moment in chronological order to form a navigation field sequence.
[0028] In the embodiments of the present invention, the method for generating the navigation field is not limited herein.
[0029] In S130, apply the navigation field sequence to the new initial formation, and iteratively generate a new formation transformation layout process frame by frame.
[0030] The method for migrating the formation transformation style of a crowd provided by an embodiment of the present invention calculates the motion vector of each agent during the original formation transformation; based on all the motion vectors, a navigation field sequence is generated, and the navigation field sequence reflects the motion trend of the crowd; the navigation field sequence is applied to a new initial formation, and a new formation transformation arrangement is iteratively generated. The method for migrating the formation transformation style of a crowd provided by an embodiment of the present invention generates a navigation field sequence according to each extracted motion slice, and then applies the navigation field sequence to a new initial formation to automatically generate a new formation transformation arrangement. It can, based on only making the simulation effect once, through the motion style migration based on the navigation field, achieve the rapid production of crowd simulations with the same motion style under different parameters with extremely low computing power consumption. Compared with repeated production, it greatly saves manpower and computer computing power and improves the efficiency of formation transformation style migration.
[0031] In an alternative embodiment, the calculating the motion vector of each agent during the original formation transformation includes: For any agent during the transformation of the original formation, obtain the position of the agent at each moment; For any moment, based on the position of the agent at the current moment and the position of the agent at the next moment, determine the motion vector of the agent at the current moment; Calculate the motion vector of each agent at each moment.
[0032] In an embodiment of the present invention, for each moment, according to the position of each agent at the current moment and the position at the next moment, the motion vector is calculated, and based on the motion vectors of all agents, the navigation field at the current moment is generated to show the instantaneous motion trend of the entire crowd at the current moment.
[0033] In an embodiment of the present invention, still taking n agents, that is, m event time steps as an example, with time as the outermost structure of the array, the positions of n agents at each moment can be recorded, forming an m*n array, that is, [(P 11 , P 12 , …, P 1n ), (P 21 , P 22 , …, P 2n ), …, (P m1 , P m2 , …, P mn )], where P ij represents the position coordinate of the jth agent at the ith moment.
[0034] In the specific implementation process, for each moment, calculate the vector of each agent moving from the position at the current moment to the position at the next moment, and obtain the motion vector of each agent at each moment.
[0035] For example, for the first moment, for each agent, calculate the vector moving from the position at the first moment to the position at the second moment, that is, (P 21 , P 22 , …, P 2n ) - (P 11 , P 12 , …, P 1n ), and obtain the motion vectors of n agents at the first moment (P 21 - P 11 , P 22 - P 12 , …, P 2n - P 1n ).
[0036] The crowd formation transformation style migration method provided by the embodiments of the present invention calculates motion vectors according to the positions of each agent at the current moment and the next moment for each moment, providing a data basis for generating a navigation field subsequently.
[0037] In an alternative embodiment, generating a navigation field sequence based on all the motion vectors includes: For any moment, generate the navigation field of the current moment based on the motion vectors of all agents at the current moment; Obtain the navigation fields of each moment and combine them in order as the navigation field sequence.
[0038] In the embodiments of the present invention, for each moment, a navigation field of the current moment is generated according to the motion vectors of all agents at the current moment, and then the navigation fields of each moment are combined in chronological order to obtain a navigation field sequence.
[0039] For example, for the first moment, generate the navigation field U1 of the first moment according to the motion vector of the first moment (P 21 - P 11 , P 22 - P 12 , …,P 2n - P 1n ), for the second moment, generate the navigation field U2 of the second moment according to the motion vector of the second moment (P 31 -P 21 , P 32 - P 22 , …, P 3n - P 2n ), …, for the motion vector of the (m - 1)-th moment (P m1 - P (m-1)1 , P m2 - P(m-1)2 , …, P mn - P (m-1)n Generate the navigation field U at the (m - 1)-th moment m-1 , and then combine the navigation fields at each moment in chronological order to obtain a navigation field sequence (U1, U2, …, U m-1 ).
[0040] Figure 3 is a schematic diagram of the formation transformation and migration provided by the present invention. As Figure 3 shown, taking the formation arrangement including 5 moments as an example, according to the positions at the first moment and the second moment, the motion vector at the first moment is calculated, and then the first navigation field guiding the position change of the crowd from the first moment to the second moment is generated; according to the positions at the second moment and the third moment, the motion vector at the second moment is calculated, and then the second navigation field guiding the position change of the crowd from the second moment to the third moment is generated; according to the positions at the third moment and the fourth moment, the motion vector at the third moment is calculated, and then the third navigation field guiding the position change of the crowd from the third moment to the fourth moment is generated; according to the positions at the fourth moment and the fifth moment, the motion vector at the fourth moment is calculated, and then the fourth navigation field guiding the position change of the crowd from the fourth moment to the fifth moment is generated; the first navigation field, the second navigation field, the third navigation field, and the fourth navigation field from left to right are combined as the navigation field sequence; finally, based on the navigation field sequence, the new initial formation is transformed frame by frame, and a new formation transformation arrangement is iteratively generated.
[0041] In the embodiment of the present invention, generating the navigation field according to the displacement of points is to derive a continuous and smooth vector function u(x) from discrete data points, and this function can describe the change of each point relative to its original position.
[0042] Optionally, generate the navigation field at any moment based on the following steps: Construct a mathematical model that can approximately represent the displacement situation at any position within the entire formation area to obtain the navigation field (methods including but not limited to Lagrange interpolation, spline interpolation, radial basis function, etc. can be used); Ensure that the navigation field satisfies all known boundary constraint conditions, such as fixed points are not allowed to move; Check and adjust the navigation field to ensure that it is continuous and smooth enough within the entire domain.
[0043] The method for migrating the formation transformation style of a crowd provided by the embodiment of the present invention generates a navigation field for each moment, thereby characterizing the instantaneous motion trend of the crowd at each moment, and then combines them to obtain a navigation field sequence, reflecting the long-term motion trend of the crowd, and providing a basis for the migration of the formation transformation style.
[0044] In an alternative embodiment, applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation layout includes: Taking the navigation field at the first moment as the navigation field at the current moment, and taking the new initial formation as the formation layout at the current moment; Applying the navigation field at the current moment to the formation layout at the current moment to obtain the formation layout at the next moment; Taking the navigation field at the next moment as the new navigation field at the current moment, taking the formation layout at the next moment as the new formation layout at the current moment, and returning to the step of applying the navigation field at the current moment to the formation layout at the current moment to obtain the formation layout at the next moment, until the formation layout at the last moment is generated, thereby obtaining a new formation transformation layout.
[0045] In the embodiment of the present invention, for a new initial formation layout, the navigation field is applied to the crowd, and the result of the next frame is generated by the corresponding navigation field for each frame, and iterated step by step to finally generate a complete motion process. Specifically, the navigation field at the first moment is applied to the new initial formation layout to obtain the formation layout at the second moment; the navigation field at the second moment is applied to the formation layout at the second moment to obtain the formation layout at the third moment; the navigation field at the third moment is applied to the formation layout at the third moment to obtain the formation layout at the fourth moment; and so on, until the final formation layout is obtained, and the transformation process from the new initial formation layout to the final formation layout is obtained, that is, a new formation transformation layout is iteratively generated.
[0046] The crowd formation transformation style migration method provided by the embodiment of the present invention applies the navigation field frame by frame to a new initial formation, so that the formation transformation at each step is consistent with the original crowd formation transformation style, and a transformation process from the new initial formation to the final formation layout is generated.
[0047] In an alternative embodiment, before applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation layout, it further includes: Receiving a new initial formation input by the user.
[0048] In the embodiment of the present invention, a completely new initial position distribution input by the user is directly obtained. The specific input method of the new initial formation is not limited herein. For example, the initial position coordinates of each agent can be manually input one by one, or a file pre-storing the initial formation in a preset format can be imported.
[0049] The crowd formation transformation style migration method provided by the embodiment of the present invention can directly obtain a new initial position distribution, so that the user can customize and input a completely new initial formation.
[0050] In an alternative embodiment, before applying the navigation field sequence to the new initial formation and iteratively generating a new formation transformation layout, the method further includes: Receiving a formation modification instruction input by a user, where the formation modification instruction includes at least one of adding an agent, deleting an agent, and moving the position of a specified agent; Modifying the original formation based on the formation modification instruction to obtain the new initial formation.
[0051] In an embodiment of the present invention, the original formation is modified according to the formation modification instruction input by the user to obtain a new initial formation. Specifically, when receiving a formation modification instruction for adding an agent input by the user, the instruction should include the initial position of the newly added agent, and a new agent is added at the specified initial position; when receiving a formation modification instruction for deleting an agent input by the user, the instruction should include the identification information of the specified agent to be deleted, or include the initial position information of the specified agent to be deleted, and the specified agent is deleted from the original formation according to the agent's identification information or position information; when receiving a formation modification instruction for moving the position of a specified agent input by the user, the instruction should include the identification information of the agent to be moved, and also need to include the initial position information and target position information of the agent, so as to move the specified agent from the initial position to the target position.
[0052] The method for migrating the formation transformation style of a crowd provided by the embodiment of the present invention supports the user to perform operations of adding an agent, deleting an agent, and moving the position of an agent on the basis of the original formation. Therefore, when the change to the original formation is small, there is no need to re-enter a completely new initial position distribution, and the operation is simple, improving the user experience.
[0053] Figure 2 It is the second flowchart of the method for migrating the formation transformation style of a crowd provided by the present invention. As Figure 2 shown, the preferred method for migrating the formation transformation style of a crowd of the present invention will be described below in conjunction with Figure 2 ...
[0054] Extract the movement process of each agent during the original formation transformation: Assume that there are n agents in total, and the original formation transformation involves movements at m time steps. Then, with time as the outermost structure of the array, record the positions of n agents at each moment, forming an m*n array; Generate a navigation field based on each extracted movement slice: For each moment, calculate the movement vector according to the positions of each agent at the current moment and the next moment, and generate a navigation field based on all the movement vectors to show the instantaneous movement trend of the entire crowd at present; Confirm the new initial formation arrangement: Obtain a new initial formation arrangement of the crowd. This process requires the user to input separately and can be modified based on the original initial formation, including adding, deleting, and moving the positions of agents; or a completely new initial position distribution can be input again. Apply the navigation field to the new initial formation arrangement and iteratively generate the target motion result: For the new initial formation arrangement, apply the calculated navigation field to the crowd frame by frame. Each frame is driven by the navigation field to generate the result of the next frame, and iteratively, finally generate a complete motion process.
[0055] The present invention realizes the style transfer of crowd simulation by introducing the navigation field, which can greatly save manpower and computer computing power compared with repeated production. In the traditional industrial process, crowd simulation through computer simulation requires continuous parameter debugging for repeated production to select the best result. For the simulation process with a determined motion process, there is a large waste of manpower and computing power in the repeated production for different crowd sizes and different initial arrangements. The present invention can, on the basis of only producing the simulation effect once, through the motion style transfer method based on the navigation field, quickly produce crowd simulations with the same motion style under different parameters with extremely low computing power loss.
[0056] The crowd formation transformation style transfer device provided by the embodiments of the present application is described below. The crowd formation transformation style transfer device described below can be mutually corresponding and referred to with the crowd formation transformation style transfer method described above.
[0057] Figure 4 is a schematic structural diagram of the crowd formation transformation style transfer device provided by the present invention, as Figure 4 shown. The crowd formation transformation style transfer device may include, but is not limited to; A calculation module 410, configured to: calculate the motion vector of each agent during the original formation transformation process; A generation module 420, configured to: generate a navigation field sequence based on all the motion vectors, and the navigation field sequence reflects the motion trend of the crowd; A transformation module 430, configured to: apply the navigation field sequence to the new initial formation and iteratively generate a new formation transformation arrangement.
[0058] It should be noted that the crowd formation transformation style transfer device provided by the embodiments of the present invention can execute the crowd formation transformation style transfer method described in any of the above embodiments during specific operation, and this embodiment will not be elaborated here.
[0059] Figure 5 Illustrates a schematic structural diagram of an electronic device, as Figure 5As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communications interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logical instructions in the memory 530 to execute the crowd formation transformation style transfer method, which includes: calculating the motion vector of each agent during the original formation transformation process; Based on all the motion vectors, generating a navigation field sequence, where the navigation field sequence reflects the motion trend of the crowd; Applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation layout.
[0060] In addition, when the logical instructions in the above-mentioned memory 530 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0061] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the crowd formation transformation style transfer method provided by the above-mentioned various methods. The method includes: calculating the motion vector of each agent during the original formation transformation process; Based on all the motion vectors, generating a navigation field sequence, where the navigation field sequence reflects the motion trend of the crowd; Applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation layout.
[0062] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the crowd formation transformation style migration method provided by the above-mentioned various methods. The method includes: calculating the motion vector of each agent during the original formation transformation process; Based on all the motion vectors, generating a navigation field sequence, where the navigation field sequence reflects the motion trend of the crowd; Applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation arrangement.
[0063] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0064] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solutions, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disc, etc., and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A crowd formation transformation style transfer method, characterized in that: include: Calculate the motion vector of each agent during the transformation of the original formation; Based on all the motion vectors, a navigation field sequence is generated, wherein the navigation field sequence reflects the motion trend of the crowd; The navigation field sequence is applied to the new initial formation to iteratively generate a new formation transformation arrangement.
2. The crowd formation transformation style transfer method according to claim 1, characterized in that: The calculation of the motion vector of each agent in the original formation transformation process includes: For any agent in the transformation process of the original formation, obtaining the position of the agent at each moment; For any moment, based on the position of the agent at the current moment and the position of the agent at the next moment, determine the motion vector of the agent at the current moment; Calculate the motion vector of each agent at each moment.
3. The crowd formation transformation style transfer method according to claim 2, characterized in that: The generating a navigation field sequence based on all the motion vectors comprises: For any moment, based on the motion vectors of all agents at the current moment, generate the navigation field at the current moment; The navigation fields at each moment are acquired and combined in order as the navigation field sequence.
4. The crowd formation transformation style transfer method according to claim 3, characterized in that: The step of applying the navigation field sequence to a new initial formation and iteratively generating a new formation transformation arrangement includes: Using the navigation field at the first moment as the navigation field at the current moment, and using the new initial formation as the formation arrangement at the current moment; Applying the navigation field at the current moment to the formation arrangement at the current moment to obtain the formation arrangement at the next moment; Use the navigation field at the next moment as the new navigation field at the current moment, use the formation arrangement at the next moment as the new formation arrangement at the current moment, and return to the step of applying the navigation field at the current moment to the formation arrangement at the current moment to obtain the formation arrangement at the next moment, until the formation arrangement at the last moment is generated to obtain a new formation transformation arrangement.
5. The crowd formation transformation style transfer method according to any one of claims 1 to 4, characterized in that: Before applying the navigation field sequence to the new initial formation to iteratively generate a new formation transformation arrangement, the method further includes: Receives a new initial formation input by the user.
6. The crowd formation transformation style transfer method according to any one of claims 1 to 4, characterized in that: Before applying the navigation field sequence to the new initial formation to iteratively generate a new formation transformation arrangement, the method further includes: receiving a formation modification instruction input by a user, wherein the formation modification instruction includes at least one of adding an agent, deleting an agent, and moving a designated agent position; Based on the formation modification instruction, the original formation is modified to obtain the new initial formation.
7. A crowd formation transformation style transfer device, characterized in that: include: A calculation module, used to: calculate the motion vector of each agent during the transformation of the original formation; A generating module, used to: generate a navigation field sequence based on all the motion vectors, wherein the navigation field sequence reflects the motion trend of the crowd; The transformation module is used to apply the navigation field sequence to a new initial formation and iteratively generate a new formation transformation arrangement.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for style transfer of crowd formation transformation as claimed in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for style transfer of crowd formation transformation as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for style transfer of crowd formation transformation as claimed in any one of claims 1 to 6 is implemented.