Camera motion trajectory processing method, device, storage medium and electronic device
By adjusting the original camera motion trajectory, using the position parameter transformation curve and the optical parameter difference curve, the target camera motion trajectory matching the target camera parameters is generated, which solves the problem of low resource reuse rate in game development and achieves efficient resource reuse.
Patent Information
- Application Number
- CN202411732140.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-08
AI Technical Summary
During game development, when designing camera motion trajectories corresponding to multiple game characters, the resource reuse rate is low, resulting in huge workload and lack of effective solutions.
By obtaining the original camera motion trajectory and the target camera parameters, determine the position parameter transformation curve and the optical parameter difference curve, and adjust the original camera motion trajectory to generate the target camera motion trajectory that matches the target camera parameters.
The full reuse of the original camera motion trajectory resources is realized, the resource reuse rate when designing the camera motion trajectory corresponding to multiple game characters is improved, and the problem of low resource reuse rate is solved.
Smart Images

Figure CN119770966A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of game development, and in particular to a method, device, storage medium and electronic device for processing camera motion trajectories. Background Art
[0002] At present, in the process of game development, in order to effectively display the characteristics of game characters, it is necessary to design the lens display for important characters and design the camera motion trajectory corresponding to the game character. However, when the camera motion trajectory needs to be extended to other game characters, it is often necessary to make large-scale adjustments to adapt to the characteristics of different game characters. Adjusting the camera motion trajectory for each game character individually will result in a huge workload and a low resource reuse rate.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] At least some embodiments of the present disclosure provide a method, device, storage medium and electronic device for processing camera motion trajectories, so as to at least solve the technical problem of low resource reuse rate when designing camera motion trajectories corresponding to multiple game characters.
[0005] According to one embodiment of the present disclosure, a method for processing a camera motion trajectory is provided, including: obtaining an original camera motion trajectory, and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; determining a position parameter transformation curve within the preset time period based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period; determining an optical parameter difference curve within the preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period; and adjusting the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0006] According to one embodiment of the present disclosure, there is also provided a device for processing a camera motion trajectory, including: an acquisition module, used to acquire an original camera motion trajectory, and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; a position parameter transformation curve determination module, used to determine a position parameter transformation curve within a preset time period based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period; an optical parameter difference curve determination module, used to determine an optical parameter difference curve within a preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period; and a generation module, used to adjust the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve, and generate a target camera motion trajectory that matches the target camera parameters.
[0007] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned camera motion trajectory processing method in each embodiment of the present application when running.
[0008] According to one embodiment of the present disclosure, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned camera motion trajectory processing method in each embodiment of the present application.
[0009] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the above-mentioned camera motion trajectory processing method in each embodiment of the present application.
[0010] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned camera motion trajectory processing method in each embodiment of the present application is implemented.
[0011] According to another aspect of the embodiments of the present application, a computer program is further provided. When the computer program is executed by a processor, the method for processing the camera motion trajectory described above in the embodiments of the present application is implemented.
[0012] In at least some embodiments of the present disclosure, an original camera motion trajectory and target camera parameters corresponding to multiple target times are obtained, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; based on the target position parameters and the original position parameters, a position parameter transformation curve within the preset time period is determined; based on the target optical parameters and the original optical parameters, an optical parameter difference curve within the preset time period is determined; based on the position parameter transformation curve and the optical parameter difference curve, the original camera motion trajectory is adjusted to generate a target camera motion trajectory that matches the target camera parameters. It is easy to notice that the position parameter transformation curve is determined using the original position parameters in the original camera motion trajectory of the existing game character and the target position parameters in the target camera parameters corresponding to the new game character, and the optical parameter difference curve is determined using the original optical parameters in the original camera motion trajectory of the existing game character and the target optical parameters in the target camera parameters corresponding to the new game character. By adjusting the original camera motion trajectory according to the position parameter transformation curve and the optical parameter difference curve, the resources such as the original position parameters and original optical parameters in the original camera motion trajectory are fully reused, and the purpose of determining the target camera motion trajectory corresponding to the new game character is achieved, thereby realizing the technical effect of improving the resource reuse rate when designing camera motion trajectories corresponding to multiple game characters, and further solving the technical problem of low resource reuse rate when designing camera motion trajectories corresponding to multiple game characters. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0014] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for processing a camera motion trajectory according to an embodiment of the present disclosure;
[0015] Figure 2 is a flowchart of a method for processing a camera motion trajectory according to one embodiment of the present disclosure;
[0016] Figure 3 is a schematic diagram of generating a sub-transformation curve according to one optional embodiment of the present disclosure;
[0017] Figure 4 is a schematic diagram of generating a target camera motion trajectory according to one optional embodiment of the present disclosure;
[0018] Figure 5is a schematic diagram of processing a camera motion trajectory according to one optional embodiment of the present disclosure;
[0019] Figure 6 is a structural block diagram of a device for processing camera motion trajectory according to one embodiment of the present disclosure;
[0020] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the disclosed solution, the technical solution in the disclosed embodiment will be clearly and completely described below in conjunction with the drawings in the disclosed embodiment. Obviously, the described embodiment is only a part of the disclosed embodiment, not all of the embodiments. Based on the embodiments in the disclosed embodiment, all optical embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the disclosed embodiment.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0023] In a possible implementation, a method for processing camera motion trajectories is proposed to address the technical problem of low resource reuse rate when designing camera motion trajectories corresponding to multiple game characters in the field of video processing. The technical concept adopted is to obtain the original camera motion trajectory and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; based on the target position parameters and the original position parameters, a position parameter transformation curve within a preset time period is determined; based on the target optical parameters and the original optical parameters, an optical parameter difference curve within a preset time period is determined; based on the position parameter transformation curve and the optical parameter difference curve, the original camera motion trajectory is adjusted to generate a target camera motion trajectory that matches the target camera parameters. It is easy to notice that the position parameter transformation curve is determined using the original position parameters in the original camera motion trajectory of the existing game character and the target position parameters in the target camera parameters corresponding to the new game character, and the optical parameter difference curve is determined using the original optical parameters in the original camera motion trajectory of the existing game character and the target optical parameters in the target camera parameters corresponding to the new game character. By adjusting the original camera motion trajectory according to the position parameter transformation curve and the optical parameter difference curve, the resources such as the original position parameters and original optical parameters in the original camera motion trajectory are fully reused, and the purpose of determining the target camera motion trajectory corresponding to the new game character is achieved, thereby realizing the technical effect of improving the resource reuse rate when designing camera motion trajectories corresponding to multiple game characters, and further solving the technical problem of low resource reuse rate when designing camera motion trajectories corresponding to multiple game characters.
[0024] The above method embodiments involved in the present disclosure can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone, a tablet computer, a handheld computer, a mobile Internet device, a PAD, a game console and other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for processing a camera motion trajectory according to an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1The processor 102 (only one is shown) may include, but is not limited to, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a field-programmable logic device (FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. In one embodiment of the present disclosure, it may also include: an input / output device 108 and a display device 110.
[0025] In some optional embodiments mainly based on game scenarios, the above-mentioned device can also provide a human-computer interaction interface with a touch-sensitive surface, which can sense finger contact and / or gestures to perform human-computer interaction with a graphical user interface (GUI). The human-computer interaction function may include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0026] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0027] According to one embodiment of the present disclosure, an embodiment of a method for processing a camera motion trajectory is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] Figure 2 is a flowchart of a method for processing a camera motion trajectory according to one embodiment of the present disclosure, such as Figure 2 As shown, the method comprises the following steps:
[0029] Step S202, obtaining an original camera motion trajectory and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters.
[0030] The original camera motion trajectory in the above steps is a camera motion trajectory that has been designed for a certain game character. It is a set of pre-made or captured camera motion data. This data can be used to create camera motion in fields such as film production, animation production, game development, and virtual reality. It can include information such as the camera's position, direction, focal length, and motion trajectory.
[0031] The original position parameters in the above steps are the position parameters of the camera in the original camera motion trajectory. The position parameters of the camera may include displacement, rotation, scaling, etc. The position parameters enable the camera to achieve precise movement and positioning when shooting game characters.
[0032] The original light parameters in the above steps are the optical parameters of the camera in the original camera motion trajectory. The optical parameters of the camera can affect the content of the captured image. The optical parameters of the camera may include field of view, aperture value, focal length, etc., wherein the field of view is the area that the camera can see, the aperture value is used to control the aperture size of the camera lens, affecting the depth of field and exposure of the photo, and the focal length is the focal length of the camera lens.
[0033] The target time in the above steps is the time frame for shooting the game character that does not yet have a camera motion trajectory. The user needs to reset the position parameters and optical parameters of the camera based on these time frames, and let the original camera match the new position according to the position parameters corresponding to the target time, and configure new optical conditions according to the optical parameters corresponding to the target time to generate a new camera motion trajectory for the game character.
[0034] The target camera parameters in the above steps are the parameters corresponding to the camera when shooting a game character that does not yet have a camera motion track.
[0035] The target position parameters in the above steps are position parameters in the target camera parameters. The position parameters may include displacement, rotation, scaling, etc. The number of target position parameters needs to be consistent with the number of original position parameters.
[0036] The target optical parameters in the above steps are optical parameters in the target camera parameters. The optical parameters may include field of view, aperture value, focal length, etc. The number of the target optical parameters needs to be consistent with the number of the original optical parameters.
[0037] The preset time period in the above steps is a pre-set time period, which can be preset according to actual application conditions, and no restriction is imposed on the specific value of the pre-examination time period.
[0038] In an optional embodiment, the original camera motion trajectory is usually stored in an animation file, which can be an FBX (a file format for storing data such as three-dimensional models, animations, and materials) file, or a project file of DDC (Digital Content Creation software) software, but is not limited thereto. When obtaining the original camera motion trajectory, the animation file can be loaded into the software environment through the import function of the software. Determine the time range involved in the original camera motion trajectory, record the start time of the original camera motion trajectory as OriTS, record the end time of the original camera motion trajectory as OriTE, and take the time period between OriTS and OriTE as the preset time period. Extract the original position parameters and original optical parameters of the original camera motion trajectory corresponding to the preset time period stored in the animation file.
[0039] The extracted original position parameters and original optical parameters are sorted into a list or data structure according to time series, ensuring that each set of original position parameters and original optical parameters corresponds to time, and obtaining an original position parameter set and an original optical parameter set.
[0040] The target camera parameters refer to the motion and optical state that the user wants the camera to achieve at a specific time point, which can be manually input by the user. When the user manually inputs the target camera parameters, the software interface can provide a preset time period and parameter input method, allowing the user to select multiple target times from the preset time period, and enter or select the target position parameters and target optical parameters corresponding to each target time.
[0041] The original position parameters, original optical parameters, target position parameters, and target optical parameters are integrated to create a time list InputTList, ensuring that each target time corresponds to the original position parameters, original optical parameters, target position parameters, and target optical parameters.
[0042] In another optional embodiment, the acquisition of target camera parameters can also be read from the motion library of another camera. The user determines multiple target times, and then reads and parses the motion library file of another camera to extract the target position parameters and target optical parameters corresponding to the target times.
[0043] Step S204, determining a position parameter transformation curve within the preset time period based on the target position parameters corresponding to the plurality of target times and the original position parameters within the preset time period.
[0044] The position parameter transformation curve in the above steps is a curve used when fusing multiple target position parameters with the original camera motion trajectory, and is used to ensure that the original camera motion trajectory can smoothly transition to the position of the target camera while maintaining the original motion characteristics.
[0045] In an optional embodiment, a transformation matrix is usually used to determine the position parameter transformation curve. This is because the position parameter transformation curve is determined based on the target position parameters and the original position parameters, and both the target position parameters and the original position parameters contain parameters such as displacement, rotation, and scaling, and matrix transformation can more accurately describe and operate complex 3D (Three-Dimensional) space transformations, including translation, rotation, and scaling. In 3D space, the position and rotation of the camera are usually closely related. Using matrix transformation, especially using quaternions for rotation, can ensure that during the transformation process, the rotation path of the object is the shortest and smoothest, thereby maintaining the consistency of relative motion, avoiding the "universal joint lock" problem of Euler angles, and ensuring the accuracy of the position after transformation.
[0046] When using the transformation matrix to determine the position parameter transformation curve, the input time list InputTList is polled to obtain the original position parameters and target position parameters corresponding to each target time. Then the difference between the original position parameters and the target position parameters is calculated. Specifically, the original position parameters and the target position parameters can be converted into transformation matrices, and the difference matrix of the two transformation matrices is calculated. The transformation operation from the original position to the target position is described by the difference matrix. Subsequently, the position parameter transformation curve within a preset time period is generated based on the transformation matrix.
[0047] Step S206, determining an optical parameter difference curve within the preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period.
[0048] The optical parameter difference curve in the above steps is a curve used to describe the change of the optical parameters of the camera. It can represent the difference between the target optical parameters at multiple target time points and the original optical parameters in a preset time period. It can be used to accurately adjust the optical effect at certain key time points without destroying the smoothness of the original camera animation.
[0049] In an optional embodiment, the difference DiffList between the target optical parameter and the original optical parameter corresponding to each target time is determined, that is, the amount by which the optical parameter needs to be adjusted. The difference between the target optical parameter and the original optical parameter corresponding to each target time is integrated to obtain a difference list ParamsDiffList. Each difference DiffList in the difference list ParamsDiffList is polled, and based on the time value and data value corresponding to each difference DiffList, an optical parameter difference curve is determined using a linear interpolation method.
[0050] The reason for using the linear interpolation method to determine the optical parameter difference curve is that optical parameters are different from position parameters. Optical parameters usually only involve changes in a single value, and do not involve complex transformations in spatial positions. The simple and intuitive linear interpolation method is intuitive and easy to implement, and can directly reflect the rate of change of optical parameters. In addition, optical parameters such as FOV (Field of View) and FocusDistance (focal length) usually require continuous and smooth changes in animations. Linear interpolation can generate smooth curves, making the changes of optical parameters between different time points more natural and consistent with the continuity of visual perception.
[0051] Step S208: adjusting the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0052] The target camera motion trajectory in the above steps is the camera motion trajectory of other game characters that do not yet have camera motion trajectories, which is obtained by reusing and adjusting the original camera motion trajectory. The target camera motion trajectory not only retains the characteristics of the original camera dynamics, but also accurately matches the pre-set camera position or optical effect at the target time.
[0053] In an optional embodiment, the original position parameters in the original camera motion trajectory are adjusted using a transformation matrix corresponding to the position parameter transformation curve to achieve a transformation from the original position to the target position. The curve corresponding to the original optical parameters in the original camera motion trajectory is superimposed using an optical parameter difference curve, that is, the original optical parameters in the original camera motion trajectory are adjusted according to the adjustment amount of the optical parameters relative to the original value at a specific time point represented by each point on the optical parameter difference curve to update the optical parameters of the camera, ensuring that at the target time point in the preset time period, the optical parameters of the camera can accurately match the target setting, and at the non-target time point in the preset time period, the optical parameters change smoothly and naturally without destroying the fluency of the original animation. Based on the adjusted original position parameters and original optical parameters, a target camera motion trajectory that matches the target camera parameters is determined.
[0054] In at least some embodiments of the present disclosure, an original camera motion trajectory and target camera parameters corresponding to multiple target times are obtained, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; based on the target position parameters and the original position parameters, a position parameter transformation curve within the preset time period is determined; based on the target optical parameters and the original optical parameters, an optical parameter difference curve within the preset time period is determined; based on the position parameter transformation curve and the optical parameter difference curve, the original camera motion trajectory is adjusted to generate a target camera motion trajectory that matches the target camera parameters. It is easy to notice that the position parameter transformation curve is determined using the original position parameters in the original camera motion trajectory of the existing game character and the target position parameters in the target camera parameters corresponding to the new game character, and the optical parameter difference curve is determined using the original optical parameters in the original camera motion trajectory of the existing game character and the target optical parameters in the target camera parameters corresponding to the new game character. By adjusting the original camera motion trajectory according to the position parameter transformation curve and the optical parameter difference curve, the resources such as the original position parameters and original optical parameters in the original camera motion trajectory are fully reused, and the purpose of determining the target camera motion trajectory corresponding to the new game character is achieved, thereby realizing the technical effect of improving the resource reuse rate when designing camera motion trajectories corresponding to multiple game characters, and further solving the technical problem of low resource reuse rate when designing camera motion trajectories corresponding to multiple game characters.
[0055] In one embodiment of the present application, based on target position parameters corresponding to multiple target times and original position parameters within a preset time period, a position parameter transformation curve within a preset time period is determined, including: matching multiple target times with the preset time period, determining at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein at least one first time is within the preset time period; determining a transformation matrix corresponding to any first time based on the target position parameters of any first time and the original position parameters of the matching second time; fusing the transformation matrix corresponding to at least one first time and the preset transformation matrix corresponding to a third time within the preset time period to obtain a position parameter transformation curve, wherein the third time is used to characterize other times within the preset time period except the second time.
[0056] The first time in the above step is a valid time among the multiple target times, that is, a target time within a preset time period.
[0057] The second time in the above steps is a time that is consistent with the first time within a preset time period.
[0058] The transformation matrix in the above steps is used to calculate the correction between the original camera motion trajectory and the target camera motion trajectory, that is, how the position of the original camera at a specific time point is transformed to reach the position of the target camera. For multiple first times, each first time has corresponding target position parameters and original position parameters, so multiple transformation matrices are generated.
[0059] The third time in the above step is the time during which the motion trajectory remains unchanged within the preset time period, that is, the target position parameters corresponding to the third time are the same as the original position parameters, and the target optical parameters are the same as the original optical parameters.
[0060] The preset transformation matrix in the above steps is a pre-set transformation matrix. Exemplarily, the preset transformation matrix may be a matrix whose internal elements are all 1, but is not limited thereto. The preset transformation matrix may also be set according to actual application conditions.
[0061] In an optional embodiment, the start time of the preset time period is recorded as OriTS and the end time is recorded as OriTE, and these two times define the time range of the original camera motion trajectory. The user defines multiple target times by inputting a set of target times InputTList to indicate the time points that need to match specific camera positions on the original camera trajectory, but the multiple target times may be located on the time frame of the original camera motion trajectory, or may not be located on the time frame of the original camera motion trajectory, so it is necessary to match the multiple target times with the preset time period.
[0062] Traverse all target times T in InputTList and check whether each target time T is between OriTS and OriTE in the preset time period. If T is within the range, T is determined to be the first time; if T is not within the range, then this target time will be ignored. Based on the first time, determine the second time consistent with the first time within the preset time period. The other times except the second time in the preset time period are the third time. Exemplarily, the time between OriTS and OriTE in the preset time period includes: t0, t1, t2...tn, and the target time T in InputTList includes T0, T3, Tn+1, where T0 is consistent with the time t0 in the preset time period, T3 is consistent with the time t3 in the preset time period, and Tn+1 does not correspond to any time in the preset time period. Then, T0 and T3 can be determined as the first time, t0 and t3 are the second time corresponding to the first time, and t1, t2, t4...tn are the third time.
[0063] The transformation matrix is determined by the target position parameters OriParams of the first time and the matching original position parameters TarParams of the second time. Specifically, the target position parameters OriParams and the original position parameters TarParams can be converted into a matrix form, and then the transformed matrix is rotated around the coordinate axis to obtain the transformation matrix. The transformed matrix can also be scaled according to a preset ratio to obtain the transformation matrix, but is not limited to this.
[0064] For the third time, a matrix whose internal elements are all 1 may be used as a preset transformation matrix corresponding to the third time, to indicate that the target position parameters at the third time are the same as the original position and do not change.
[0065] The transformation matrices corresponding to the multiple first times and the preset change matrices corresponding to the third time are fused. Specifically, the fusion can be performed by linear interpolation or spherical linear interpolation, but is not limited thereto. The transformation matrices corresponding to the multiple first times and the preset change matrices corresponding to the third time are fused into a transformation curve that changes with time, that is, a position parameter transformation curve, which can ensure that the target camera motion trajectory obtained based on the position parameter transformation curve can smoothly transition from one camera position to another without abrupt jumps or breakpoints.
[0066] In one embodiment of the present application, based on the target position parameters of any first time and the original position parameters of the matching second time, a transformation matrix corresponding to any first time is determined, including: constructing a target position matrix based on the target position parameters of any first time, and constructing an original position matrix based on the original position parameters of the matching second time; determining the transformation matrix corresponding to any first time based on the product of the inverse matrix of the original position matrix and the target position matrix.
[0067] The target position matrix in the above steps can represent the position and rotation state of the target camera at the first time, and is used to determine the corresponding transformation matrix at the first time.
[0068] In an optional embodiment, the target position parameters generally include position parameters, rotation parameters, scaling parameters, etc. The position parameters can be expressed in the form of three-dimensional coordinates, the rotation parameters can be expressed using Euler angles, rotation matrices or quaternions, but are not limited thereto, and the scaling parameters can be expressed using the scaling ratio in the three-dimensional coordinate axis. Using the functions provided by the DCC software, the combination of the position parameters, rotation parameters, and scaling parameters can be converted into a 4x4 matrix form, i.e., the target position matrix, using the transformation function packaged in the DCC software. Similarly, after obtaining the original position parameters of the second time that matches the first time, the transformation function packaged in the DCC software is also used to construct the original position matrix based on the original position parameters.
[0069] Then, the inverse matrix calculation function in the DCC software can be used to calculate the inverse matrix of the original position matrix, and then the matrix multiplication calculation function in the DCC software can be used to calculate the product of the inverse matrix of the original position matrix and the target position matrix to obtain the transformation matrix corresponding to the first time.
[0070] In one embodiment of the present application, at least one transformation matrix corresponding to a first time is fused to obtain a position parameter transformation curve, including: sorting a preset transformation matrix corresponding to a third time and at least one transformation matrix corresponding to a first time in chronological order to obtain a transformation matrix sequence; determining a weight value curve between any two adjacent transformation matrices in the transformation matrix sequence; determining a difference between any two adjacent transformation matrices to obtain a transformation matrix difference; obtaining the product of the weight value curve and the transformation matrix difference to obtain a sub-transformation curve between any two adjacent transformation matrices; and splicing the sub-transformation curves between any two adjacent transformation matrices to obtain a position parameter transformation curve.
[0071] The weight value curve in the above steps is a time-varying curve used to control the degree of transition from the original position matrix to the target position matrix. Between any two adjacent time points, the weight value curve defines the ratio of the fusion of the original position matrix and the target position matrix. The weight value in the weight value curve usually varies between 0 and 1, where 0 means that the original position matrix is used completely and 1 means that the target position matrix is used completely.
[0072] The transformation matrix difference in the above steps can represent the difference between any two adjacent transformation matrices corresponding to the first time, and can be obtained by subtracting the transformation matrices.
[0073] The sub-transformation curve in the above steps refers to a smooth transition curve determined by the weight value curve and the transformation matrix difference between any two adjacent first time points. The sub-transformation curve is a part of the position parameter transformation curve. By splicing multiple sub-transformation curves, the position parameter transformation curve can be obtained.
[0074] The change matrix sequence in the above steps is a matrix sequence obtained by sorting the transformation matrix corresponding to the first time and the preset transformation matrix corresponding to the third time. The sorting is based on the time order, and the transformation matrix corresponding to the first time and the preset transformation matrix corresponding to the third time are sorted in order from the earliest to the last time.
[0075] In an optional embodiment, the transformation matrix corresponding to the first time and the preset transformation matrix corresponding to the third time are sorted in order from earliest to latest time to obtain a transformation matrix sequence.
[0076] For time T1 and time T2 corresponding to any two adjacent matrices in the transformation matrix sequence, the weight value curve is defined as a linear curve from 0 to 1. The weight value in the weight value curve changes with time t, and time t is between T1 and T2.
[0077] Then determine the transformation matrix difference. Specifically, take T1 and T2 as examples, respectively obtain the matrix M_1 at time T1 and the matrix M_2 at time T2, wherein the matrix M_1 may be the transformation matrix corresponding to the first time, or the preset transformation matrix corresponding to the third time, and the matrix M_2 may be the transformation matrix corresponding to the first time, or the preset transformation matrix corresponding to the third time. Take the example that both the matrix M_1 and the matrix M_2 are the transformation matrices corresponding to the first time, perform matrix subtraction operation on the transformation matrix M_1 and the transformation matrix M_2, and obtain the transformation matrix difference. In the DCC software, the sub-transformation curve calculation function can be used to apply the weight value curve to the transformation matrix difference, that is, calculate the product of the mean of the weight value in the weight value curve corresponding to T1 to T2 and the transformation matrix difference corresponding to T1 to T2, and generate a sub-transformation matrix that changes with time. Subsequently, for all adjacent first times, repeat the above steps to obtain multiple sub-transformation matrices, and splice the multiple sub-transformation matrices in time order to form the entire position parameter transformation curve.
[0078] For example, Figure 3 is a schematic diagram of generating a sub-transformation curve according to one optional embodiment of the present disclosure. The process of generating a sub-transformation curve based on a transformation matrix is as follows Figure 3 As shown, sub-transformation curve 1 can be generated based on adjacent transformation matrix 0 and transformation matrix 1, and then transformation matrix 2 is introduced. Sub-transformation curve 2 can be generated based on transformation matrix 2 and the information of transformation matrix 1 contained in sub-transformation curve 1. Similarly, after transformation matrix N is introduced, sub-transformation curve N can be generated based on transformation matrix N and the information of transformation matrix N-1 contained in sub-transformation curve N-1, thereby obtaining multiple sub-transformation curves constituting the position parameter transformation curve. The position parameter transformation curve can be obtained by splicing the sub-transformation curves between any two adjacent transformation matrices.
[0079] In one embodiment of the present application, a weight value curve between any two adjacent transformation matrices in a transformation matrix sequence is determined, including: determining the difference in time corresponding to any two adjacent transformation matrices to obtain a first time difference; determining the difference between a target moment and a minimum moment to obtain a second time difference, wherein the target moment is any moment between the times corresponding to any two adjacent transformation matrices, and the minimum moment is the minimum time between the times corresponding to any two adjacent transformation matrices; determining a weight value corresponding to the target moment based on the first time difference and the second time difference; and generating a weight value curve based on weight values corresponding to multiple moments between the times corresponding to any two adjacent transformation matrices.
[0080] In an optional embodiment, for the times T(n-1) and T(n) corresponding to any two adjacent transformation matrices, their time difference is calculated, and the first time difference is obtained as follows:
[0081] DeltaT_1 = T(n) - T(n-1);
[0082] Among them, DeltaT_1 is the first time difference.
[0083] Then, any time between T(n-1) and T(n) is selected as the target time t. The minimum time is the minimum time between the times corresponding to any two adjacent transformation matrices, that is, T(n-1). The difference between the target time and the minimum time is calculated, and the second time difference is obtained as:
[0084] DeltaT_2 = tT(n-1);
[0085] Wherein, DeltaT_2 is the second time difference.
[0086] Then, based on the first time difference and the second time difference, the ratio of the second time difference to the first time difference is calculated, and the weight value corresponding to the target time is determined according to the size relationship between the ratio of the second time difference to the first time difference and the preset value. A weight value curve can be generated by summarizing multiple weight values in time series. The weight value curve describes how the weight value changes over time when transitioning from the original camera position to the target camera position, thereby controlling the degree of fusion between the original camera position and the target camera position.
[0087] In one embodiment of the present application, based on the first time difference and the second time difference, the weight value corresponding to the target moment is determined, including: determining the ratio of the second time difference to the first time difference to obtain the time proportion corresponding to the target moment; determining the maximum value between the time proportion and the first preset value; determining the minimum value between the maximum value and the second preset value to obtain the weight value corresponding to the target moment, wherein the second preset value is greater than the first preset value.
[0088] The time ratio corresponding to the target time in the above steps is the ratio of the second time difference to the first time difference.
[0089] The first preset value in the above steps is a pre-set value, which can be preset according to actual application conditions. The specific value of the first preset value is not limited here. For example, the first preset value can be 0, but is not limited thereto.
[0090] The second preset value in the above steps is a preset value, which can be preset according to actual application conditions. The specific value of the second preset value is not limited here. For example, the second preset value can be 1, but is not limited thereto.
[0091] In an optional embodiment, the calculation formula of the weight value corresponding to the target time is:
[0092] weight(n)=min(1,max(0,(tT(n-1)) / (T(n)-T(n-1))));
[0093] Among them, weight(n) is the weight value corresponding to the target time, t is the target time, T(n-1) and T(n) are two adjacent first times, T(n-1) is the minimum time between the two adjacent first times, (tT(n-1)) is the second time difference, (T(n)-T(n-1)) is the first time difference, (tT(n-1)) / (T(n)-T(n-1)) is the time ratio, the first preset value is 0, and the second preset value is 1.
[0094] The above formula for calculating the weight value corresponding to the target moment can ensure that at time T(n-1), the weight value is 0; and at time T(n), the weight value is 1. At any time t between T(n-1) and T(n), the weight value changes linearly according to time, which is conducive to a smooth transition from the original camera position to the target camera position.
[0095] In one embodiment of the present application, based on target optical parameters corresponding to multiple target times and original optical parameters within a preset time period, an optical parameter difference curve within a preset time period is determined, including: matching multiple target times with the preset time period, determining at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein the at least one first time is within the preset time period; determining a parameter difference corresponding to any first time based on a difference between a target optical parameter of any first time and an original optical parameter of a matching second time; generating an optical parameter difference curve based on a parameter difference corresponding to at least one first time and a preset parameter difference corresponding to a third time within the preset time period.
[0096] The preset parameter difference in the above steps is a preset parameter difference. Exemplarily, the preset parameter difference may be 0, or may be predicted according to actual application conditions. The specific value of the preset parameter difference may not be limited thereto.
[0097] In an optional embodiment, the start time OriTS and the end time OriTE of the preset time period are determined, and multiple target times are matched with the preset time period. If the target time is between the start time OriTS and the end time OriTE, the target time is determined to be the first time. If the target time is outside the start time OriTS and the end time OriTE, the first time is ignored and does not participate in subsequent processing.
[0098] For each valid first time T, find the corresponding second time OriT in the original camera motion trajectory, that is, find the time point closest to T from the key frame of the original camera motion trajectory and use it as the second time.
[0099] Calculate the difference between the target optical parameter at the first time and the original optical parameter at the matching second time, that is, the parameter difference corresponding to the first time. Set the preset parameter difference to 0, that is, the preset parameter difference corresponding to the third time within the preset time period is 0. Construct a time list containing multiple parameter differences corresponding to the first time and preset parameter differences corresponding to the third time, and create an animation curve based on the time list to achieve it, with the X-axis representing time and the Y-axis representing the parameter difference Diff. Add each first time and its corresponding parameter difference Diff, and the preset parameter difference 0 corresponding to each third time as key points to the animation curve. Apply an interpolation method between each key point to generate a continuous difference curve to obtain an optical parameter difference curve. The interpolation method can be linear interpolation or S-shaped curve interpolation, but is not limited to this.
[0100] In one embodiment of the present application, the original camera motion trajectory is adjusted based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters, including: transforming the original position parameter set within a preset time period based on the position parameter transformation curve to obtain the target position parameter set within the preset time period; adjusting the original optical parameter set in the original camera parameter set based on the optical parameter difference curve to obtain the target optical parameter set within the preset time period; generating the target camera motion trajectory based on the target position parameter set and the target optical parameter set within the preset time period.
[0101] In an optional embodiment, a position parameter transformation curve is obtained, and for each frame t within a preset time period corresponding to the position parameter transformation curve, the corresponding original position parameter set OriPosParams(t) is obtained. The transformation matrix OutM(t) on the position parameter transformation curve segment where the current frame t is located is found. In three-dimensional software, the transformation matrix OutM(t) can be applied to the original position parameter set OriPosParams(t) to generate a target position parameter set. For example, in Maya (a three-dimensional animation production software), the multMatrix (a node in Maya software) and decomposeMatrix (a node in Maya software) nodes can be used to complete this process. The original position parameter set OriPosParams(t) is transformed by the transformation matrix OutM(t) to obtain the target position parameter set TarPosParams(t).
[0102] When adjusting the original optical parameter set in the original camera parameter set based on the optical parameter difference curve, for each frame t within a preset time period, obtain the original optical parameter set OriOpticalParams(t). From the optical parameter difference curve, extract the difference set DiffOpticalParams(t) in the optical parameter difference curve at time t. Add the difference set to the original optical parameter set to obtain the target optical parameter set TarOpticalParams(t). For example, for the adjustment of FOV, the new FOV value is OriFOV(t)+DiffFOV(t), where OriFOV(t) is the field of view angle parameter corresponding to the original optical parameter set at time t, and DiffFOV(t) is the field of view angle parameter corresponding to the difference set DiffOpticalParams(t) in the optical parameter difference curve at time t.
[0103] The target position parameter set and target optical parameter set within the preset time period are applied to the original camera to update the position and optical properties of the original camera, such as FOV, aperture value, etc. Then, the adjusted parameter set is used to generate a new camera motion trajectory, which is the target camera motion trajectory.
[0104] For example, Figure 4 is a schematic diagram of generating a target camera motion trajectory according to one optional embodiment of the present disclosure, such as Figure 4As shown, a plurality of sub-transformation curves are combined to obtain a position parameter transformation curve, and a conversion node containing a target optical parameter set can be obtained based on the position parameter transformation curve. Specifically, the original camera motion trajectory is adjusted using the position parameter transformation curve, that is, the original position parameter set within a preset time period is transformed based on the position parameter transformation matrix to obtain a conversion node containing a target position parameter set. The target optical parameter set is inherited to the conversion node to form a tree structure, with the conversion node as the parent node and the target optical parameter set as the child node. The target optical parameter set contains multiple attributes, and each attribute is obtained by summing the original optical parameter corresponding to the target time and the value corresponding to the target time in the optical parameter difference curve. After the target optical parameter set becomes a child node of the conversion node, the conversion node containing the target position parameter set can generate a target camera motion trajectory.
[0105] A preferred embodiment is described below. Figure 5 is a schematic diagram of processing the motion trajectory of a camera according to one optional embodiment of the present disclosure, such as Figure 5 As shown, the target camera parameters include target position parameters and target optical parameters, and the original camera motion trajectory includes an original position parameter set and an original optical parameter set. The target position parameters and the target optical parameters correspond to the target time in a plurality of target times one by one, and the original position parameters and the original optical parameters corresponding to the target time can be found in the original position parameter set and the original optical parameters according to the target time. A plurality of sub-transformation curves can be determined according to the target position parameters and the original position parameters corresponding to the plurality of target times, and a position parameter transformation curve can be obtained by combining the plurality of sub-transformation curves. An optical difference curve can be determined based on the target optical parameters and the original optical parameters corresponding to the plurality of target times, and the original optical parameters corresponding to the target time can be determined from the original camera motion trajectory. The various attributes in the target optical parameter set can be determined according to the original optical parameters corresponding to the target time and the values corresponding to the target time in the optical parameter difference curve, wherein the target optical parameter set includes a plurality of attributes. A conversion node including the target optical parameter set can be obtained based on the position parameter transformation curve. Specifically, the original camera motion trajectory is adjusted using the position parameter transformation curve, that is, the original position parameter set within a preset time period is transformed based on the position parameter transformation matrix, and a conversion node including the target position parameter set is obtained. The target optical parameter set is inherited to the conversion node to form a tree structure, with the conversion node as the parent node and the target optical parameter set as the child node. After the target optical parameter set becomes a child node of the conversion node, the conversion node containing the target position parameter set can generate the target camera motion trajectory.
[0106] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0107] In this embodiment, a device for processing the motion trajectory of a camera is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the terms "unit" and "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0108] Figure 6 is a structural block diagram of a device for processing camera motion trajectories according to one embodiment of the present disclosure, such as Figure 6 As shown, the device comprises:
[0109] An acquisition module 60 is used to acquire an original camera motion trajectory and target camera parameters corresponding to a plurality of target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters;
[0110] A position parameter transformation curve determining module 62, for determining a position parameter transformation curve within a preset time period based on target position parameters corresponding to a plurality of target times and original position parameters within a preset time period;
[0111] An optical parameter difference curve determining module 64 is used to determine an optical parameter difference curve within a preset time period based on target optical parameters corresponding to a plurality of target times and original optical parameters within a preset time period;
[0112] The generating module 66 is used to adjust the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0113] The position parameter transformation curve determination module 62 includes: a first matching unit, used to match multiple target times with a preset time period, determine at least one first time among the multiple target times, and a second time within the preset time period that matches at least one first time, wherein at least one first time is within the preset time period; a first determination unit, used to determine the transformation matrix corresponding to any first time based on the target position parameters of any first time and the original position parameters of the matching second time; a fusion unit, used to fuse the transformation matrix corresponding to at least one first time with the preset transformation matrix corresponding to the third time within the preset time period to obtain a position parameter transformation curve, wherein the third time is used to characterize other times within the preset time period except the second time.
[0114] The first determination unit is also used to construct a target position matrix based on the target position parameters of any first time, and to construct an original position matrix based on the original position parameters of the matching second time; and to determine the transformation matrix corresponding to any first time based on the product of the inverse matrix of the original position matrix and the target position matrix.
[0115] The fusion unit is also used to determine a weight value curve between any two adjacent first times in at least one first time; sort the preset transformation matrix corresponding to the third time and the transformation matrix corresponding to at least one first time in chronological order to obtain a transformation matrix sequence; determine a weight value curve between any two adjacent transformation matrices in the transformation matrix sequence; determine the difference between any two adjacent transformation matrices to obtain the transformation matrix difference; obtain the product of the weight value curve and the transformation matrix difference to obtain a sub-transformation curve between any two adjacent transformation matrices; splice the sub-transformation curves between any two adjacent transformation matrices to obtain a position parameter transformation curve.
[0116] The fusion unit is also used to determine the difference between the times corresponding to any two adjacent transformation matrices to obtain a first time difference; determine the difference between the target moment and the minimum moment to obtain a second time difference, wherein the target moment is any moment between the times corresponding to any two adjacent transformation matrices, and the minimum moment is the minimum time between the times corresponding to any two adjacent transformation matrices; determine the weight value corresponding to the target moment based on the first time difference and the second time difference; and generate a weight value curve based on the weight values corresponding to multiple moments between the times corresponding to any two adjacent transformation matrices.
[0117] The fusion unit is also used to determine the ratio of the second time difference to the first time difference to obtain the time proportion corresponding to the target moment; determine the maximum value between the time proportion and the first preset value; determine the minimum value between the maximum value and the second preset value to obtain the weight value corresponding to the target moment, wherein the second preset value is greater than the first preset value.
[0118] The optical parameter difference curve determination module 64 includes: a second matching unit, used to match multiple target times with a preset time period, determine at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein at least one first time is within the preset time period; a second determination unit, used to determine the parameter difference corresponding to any first time based on the difference between the target optical parameters of any first time and the original optical parameters of the matched second time; and a first generation unit, used to generate an optical parameter difference curve based on the parameter difference corresponding to at least one first time and the preset parameter difference corresponding to a third time within the preset time period.
[0119] The generation module 66 includes: a transformation unit, which is used to transform the original position parameter set within a preset time period based on the position parameter transformation curve to obtain the target position parameter set within the preset time period; adjust the original optical parameter set in the original camera parameter set based on the optical parameter difference curve to obtain the target optical parameter set within the preset time period; and generate the target camera motion trajectory based on the target position parameter set and the target optical parameter set within the preset time period.
[0120] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units and modules are all located in the same processor; or, the above-mentioned units and modules are located in different processors in any combination.
[0121] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0122] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0123] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0124] Optionally, in this embodiment, the above-mentioned computer-readable storage medium can be configured to store a computer program for executing the following steps: obtaining an original camera motion trajectory, and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; determining a position parameter transformation curve within a preset time period based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period; determining an optical parameter difference curve within a preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period; adjusting the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0125] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: matching multiple target times with a preset time period, determining at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein at least one first time is within the preset time period; determining a transformation matrix corresponding to any first time based on the target position parameters of any first time and the original position parameters of the matching second time; fusing the transformation matrix corresponding to at least one first time and the preset transformation matrix corresponding to a third time within the preset time period to obtain a position parameter transformation curve, wherein the third time is used to characterize other times within the preset time period except the second time.
[0126] Optionally, the above-mentioned computer-readable storage medium is also configured to store program codes for executing the following steps: constructing a target position matrix based on the target position parameters of any first time, and constructing an original position matrix based on the original position parameters of the matching second time; determining the transformation matrix corresponding to any first time based on the product of the inverse matrix of the original position matrix and the target position matrix.
[0127] Optionally, the above-mentioned computer-readable storage medium is also configured to store program codes for executing the following steps: sorting the preset transformation matrix corresponding to the third time and the transformation matrix corresponding to at least one first time in chronological order to obtain a transformation matrix sequence; determining a weight value curve between any two adjacent transformation matrices in the transformation matrix sequence; determining the difference between any two adjacent transformation matrices to obtain a transformation matrix difference; obtaining the product of the weight value curve and the transformation matrix difference to obtain a sub-transformation curve between any two adjacent transformation matrices; splicing the sub-transformation curves between any two adjacent transformation matrices to obtain a position parameter transformation curve.
[0128] Optionally, the above-mentioned computer-readable storage medium is also configured to store program codes for executing the following steps: determining the difference between the times corresponding to any two adjacent transformation matrices to obtain a first time difference; determining the difference between the target moment and the minimum moment to obtain a second time difference, wherein the target moment is any moment between the times corresponding to any two adjacent transformation matrices, and the minimum moment is the minimum time between the times corresponding to any two adjacent transformation matrices; determining the weight value corresponding to the target moment based on the first time difference and the second time difference; generating a weight value curve based on the weight values corresponding to multiple moments between the times corresponding to any two adjacent transformation matrices.
[0129] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: determining the ratio of the second time difference to the first time difference to obtain the time ratio corresponding to the target moment; determining the maximum value between the time ratio and the first preset value; determining the minimum value between the maximum value and the second preset value to obtain the weight value corresponding to the target moment, wherein the second preset value is greater than the first preset value.
[0130] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: matching multiple target times with a preset time period, determining at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein the at least one first time is within the preset time period; determining a parameter difference corresponding to any first time based on a difference between a target optical parameter of any first time and an original optical parameter of a matching second time; generating an optical parameter difference curve based on a parameter difference corresponding to at least one first time and a preset parameter difference corresponding to a third time within the preset time period.
[0131] Optionally, the above-mentioned computer-readable storage medium is also configured to store program codes for executing the following steps: transforming the original position parameter set within a preset time period based on a position parameter transformation curve to obtain a target position parameter set within the preset time period; adjusting the original optical parameter set in the original camera parameter set based on the optical parameter difference curve to obtain a target optical parameter set within the preset time period; generating a target camera motion trajectory based on the target position parameter set and the target optical parameter set within the preset time period.
[0132] In at least some embodiments of the present disclosure, an original camera motion trajectory and target camera parameters corresponding to multiple target times are obtained, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; based on the target position parameters and the original position parameters, a position parameter transformation curve within the preset time period is determined; based on the target optical parameters and the original optical parameters, an optical parameter difference curve within the preset time period is determined; based on the position parameter transformation curve and the optical parameter difference curve, the original camera motion trajectory is adjusted to generate a target camera motion trajectory that matches the target camera parameters. It is easy to notice that the position parameter transformation curve is determined using the original position parameters in the original camera motion trajectory of the existing game character and the target position parameters in the target camera parameters corresponding to the new game character, and the optical parameter difference curve is determined using the original optical parameters in the original camera motion trajectory of the existing game character and the target optical parameters in the target camera parameters corresponding to the new game character. By adjusting the original camera motion trajectory according to the position parameter transformation curve and the optical parameter difference curve, the resources such as the original position parameters and original optical parameters in the original camera motion trajectory are fully reused, and the purpose of determining the target camera motion trajectory corresponding to the new game character is achieved, thereby realizing the technical effect of improving the resource reuse rate when designing camera motion trajectories corresponding to multiple game characters, and further solving the technical problem of low resource reuse rate when designing camera motion trajectories corresponding to multiple game characters.
[0133] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0134] In an exemplary embodiment of the present application, a program product capable of implementing the above method of the present embodiment is stored on a computer-readable storage medium. In some possible implementations, various aspects of the embodiments of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above "Exemplary Method" section of the present embodiment according to various exemplary implementations of the present disclosure.
[0135] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present disclosure is not limited to this. In the embodiment of the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0136] The program product may be in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0137] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0138] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0139] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0140] Optionally, in this embodiment, the above-mentioned processor can be configured to perform the following steps through a computer program: obtain an original camera motion trajectory, and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period, determine a position parameter transformation curve within the preset time period; based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period, determine an optical parameter difference curve within the preset time period; based on the position parameter transformation curve and the optical parameter difference curve, adjust the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0141] Optionally, the processor can also be configured to perform the following steps through a computer program: match multiple target times with a preset time period, determine at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein at least one first time is within the preset time period; determine a transformation matrix corresponding to any first time based on the target position parameters of any first time and the original position parameters of the matching second time; fuse the transformation matrix corresponding to at least one first time and the preset transformation matrix corresponding to the third time within the preset time period to obtain a position parameter transformation curve, wherein the third time is used to characterize other times within the preset time period except the second time.
[0142] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: construct a target position matrix based on the target position parameters of any first time, and construct an original position matrix based on the original position parameters of the matching second time; determine the transformation matrix corresponding to any first time based on the product of the inverse matrix of the original position matrix and the target position matrix.
[0143] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: sort the preset transformation matrix corresponding to the third time and the transformation matrix corresponding to at least one first time in chronological order to obtain a transformation matrix sequence; determine the weight value curve between any two adjacent transformation matrices in the transformation matrix sequence; determine the difference between any two adjacent transformation matrices to obtain the transformation matrix difference; obtain the product of the weight value curve and the transformation matrix difference to obtain a sub-transformation curve between any two adjacent transformation matrices; splice the sub-transformation curves between any two adjacent transformation matrices to obtain a position parameter transformation curve.
[0144] Optionally, the processor can also be configured to perform the following steps through a computer program: determine the difference between the times corresponding to any two adjacent transformation matrices to obtain a first time difference; determine the difference between the target moment and the minimum moment to obtain a second time difference, wherein the target moment is any moment between the times corresponding to any two adjacent transformation matrices, and the minimum moment is the minimum time between the times corresponding to any two adjacent transformation matrices; determine the weight value corresponding to the target moment based on the first time difference and the second time difference; generate a weight value curve based on the weight values corresponding to multiple moments between the times corresponding to any two adjacent transformation matrices.
[0145] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: determine the ratio of the second time difference to the first time difference to obtain the time proportion corresponding to the target moment; determine the maximum value between the time proportion and the first preset value; determine the minimum value between the maximum value and the second preset value to obtain the weight value corresponding to the target moment, wherein the second preset value is greater than the first preset value.
[0146] Optionally, the processor can also be configured to perform the following steps through a computer program: match multiple target times with a preset time period, determine at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein at least one first time is within the preset time period; determine a parameter difference corresponding to any first time based on the difference between the target optical parameters of any first time and the original optical parameters of the matching second time; generate an optical parameter difference curve based on the parameter difference corresponding to at least one first time and the preset parameter difference corresponding to a third time within the preset time period.
[0147] Optionally, the processor can also be configured to perform the following steps through a computer program: transforming the original position parameter set within a preset time period based on a position parameter transformation curve to obtain a target position parameter set within the preset time period; adjusting the original optical parameter set in the original camera parameter set based on an optical parameter difference curve to obtain a target optical parameter set within the preset time period; and generating a target camera motion trajectory based on the target position parameter set and the target optical parameter set within the preset time period.
[0148] In at least some embodiments of the present disclosure, an original camera motion trajectory and target camera parameters corresponding to multiple target times are obtained, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; based on the target position parameters and the original position parameters, a position parameter transformation curve within the preset time period is determined; based on the target optical parameters and the original optical parameters, an optical parameter difference curve within the preset time period is determined; based on the position parameter transformation curve and the optical parameter difference curve, the original camera motion trajectory is adjusted to generate a target camera motion trajectory that matches the target camera parameters. It is easy to notice that the position parameter transformation curve is determined using the original position parameters in the original camera motion trajectory of the existing game character and the target position parameters in the target camera parameters corresponding to the new game character, and the optical parameter difference curve is determined using the original optical parameters in the original camera motion trajectory of the existing game character and the target optical parameters in the target camera parameters corresponding to the new game character. By adjusting the original camera motion trajectory according to the position parameter transformation curve and the optical parameter difference curve, the resources such as the original position parameters and original optical parameters in the original camera motion trajectory are fully reused, and the purpose of determining the target camera motion trajectory corresponding to the new game character is achieved, thereby realizing the technical effect of improving the resource reuse rate when designing camera motion trajectories corresponding to multiple game characters, and further solving the technical problem of low resource reuse rate when designing camera motion trajectories corresponding to multiple game characters.
[0149] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Figure 7 As shown, the electronic device 700 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0150] like Figure 7 As shown, the electronic device 700 is in the form of a general computing device. The components of the electronic device 700 may include but are not limited to: at least one processor 710, at least one memory 720, a bus 730 connecting different system components (including the memory 720 and the processor 710), and a display 740.
[0151] The memory 720 stores program codes, which can be executed by the processor 710, so that the processor 710 executes the steps described in the method part of the embodiment of the present application according to various exemplary embodiments of the present disclosure.
[0152] The memory 720 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 7201 and / or a cache memory unit 7202, and may further include a read-only memory unit (ROM) 7203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or optical non-volatile solid-state memory.
[0153] In some examples, the memory 720 may also include a program / utility 7204 having a set (at least one) of program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment. The memory 720 may further include a memory remotely disposed relative to the processor 710, and these remote memories may be connected to the electronic device 700 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0154] Bus 730 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a local bus of processor 710, or any of a variety of bus architectures.
[0155] The display 740 may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 700 .
[0156] Optionally, the electronic device 700 may also communicate with one or more external devices 800 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 700, and / or any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 750. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 760. Figure 7 As shown, the network adapter 760 communicates with other modules of the electronic device 700 via the bus 730. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0157] The electronic device 700 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.
[0158] It can be understood by those skilled in the art that Figure 7 The structure shown is for illustration only and does not limit the structure of the above electronic device. Figure 7 More or fewer components as shown, or with Figure 1 The memory 720 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the method for processing the motion trajectory of a camera in the embodiment of the present disclosure. The processor 710 executes various functional applications and data processing by running the computer programs stored in the memory 720, that is, implements the above-mentioned method for processing the motion trajectory of a camera.
[0159] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.
[0160] Optionally, the computer program included in the above-mentioned computer program product is used by a processor to execute the following steps: obtain an original camera motion trajectory, and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; determine a position parameter transformation curve within the preset time period based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period; determine an optical parameter difference curve within the preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period; adjust the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0161] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.
[0162] Optionally, the computer program stored in the above-mentioned non-volatile computer-readable storage medium is used by the processor to execute the following steps: obtain an original camera motion trajectory, and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period, determine a position parameter transformation curve within the preset time period; based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period, determine an optical parameter difference curve within the preset time period; and adjust the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0163] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.
[0164] Optionally, the computer program is executed by the processor to perform the following steps: obtaining an original camera motion trajectory and target camera parameters corresponding to multiple target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; determining a position parameter transformation curve within the preset time period based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period; determining an optical parameter difference curve within the preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period; and adjusting the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
[0165] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0166] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant description of the optical embodiment.
[0167] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0168] 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 on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0169] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0171] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present disclosure. These improvements and modifications should also be regarded as the scope of protection of the present disclosure.
Claims
1. A method for processing camera motion trajectory, characterized in that: include: Acquire an original camera motion trajectory and target camera parameters corresponding to a plurality of target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; Determining a position parameter transformation curve within the preset time period based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period; Determining an optical parameter difference curve within the preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period; The original camera motion trajectory is adjusted based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
2. The method according to claim 1, characterized in that The determining of the position parameter transformation curve within the preset time period based on the target position parameters corresponding to the multiple target times and the original position parameters within the preset time period includes: Matching the multiple target times with the preset time period, determining at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein the at least one first time is within the preset time period; Based on the target position parameters of any first time and the original position parameters of the matching second time, determining the transformation matrix corresponding to the any first time; The transformation matrix corresponding to the at least one first time and the preset transformation matrix corresponding to the third time within the preset time period are merged to obtain the position parameter transformation curve, wherein the third time is used to characterize other times within the preset time period except the second time.
3. The method according to claim 2, characterized in that The determining, based on the target position parameter of any first time and the original position parameter of the matched second time, a transformation matrix corresponding to any first time includes: Based on the target position parameters of any one of the first times, construct a target position matrix, and based on the original position parameters of the matched second time, construct an original position matrix; Based on the product of the inverse matrix of the original position matrix and the target position matrix, a transformation matrix corresponding to the any one first time is determined.
4. The method according to claim 2, characterized in that: The step of fusing the transformation matrix corresponding to the at least one first time with the preset transformation matrix corresponding to the third time within the preset time period to obtain the position parameter transformation curve includes: Sorting the preset transformation matrix corresponding to the third time and the transformation matrix corresponding to the at least one first time in time order to obtain a transformation matrix sequence; Determining a weight value curve between any two adjacent transformation matrices in the transformation matrix sequence; Determine the difference between any two adjacent transformation matrices to obtain a transformation matrix difference; Obtaining the product of the weight value curve and the transformation matrix difference to obtain a sub-transformation curve between any two adjacent transformation matrices; The sub-transformation curves between any two adjacent transformation matrices are concatenated to obtain the position parameter transformation curve.
5. The method according to claim 4, characterized in that The step of determining a weight value curve between any two adjacent transformation matrices in the transformation matrix sequence comprises: Determine the time difference corresponding to any two adjacent transformation matrices to obtain a first time difference; Determine the difference between the target time and the minimum time to obtain a second time difference, wherein the target time is any time between the times corresponding to the any two adjacent transformation matrices, and the minimum time is the minimum time between the times corresponding to the any two adjacent transformation matrices; Determining a weight value corresponding to the target time based on the first time difference and the second time difference; The weight value curve is generated based on weight values corresponding to multiple moments between the times corresponding to any two adjacent transformation matrices.
6. The method according to claim 5, characterized in that The determining, based on the first time difference and the second time difference, a weight value corresponding to the target time includes: Determine the ratio of the second time difference to the first time difference to obtain the time proportion corresponding to the target time; Determine a maximum value between the time ratio and a first preset value; Determine the minimum value between the maximum value and a second preset value to obtain a weight value corresponding to the target moment, wherein the second preset value is greater than the first preset value.
7. The method according to claim 1, characterized in that The determining of the optical parameter difference curve within the preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period includes: Matching the multiple target times with the preset time period, determining at least one first time among the multiple target times, and a second time within the preset time period that matches the at least one first time, wherein the at least one first time is within the preset time period; Determine the parameter difference corresponding to any first time based on the difference between the target optical parameter at any first time and the original optical parameter at the matching second time; The optical parameter difference curve is generated based on the parameter difference corresponding to the at least one first time and the preset parameter difference corresponding to the third time within the preset time period.
8. The method according to any one of claims 1 to 7, characterized in that The adjusting the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory matching the target camera parameters includes: Transforming the original position parameter set within the preset time period based on the position parameter transformation curve to obtain a target position parameter set within the preset time period; Adjusting an original optical parameter set in the original camera parameter set based on the optical parameter difference curve to obtain a target optical parameter set within the preset time period; The target camera motion trajectory is generated based on the target position parameter set and the target optical parameter set within the preset time period.
9. A camera motion trajectory processing device, characterized in that: include: An acquisition module, used to acquire an original camera motion trajectory and target camera parameters corresponding to a plurality of target times, wherein the original camera motion trajectory includes an original position parameter set and a corresponding original optical parameter set within a preset time period, and the target camera parameters include target position parameters and target optical parameters; A position parameter transformation curve determination module, configured to determine a position parameter transformation curve within the preset time period based on the target position parameters corresponding to the plurality of target times and the original position parameters within the preset time period; An optical parameter difference curve determining module, configured to determine an optical parameter difference curve within the preset time period based on the target optical parameters corresponding to the multiple target times and the original optical parameters within the preset time period; A generating module is used to adjust the original camera motion trajectory based on the position parameter transformation curve and the optical parameter difference curve to generate a target camera motion trajectory that matches the target camera parameters.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 8 when executed by a processor.
11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.