Method, device and computer equipment for determining virtual camera motion trajectory

By reversely deriving the movement trajectory of the target object in the video to determine the movement trajectory of the virtual camera, the problem of inaccurate determination of the virtual camera's movement trajectory in the existing technology is solved, and the accuracy and consistency of the game vibration effect are improved.

CN113856196BActive Publication Date: 2024-08-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111122996.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-24
Publication Date
2024-08-27
Estimated Expiration
2041-09-24

AI Technical Summary

Technical Problem

The determination of the motion trajectory of the virtual camera in the prior art is inaccurate, mainly due to the reliance on empirical judgment, which results in the inability to accurately determine the duration and angle range of the vibration curve, affecting the game experience.

Method used

By analyzing the video to be processed, the movement trajectory of the target object is determined, and the movement trajectory of the virtual camera is obtained by reverse derivation. The single target tracking algorithm CSRT and the frame sequence image processing model are used to adjust the sensitivity parameters and target object thresholds to accurately define the virtual camera. The movement trajectory of the camera.

Benefits of technology

It achieves a more accurate determination of the motion trajectory of the virtual camera, avoids errors caused by empirical judgment, and improves the authenticity and consistency of the vibration effect in the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113856196B
    Figure CN113856196B
Patent Text Reader

Abstract

The present application provides a method, device and computer equipment for determining the motion trajectory of a virtual camera. The method determines the target motion trajectory of a target object among multiple objects by analyzing a video to be processed. The video to be processed is obtained by shooting multiple objects with a virtual camera. The target motion trajectory is the motion trajectory of the target object in the video to be processed. The target motion trajectory of the target object is reversely deduced to obtain the motion trajectory of the virtual camera. The motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory. In this technical solution, the motion of the virtual camera is reversed from the motion of the object in the video, which avoids the errors caused by the judgment of the prior art relying solely on experience, and achieves a more accurate determination of the motion trajectory of the virtual camera.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a method, device and computer equipment for determining a motion trajectory of a virtual camera. Background Art

[0002] Vision is the fastest and most informative medium for acquiring information and is one of the main ways for people to obtain information. In the design of computer games, giving players feedback on the screen is not only an important way to interact with players, but also an effective tool to bring players a real experience. For example, when playing a shooting game from a first-person perspective, one of the main ways for players to gain immersion is through the screen shake caused by being hit and the screen vibration caused by gun-related operations.

[0003] In the prior art, the process of lens shaking is qualitatively analyzed through video, and then the vibration process of the screen is manually delineated, such as the maximum deflection point of the vibration. An average and smooth curve is formed based on the delineated points, and then the maximum value and interval of the vibration are adjusted according to the design after the effect is experienced in the game.

[0004] However, the vibration process of the prior art completely relies on past experience to initialize the vibration curve of the virtual camera, and cannot accurately judge the duration and the vibration range of the relevant angle, resulting in the problem of inaccurate determination of the motion trajectory of the virtual camera. Summary of the invention

[0005] The embodiments of the present application provide a method, an apparatus and a computer device for determining a motion trajectory of a virtual camera, so as to solve the problem of inaccurate determination of the motion trajectory of a virtual camera.

[0006] In a first aspect, an embodiment of the present application provides a method for determining a motion trajectory of a virtual camera, comprising:

[0007] Analyze the video to be processed to determine a target motion trajectory of a target object among the multiple objects, wherein the video to be processed is obtained by shooting the multiple objects with a virtual camera, and the target motion trajectory is a motion trajectory of the target object in the video to be processed;

[0008] The target motion trajectory of the target object is reversely deduced to obtain the motion trajectory of the virtual camera, where the motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory.

[0009] In a possible design of the first aspect, the virtual camera motion mode is two-dimensional motion, and the parsing of the video to be processed to determine the target motion trajectory of the target object among the multiple objects includes:

[0010] Performing frame conversion processing on the video to be processed to obtain multiple frame images;

[0011] Based on the single target tracking algorithm CSRT, the multiple frames of images are processed in sequence to obtain the positions of the multiple objects in the images of each frame;

[0012] According to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame, the target motion trajectory of the target object in the two-dimensional space is determined.

[0013] In another possible design of the first aspect, the virtual camera motion mode is three-dimensional motion, and parsing the video to be processed includes:

[0014] Processing the video to be processed frame by frame to obtain multiple frame sequence images;

[0015] The plurality of frame sequence images are input into a preset first frame sequence image processing model to obtain a first motion trajectory of the target object in three-dimensional space. The first frame sequence image processing model is used to obtain a position of the object in the frame sequence images.

[0016] In this possible design, the method further includes:

[0017] In response to the user's parameter adjustment operation, the sensitivity parameter and the target object threshold in the first frame sequence image processing model are adjusted to obtain a second frame sequence image processing model, wherein the magnitude of the sensitivity parameter is used to indicate the sensitivity of identifying the object, and the target object threshold is used to indicate the gray value boundary of the preferred target object in each frame sequence image;

[0018] Inputting the plurality of frame sequence images into the second frame sequence image processing model to obtain a second motion trajectory of the target object in three-dimensional space;

[0019] In response to a first screening operation of a user, the target motion trajectory is determined among a first motion trajectory of the target object and a second motion trajectory of the target object.

[0020] Optionally, determining the target motion trajectory of the target object in the two-dimensional space according to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame includes:

[0021] For each object, a coordinate system is established with the time node corresponding to the first frame image and the position of the object in the first frame image as the origin, with the horizontal axis being time and the vertical axis being position distance;

[0022] Sequentially adding the time nodes corresponding to the respective frame images and the positions of the object in the images of the respective frames to the coordinate system to obtain a third motion trajectory of the object;

[0023] In response to the second screening operation of the user, the third motion trajectory corresponding to the target object is determined in the third motion trajectories of the objects as the target motion trajectory in the two-dimensional space.

[0024] Optionally, the three-dimensional space includes: a first plane, a second plane, and a third plane that are perpendicular to each other, and obtaining a first motion trajectory of the target object in the three-dimensional space includes:

[0025] Obtaining a first sub-motion trajectory of the target object to be selected in each frame sequence image in the first plane, a second sub-motion trajectory of the target object to be selected in each frame sequence image in the second plane, and a third sub-motion trajectory of the target object to be selected in each frame sequence image in the third plane;

[0026] Performing fitting processing on the first sub-motion trajectory, the second sub-motion trajectory and the third sub-motion trajectory to obtain a first motion trajectory of the target object to be selected in the three-dimensional space;

[0027] In response to a third screening operation by the user, a first motion trajectory of the target object in the three-dimensional space is determined among the first motion trajectories of the target object to be selected in the three-dimensional space.

[0028] In another possible design of the first aspect, the target object and the scene corresponding to the video to be processed are relatively stationary.

[0029] In yet another possible design of the first aspect, the method further includes: loading the motion trajectory of the virtual camera into a preset running trajectory model to obtain the motion trajectory of an object on a graphical user interface in an application.

[0030] In a second aspect, an embodiment of the present application provides a device for determining a motion trajectory of a virtual camera, comprising: a determination module and a processing module;

[0031] The determination module is used to analyze the video to be processed and determine the target motion trajectory of the target object among the multiple objects, wherein the video to be processed is obtained by shooting the multiple objects with a virtual camera, and the target motion trajectory is the motion trajectory of the target object in the video to be processed;

[0032] The processing module is used to perform reverse deduction processing on the target motion trajectory of the target object to obtain the motion trajectory of the virtual camera, where the motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory.

[0033] In a possible design of the second aspect, the virtual camera motion mode is two-dimensional motion, and the determination module is specifically used to:

[0034] Performing frame conversion processing on the video to be processed to obtain multiple frame images;

[0035] Based on the single target tracking algorithm CSRT, the multiple frames of images are processed in sequence to obtain the positions of the multiple objects in the images of each frame;

[0036] According to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame, the target motion trajectory of the target object in the two-dimensional space is determined.

[0037] In another possible design of the second aspect, the virtual camera motion mode is three-dimensional motion, and the determination module parses the video to be processed, specifically for:

[0038] Processing the video to be processed frame by frame to obtain multiple frame sequence images;

[0039] The plurality of frame sequence images are input into a preset first frame sequence image processing model to obtain a first motion trajectory of the target object in three-dimensional space. The first frame sequence image processing model is used to obtain a position of the object in the frame sequence images.

[0040] In this possible design, the determining module is further used to:

[0041] In response to the user's parameter adjustment operation, the sensitivity parameter and the target object threshold in the first frame sequence image processing model are adjusted to obtain a second frame sequence image processing model, wherein the magnitude of the sensitivity parameter is used to indicate the sensitivity of identifying the object, and the target object threshold is used to indicate the gray value boundary of the preferred target object in each frame sequence image;

[0042] Inputting the plurality of frame sequence images into the second frame sequence image processing model to obtain a second motion trajectory of the target object in three-dimensional space;

[0043] In response to a first screening operation of a user, the target motion trajectory is determined among a first motion trajectory of the target object and a second motion trajectory of the target object.

[0044] Optionally, the determination module determines the target motion trajectory of the target object in the two-dimensional space according to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame, specifically for:

[0045] For each object, a coordinate system is established with the time node corresponding to the first frame image and the position of the object in the first frame image as the origin, with the horizontal axis being time and the vertical axis being position distance;

[0046] Sequentially adding the time nodes corresponding to the respective frame images and the positions of the object in the images of the respective frames to the coordinate system to obtain a third motion trajectory of the object;

[0047] In response to the second screening operation of the user, the third motion trajectory corresponding to the target object is determined in the third motion trajectories of the objects as the target motion trajectory in the two-dimensional space.

[0048] Optionally, the three-dimensional space includes: a first plane, a second plane, and a third plane that are perpendicular to each other, and the determination module obtains a first motion trajectory of the target object in the three-dimensional space, specifically for:

[0049] Obtaining a first sub-motion trajectory of the target object to be selected in each frame sequence image in the first plane, a second sub-motion trajectory of the target object to be selected in each frame sequence image in the second plane, and a third sub-motion trajectory of the target object to be selected in each frame sequence image in the third plane;

[0050] Performing fitting processing on the first sub-motion trajectory, the second sub-motion trajectory and the third sub-motion trajectory to obtain a first motion trajectory of the target object to be selected in the three-dimensional space;

[0051] In response to a third screening operation by the user, a first motion trajectory of the target object in the three-dimensional space is determined among the first motion trajectories of the target object to be selected in the three-dimensional space.

[0052] In another possible design of the second aspect, the target object and the scene corresponding to the video to be processed are relatively stationary.

[0053] In another possible design of the second aspect, the processing module is also used to load the motion trajectory of the virtual camera into a preset running trajectory model to obtain the motion trajectory of the object on the graphical user interface in the application.

[0054] In a third aspect, an embodiment of the present application provides a computer device, including: a processor and a memory;

[0055] The memory stores computer-executable instructions;

[0056] The processor executes the computer-executable instructions, so that the computer device executes the method for determining the motion trajectory of the virtual camera as described in the first aspect and various possible designs above.

[0057] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the method for determining the motion trajectory of a virtual camera as described in the first aspect and various possible designs.

[0058] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for determining the motion trajectory of a virtual camera as described in the first aspect and various possible designs.

[0059] The method, device and computer equipment for determining the motion trajectory of a virtual camera provided in the embodiment of the present application, the method determines the target motion trajectory of a target object among multiple objects by parsing a video to be processed, the video to be processed is obtained by shooting multiple objects with a virtual camera, the target motion trajectory is the motion trajectory of the target object in the video to be processed, and the target motion trajectory of the target object is reversely deduced to obtain the motion trajectory of the virtual camera, the motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory. In this technical solution, starting from the motion of the object in the video, the motion of the virtual camera is reversed, avoiding the errors caused by the prior art relying solely on empirical judgment, and achieving more accurate determination of the motion trajectory of the virtual camera. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0061] Figure 1 A schematic diagram of an application scenario of a method for determining a motion trajectory of a virtual camera provided in an embodiment of the present application;

[0062] Figure 2 A flowchart of a method for determining a motion trajectory of a virtual camera provided in an embodiment of the present application;

[0063] Figure 3 A schematic diagram of a flow chart of a second embodiment of a method for determining a motion trajectory of a virtual camera provided in an embodiment of the present application;

[0064] Figure 4 A flowchart of a third embodiment of a method for determining a motion trajectory of a virtual camera provided in an embodiment of the present application;

[0065] Figure 5 A schematic diagram of a process for determining two-dimensional motion provided in an embodiment of the present application;

[0066] Figure 6 A schematic diagram of a process for determining three-dimensional motion provided in an embodiment of the present application;

[0067] Figure 7 A schematic diagram of the structure of a device for determining a motion trajectory of a virtual camera provided in an embodiment of the present application;

[0068] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present application.

[0069] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0070] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0071] Before introducing the embodiments of the present application, the background technology of the present application is first explained:

[0072] Vision is the fastest and most informative medium for acquiring information, and is one of the main ways for humans to acquire information. Therefore, in the design of computer games, giving players feedback on the screen is not only an important way to interact with players, but also an effective tool to bring players a real experience.

[0073] For example, in first-person shooter games, one of the main ways for players to gain immersion is through screen shaking caused by being hit and screen vibration caused by gun-related operations. The development of related content is currently mainly done by planners adjusting the vibration curve developed by programmers based on experience. However, for different guns and different scenes, each new gun needs to be planned after watching relevant videos to determine the corresponding relationship between the specific screen shaking and gun vibration curve values, and it takes a long time to find a standard balance position.

[0074] In the prior art, the process of lens shaking is qualitatively analyzed, and then the vibration process of the screen is manually defined, such as the maximum deflection point. An average and smooth curve is formed according to the defined points. After the effect is experienced in the game, the maximum value and interval of the vibration are adjusted according to the design to determine the oscillation of the lens.

[0075] However, the current configuration method of screen shake parameters has a cold start problem: at the beginning of the screen shake configuration process, the planner completely relies on past experience to initialize the vibration curve of the virtual camera, and cannot accurately judge the duration and vibration range of related angles, resulting in errors in subsequent processes.

[0076] The relevant reference videos are also manually analyzed, and parameters are matched based on experience or observations. There is no effective way to evaluate whether the virtual camera in the reference content has smooth vibrations, ratchet waves, or other fluctuation patterns.

[0077] Based on the above problems existing in the prior art, Figure 1 The following is a schematic diagram of an application scenario of a method for determining a virtual camera motion trajectory provided in an embodiment of the present application, which is used to solve the above technical problems. Figure 1 As shown, the application scenario diagram includes: a user 11 and a computer device 12.

[0078] In one possible design, user 11 inputs the video to be processed into computer device 12, and computer device 12 processes the video to be processed accordingly, as described in detail in the following embodiments, and then obtains the motion trajectory of the virtual camera for user 11 to refer to and provide information for subsequent game design, etc.

[0079] In response to the above-mentioned technical problems, the inventor's technical conception process of the present application is as follows: In the prior art, the determination of the vibration mode of the virtual camera is mainly based on the experience of users watching relevant videos, and there is a problem of subjective error. If a point that is relatively still with respect to the application scene is determined in the video and the motion trajectory of the point is determined, then the motion trajectory of the virtual camera can be inferred in reverse. On the motion trajectory curve of the virtual camera, the vibration of the virtual camera can be intuitively described, and the errors and other problems existing in the prior art are avoided.

[0080] Below Figure 1 The application scenario schematic diagram shown in the figure describes the technical solution of the present application in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0081] Figure 2 The flowchart of the first embodiment of the method for determining the motion trajectory of a virtual camera provided in the embodiment of the present application is shown in FIG. Figure 2 As shown, the method for determining the motion trajectory of the virtual camera includes the following steps:

[0082] Step 21: Analyze the video to be processed to determine the target motion trajectory of the target object among the multiple objects.

[0083] The video to be processed is obtained by shooting multiple objects with a virtual camera, and the target motion trajectory is the motion trajectory of the target object in the video to be processed.

[0084] In this step, it is first necessary to obtain the video to be processed obtained by shooting multiple objects with a virtual camera, that is, it is necessary to capture the scene information containing the multiple objects.

[0085] Among them, objects may include pedestrians, vehicles, animals, buildings, etc.; the video to be processed may be a red-green-blue (RGB) video image shot by a virtual camera or downloaded from other networks, and may be various animal documentaries, gun battle films, etc.

[0086] Optionally, taking a player playing a shooting game as an example, the vibration of the screen seen by the player is caused by the virtual camera performing corresponding rotation and shaking according to the parameters. At this time, the reference system is the virtual camera. In order to more realistically simulate the rotation and shaking of the virtual camera, the video obtained by the virtual camera is needed as the video to be processed to show the accuracy of the subsequent virtual camera motion trajectory.

[0087] Furthermore, the motion trajectories of multiple objects are determined, and then a better object is determined as the target object among the multiple objects, which can be one or more objects; or multiple objects can be preferentially screened to screen out the target object, and the motion trajectory corresponding to the target object is the target motion trajectory.

[0088] Optionally, the target object and the scene corresponding to the video to be processed are relatively still, that is, when the virtual camera moves, the target object does not move in the scene, ensuring that after the video to be processed is processed to obtain the target motion trajectory of the target object, the motion trajectory of the virtual camera can be obtained more accurately.

[0089] In a possible implementation, taking the virtual camera motion mode as two-dimensional motion as an example, the video to be processed can be split into multiple frames of images, and the target object can be selected for processing to obtain the position of the target object on the image of the corresponding frame, thereby determining the target motion trajectory of the target object in the two-dimensional space.

[0090] In another possible implementation, taking the virtual camera motion mode as three-dimensional motion as an example, the video to be processed can be split into multiple frame sequence images and then input into the frame sequence processing software to obtain the motion trajectory of the object in the three-dimensional space, and then based on the user's selection, the target object and the corresponding position in the frame sequence image can be screened out from the multiple objects, thereby determining the target motion trajectory of the target object in the three-dimensional space.

[0091] Step 22: reversely deduce the target motion trajectory of the target object to obtain the motion trajectory of the virtual camera.

[0092] The motion trajectory of the virtual camera is the reverse motion trajectory of the target motion trajectory.

[0093] In this step, for a two-dimensional image or an image that does not involve the rotation of a virtual camera, the movement of the virtual camera will inevitably cause the captured object to move in the opposite direction while the lens is stable, and according to the perspective principle, the distance that follows the movement of the virtual camera is proportional to the distance of the object from the virtual camera, that is, the pixel displacement size of objects at different distances from the virtual camera may be inconsistent when moving, but the graphs drawn in time for the moving direction and distance of the object under the same virtual camera are similar. Therefore, the movement of the virtual camera can be inferred based on the movement of the object in the video to be processed.

[0094] In a possible implementation, for a two-dimensional plane, taking the above steps to determine a trajectory from the starting point (0, 0) to the end point (3, 6) of the target motion trajectory of the target object as an example, the motion trajectory of the virtual camera is a trajectory from the starting point (0, 0) to the end point (-3, -6).

[0095] Furthermore, for a three-dimensional image, the movement of the virtual camera must be a superposition of three two-dimensional planes (for example, taking the three-dimensional coordinate xyz as an example, it includes the two-dimensional planes at xoy, yoz and xoz). The movement trajectory of the virtual camera can be inversely calculated by the sum of the movement vectors of objects on different planes.

[0096] In a possible implementation, for a three-dimensional plane, taking the target motion trajectory of the target object determined in the above steps as an example, the motion trajectory of the virtual camera is a trajectory from the starting point (0, 0, 0) to the end point (3, 6, 9).

[0097] That is, in the above possible implementation, in the target motion trajectory from the starting point to the end point, by assigning negative signs to the coordinate points that the target motion trajectory passes through, a motion trajectory of the virtual camera can be re-determined.

[0098] After this step, the motion trajectory of the virtual camera can be loaded into a preset running trajectory model to obtain the motion trajectory of the object on the graphical user interface in the application.

[0099] Optionally, in order to simulate the movement of objects on the graphical user interface in the application more realistically, the obtained motion trajectory of the virtual camera needs to be input into a preset running trajectory model to output the motion trajectory of the objects on the graphical user interface.

[0100] The method for determining the motion trajectory of a virtual camera provided in an embodiment of the present application analyzes a video to be processed to determine the target motion trajectory of a target object among multiple objects. The video to be processed is obtained by shooting multiple objects with a virtual camera. The target motion trajectory is the motion trajectory of the target object in the video to be processed. The target motion trajectory of the target object is reversely deduced to obtain the motion trajectory of the virtual camera. The motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory. In this technical solution, starting from the motion of the object in the video, the motion of the virtual camera is reversed, which avoids the errors caused by the prior art relying solely on empirical judgment, and achieves more accurate determination of the motion trajectory of the virtual camera.

[0101] Based on the above embodiments, Figure 3 The flowchart of the second embodiment of the method for determining the motion trajectory of a virtual camera provided in the embodiment of the present application is shown in FIG. Figure 3 As shown, when the virtual camera motion mode is two-dimensional motion, the above step 21 includes the following steps:

[0102] Step 31: Perform frame conversion processing on the video to be processed to obtain multiple frame images.

[0103] In this step, the video to be processed includes: a plurality of single images of minimum units, a frame is a still image, and continuous frames form a video.

[0104] Optionally, the image to be processed is segmented to obtain multiple continuous frames of images. In this step, multiple objects in the first frame of image also need to be marked. It should be understood that each object exists in each frame of image, that is, continuous in time.

[0105] Step 32: Based on the single target tracking algorithm CSRT, multiple frames of images are processed in sequence to obtain the positions of multiple objects in the images of each frame.

[0106] In this step, each frame of the image is processed in sequence according to the corresponding time sequence of the multiple frames of the image. That is, the position of each object in each frame of the image is determined and recorded using the CSRT algorithm, that is, the movement trajectory of each object in each frame of the image in the entire video to be processed is recorded.

[0107] When using the CSRT algorithm to process each frame of the image, the coordinates of the center point of the object can be used as the position of the object to more accurately determine the movement trajectory of the object in the entire video.

[0108] Step 33: Determine the target motion trajectory of the target object in the two-dimensional space according to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame.

[0109] In this step, the positions of each object in each frame of the image are connected in chronological order to obtain the motion trajectory of each object.

[0110] Specifically, this step can be implemented in the following ways:

[0111] Step 1: For each object, take the time node corresponding to the first frame image and the position of the object in the first frame image as the origin, and establish a coordinate system with the horizontal axis as time and the vertical axis as position distance;

[0112] Specifically, a two-dimensional coordinate system is established with the time node as the horizontal axis, the position distance as the vertical axis, the time node corresponding to the first frame image and the position of the center of the object corresponding to the time node as the origin.

[0113] Step 2: Add the time nodes corresponding to each frame image and the position of the object in each frame image to the coordinate system in turn to obtain the third motion trajectory of the object;

[0114] Among them, by adding the positions from the second frame image to the last frame image to the coordinate system in sequence and connecting the points, the third motion trajectory of the object can be obtained. Furthermore, for each object, the third motion trajectories of multiple objects can be obtained here.

[0115] Step 3: In response to the second screening operation of the user, determine the third motion trajectory corresponding to the target object in the third motion trajectories of each object as the target motion trajectory in the two-dimensional space.

[0116] In the above, the third motion trajectories of multiple objects are obtained. However, since some objects do not meet the actual requirements, for example, some objects do not exist in each frame image, and some objects are disturbed, the third motion trajectories corresponding to these objects are removed, and the target motion trajectory corresponding to the target object can be obtained.

[0117] The method for determining the motion trajectory of a virtual camera provided in an embodiment of the present application performs frame conversion processing on a video to be processed to obtain multiple frames of images, and processes the multiple frames of images in sequence based on a single target tracking algorithm CSRT to obtain the positions of multiple objects in the images of each frame, and then determines the target motion trajectory of the target object in two-dimensional space according to the corresponding time nodes of the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame. In this method, starting from the positions of multiple objects in the multiple frames of images, a more accurate determination of the target motion trajectory of the target object in a two-dimensional plane is achieved, thereby improving the accuracy of subsequent trajectory determination of the virtual camera in two-dimensional motion.

[0118] Based on the above embodiments, Figure 4The flowchart of the third embodiment of the method for determining the motion trajectory of a virtual camera provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, when the virtual camera motion mode is three-dimensional motion, the above step 21 includes the following steps:

[0119] Step 41: Process the video to be processed frame by frame to obtain a plurality of frame sequence images.

[0120] In this step, the movement of the virtual camera is inversely calculated by tracking the movement of objects in the scene. Figure 3 The difference is that the motion of the object on each coordinate plane is obtained. At this time, the video to be processed can be processed frame by frame to obtain multiple frame sequence images.

[0121] Step 42: Input the plurality of frame sequence images into a preset first frame sequence image processing model to obtain a first motion trajectory of the target object in three-dimensional space.

[0122] The first frame sequence image processing model is used to obtain the position of the object in the frame sequence image.

[0123] After this step, the method may further include the following steps:

[0124] Step 1: In response to a parameter adjustment operation by a user, a sensitivity parameter and a target object threshold in a first frame sequence image processing model are adjusted to obtain a second frame sequence image processing model;

[0125] The size of the sensitivity parameter is used to indicate the sensitivity of object recognition, and the target object threshold is used to indicate the gray value boundary of the preferred target object in each frame sequence image.

[0126] Optionally, different sensitivity parameters need to be selected in different scenes. For scenes with more details, a smaller feature scale Feature Scale can be selected to track more details (sensitivity to identifying objects) to obtain better tracking points. If the scene is relatively empty and the scene components used for marking are relatively clear, a larger Feature Scale can be selected for tracking to obtain better results.

[0127] Optionally, object tracking is performed on objects with obvious grayscale value contrast in the entire screen, so a certain degree of optimization is required, that is, deleting objects whose movement is inconsistent with the movement of the scene, such as battle UI, components with many repetitions in the scene, and other objects that move themselves.

[0128] In addition, when the video to be processed is masked by the same special effect in the entire screen, specific image channels can be shielded to maximize the difference. For example, if the video to be processed is covered with red blood dance special effects throughout the entire process, the red channel can be removed during processing to ensure that the main special effects in the picture are clearer. Since some components in the scene may not exist all the time, in order to reduce the impact of these objects that appear and disappear from time to time on the scene, parameters can be adjusted to filter pixels in the specified RGB channel.

[0129] Step 2: input the plurality of frame sequence images into a second frame sequence image processing model to obtain a second motion trajectory of the target object in three-dimensional space;

[0130] Optionally, after re-adjusting the sensitivity parameter and the target object threshold, the motion trajectory of the target object in the three-dimensional space is acquired again, that is, the second motion trajectory of the target object in the three-dimensional space.

[0131] Step 3: In response to the first screening operation of the user, determine the target motion trajectory from the first motion trajectory of the target object and the second motion trajectory of the target object.

[0132] The user selects a desired motion trajectory according to the first motion trajectory and the second motion trajectory as the target motion trajectory, and the corresponding object is the target object.

[0133] It should be understood that the number of times the parameter adjustment operation is performed and the above-mentioned actions are re-executed depends on the situation of the obtained motion trajectory, so as to seek a better target motion trajectory.

[0134] Optionally, the three-dimensional space includes: a first plane, a second plane, and a third plane that are perpendicular to each other. The second motion trajectory can be determined in the same manner as the first motion trajectory, and the first motion trajectory can be determined in the following manner, taking the first motion trajectory as an example (the second motion trajectory is the same):

[0135] Step 1: obtaining a first sub-motion trajectory of the target object to be selected in each frame sequence image in the first plane, a second sub-motion trajectory of the target object to be selected in each frame sequence image in the second plane, and a third sub-motion trajectory of the target object to be selected in each frame sequence image in the third plane;

[0136] Step 2: Fitting the first sub-motion trajectory, the second sub-motion trajectory and the third sub-motion trajectory to obtain a first motion trajectory of the target object to be selected in the three-dimensional space;

[0137] Step 3: In response to the user's third screening operation, determine the first motion trajectory of the target object in the three-dimensional space among the first motion trajectories of the target objects to be selected in the three-dimensional space.

[0138] Optionally, the principle of the first motion trajectory of the target object in the three-dimensional space is as described above. Specifically, taking three mutually perpendicular planes of a target object in the first frame sequence image as an example, at the time node corresponding to the first frame sequence image, the position of xoy, the position of xoz, and the position of yoz of the target object can be determined, and by superimposing the three positions by vectors, the corresponding position of the target object in the three-dimensional space in the first frame sequence image can be obtained, thereby calculating the corresponding positions of all target objects in the three-dimensional space in each frame sequence image, and connecting them in the coordinate system can obtain the first motion trajectory of the target object in the three-dimensional space.

[0139] Furthermore, in response to the user's third screening operation, the user deletes the first motion trajectories corresponding to all target objects that do not meet expectations from the first motion trajectories corresponding to the target objects to be selected, thereby obtaining the first motion trajectory of the target object in the three-dimensional space.

[0140] The method for determining the motion trajectory of a virtual camera provided in an embodiment of the present application processes the video to be processed frame by frame to obtain a plurality of frame sequence images, and then inputs the plurality of frame sequence images into a preset first frame sequence image processing model to obtain a first motion trajectory of a target object in three-dimensional space. In this method, the motion trajectory of the target object under different parameters is obtained by adjusting the first frame sequence image processing model, and then the target motion trajectory of the target object that meets the expectation is determined, thereby improving the accuracy of the subsequent trajectory determination of the virtual camera under three-dimensional motion.

[0141] Based on the above embodiments, Figure 5 A schematic diagram of a process for determining two-dimensional motion provided in an embodiment of the present application. Figure 5 As shown, the schematic diagram includes the following steps:

[0142] Step 1: Load the video to be processed;

[0143] Step 2: Read the current frame image of the video to be processed;

[0144] Step 3: Select the object to be tracked.

[0145] Step 4: Determine whether the object exists in the next frame of images. If not, execute step 7; if yes, execute step 5;

[0146] Step 5: Locate the position of the object in the current frame image;

[0147] Step 6: Store the position of the object in the current frame image, return to step 2, and execute the processing of the next frame;

[0148] Step 7: Obtain the change data of the object in the full-frame image;

[0149] Step 8: Draw the object's motion trajectory.

[0150] The method for determining the motion trajectory of a virtual camera provided in an embodiment of the present application loads a video to be processed, reads the current frame image of the video to be processed, selects an object in the scene to be tracked, and determines whether the object exists in the next frame images. If so, the position of the object in the current frame image is located, the position of the object in the current frame image is stored, and the processing of the next frame image is executed. After the position of the object in all consecutive frame images is determined, the change data of the object in the full-frame image is obtained, and the motion trajectory of the object is drawn, thereby realizing the determination of the motion trajectory of the two-dimensional motion of the virtual camera.

[0151] Based on the above embodiments, Figure 6 A schematic diagram of a process for determining three-dimensional motion provided in an embodiment of the present application. Figure 6 As shown, the schematic diagram includes the following steps:

[0152] Step 1: Process the video to be processed frame by frame to obtain a frame sequence image;

[0153] Step 2: Get the object in the video to be processed;

[0154] Step 3: Optimize the object and determine its motion trajectory;

[0155] Step 4: Determine whether the object's motion trajectory is consistent with expectations. If so, execute step 9; if not, execute step 5;

[0156] Step 5: Determine whether the object is iconic. If not, proceed to step 6; if yes, proceed to step 7;

[0157] Step 6: Modify the sensitivity parameters and execute step 2;

[0158] Step 7: Select the appropriate object in the initial frame;

[0159] Step 8: Synchronize the position in the full frame sequence and execute step 2;

[0160] Step 9: Determine the motion trajectory of the virtual camera based on the motion trajectory of the object.

[0161] The method for determining the motion trajectory of a virtual camera provided in an embodiment of the present application processes the video to be processed frame by frame to obtain a frame sequence image, obtains the object in the video to be processed, optimizes the object, determines the motion trajectory of the object, and then determines whether the motion trajectory of the object meets expectations. If it does, the motion trajectory of the virtual camera is determined based on the motion trajectory of the object. If it does not meet the expectations, the object is reselected or the sensitivity parameter is adjusted to obtain the motion trajectory of the object that meets the expectations, and finally the motion trajectory of the virtual camera is obtained.

[0162] Based on the above method embodiment, Figure 7 A schematic diagram of the structure of a device for determining a virtual camera motion trajectory provided in an embodiment of the present application. Figure 7 As shown, the device for determining the motion trajectory of a virtual camera includes: a determination module 71 and a processing module 72;

[0163] A determination module 71 is used to analyze the video to be processed and determine a target motion trajectory of a target object among multiple objects, the video to be processed is obtained by shooting multiple objects with a virtual camera, and the target motion trajectory is a motion trajectory of the target object in the video to be processed;

[0164] The processing module 72 is used to perform reverse deduction processing on the target motion trajectory of the target object to obtain the motion trajectory of the virtual camera. The motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory.

[0165] In a possible design of the embodiment of the present application, the virtual camera motion mode is two-dimensional motion, and the determination module 71 is specifically used for:

[0166] Perform frame conversion processing on the video to be processed to obtain multiple frame images;

[0167] Based on CSRT, multiple frames of images are processed in sequence to obtain the positions of multiple objects in each frame of the image;

[0168] According to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame, the target motion trajectory of the target object in the two-dimensional space is determined.

[0169] In another possible design of the embodiment of the present application, the virtual camera motion mode is three-dimensional motion, and the determination module 71 is further used to:

[0170] Process the video to be processed frame by frame to obtain multiple frame sequence images;

[0171] A plurality of frame sequence images are input into a preset first frame sequence image processing model to obtain a first motion trajectory of a target object in three-dimensional space. The first frame sequence image processing model is used to obtain a position of the object in the frame sequence images.

[0172] In this possible design, the determination module 71 is further used to:

[0173] In response to the user's parameter adjustment operation, the sensitivity parameter and the target object threshold in the first frame sequence image processing model are adjusted to obtain a second frame sequence image processing model, wherein the magnitude of the sensitivity parameter is used to indicate the sensitivity of identifying the object, and the target object threshold is used to indicate the gray value boundary of the preferred target object in each frame sequence image;

[0174] Inputting the plurality of frame sequence images into a second frame sequence image processing model to obtain a second motion trajectory of the target object in three-dimensional space;

[0175] In response to a first screening operation of a user, a target motion trajectory is determined among a first motion trajectory of the target object and a second motion trajectory of the target object.

[0176] Optionally, the determination module 71 determines the target motion trajectory of the target object in the two-dimensional space according to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame, specifically for:

[0177] For each object, a coordinate system is established with the time node corresponding to the first frame image and the position of the object in the first frame image as the origin, with the horizontal axis being time and the vertical axis being position distance;

[0178] Sequentially add the time nodes corresponding to the respective frame images and the positions of the objects in the respective frame images to the coordinate system to obtain a third motion trajectory of the object;

[0179] In response to the second screening operation of the user, the third motion trajectory corresponding to the target object is determined in the third motion trajectories of the various objects as the target motion trajectory in the two-dimensional space.

[0180] Optionally, the three-dimensional space includes: a first plane, a second plane, and a third plane that are perpendicular to each other, and the determination module 71 obtains a first motion trajectory of the target object in the three-dimensional space, specifically for:

[0181] Obtaining a first sub-motion trajectory of the target object to be selected in each frame sequence image in the first plane, a second sub-motion trajectory of the target object to be selected in each frame sequence image in the second plane, and a third sub-motion trajectory of the target object to be selected in each frame sequence image in the third plane;

[0182] Performing fitting processing on the first sub-motion trajectory, the second sub-motion trajectory and the third sub-motion trajectory to obtain a first motion trajectory of the target object to be selected in the three-dimensional space;

[0183] In response to a third screening operation by the user, a first motion trajectory of the target object in the three-dimensional space is determined among the first motion trajectories of the target objects to be selected in the three-dimensional space.

[0184] In another possible design of the embodiment of the present application, the target object and the scene corresponding to the video to be processed are relatively still.

[0185] In another possible design of the embodiment of the present application, the processing module 72 is also used to load the motion trajectory of the virtual camera into a preset running trajectory model to obtain the motion trajectory of the object on the graphical user interface in the application.

[0186] The device for determining the motion trajectory of a virtual camera provided in the embodiment of the present application can be used to execute the technical solution corresponding to the method for determining the motion trajectory of a virtual camera in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0187] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0188] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 8 As shown, the computer device may include: a processor 80 , a memory 81 , and computer program instructions stored in the memory 81 and executable on the processor 80 .

[0189] The processor 80 executes the computer execution instructions stored in the memory 81, so that the processor 80 executes the scheme in the above embodiment. The processor 80 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0190] The memory 81 is connected to the processor 80 via a system bus and completes communication between them. The memory 81 is used to store computer program instructions.

[0191] In a possible implementation, the computer device may further include: a display, the display being used to display a display interface of the computer, specifically the example in the embodiment: a motion trajectory of a virtual camera.

[0192] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0193] The computer device provided in the embodiment of the present application can be used to execute the technical solution corresponding to the method for determining the motion trajectory of the virtual camera in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0194] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the method for determining the motion trajectory of the virtual camera in the above embodiment.

[0195] An embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer device, the computer device executes the technical solution of the method for determining the motion trajectory of a virtual camera in the above embodiment.

[0196] An embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, is used to execute the technical solution of the method for determining the motion trajectory of a virtual camera in the above embodiment.

[0197] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special computer device.

[0198] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for determining a motion trajectory of a virtual camera, characterized in that: include: Parsing the video to be processed to determine a target motion trajectory of a target object among multiple objects, wherein the video to be processed is obtained by shooting the multiple objects with a virtual camera, the target motion trajectory is a motion trajectory of the target object in the video to be processed, and the target object is an object selected from the multiple objects and relatively still in a scene corresponding to the video to be processed; Performing reverse deduction processing on the target motion trajectory of the target object to obtain the motion trajectory of the virtual camera, where the motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory; When the motion mode of the virtual camera is two-dimensional motion, the target motion trajectory of the target object in the two-dimensional space is determined by splitting the video to be processed into multiple frames of images and selecting the target object for processing to obtain the position of the target object on the image of the corresponding frame; When the virtual camera motion mode is three-dimensional motion, the video to be processed is split into multiple frame sequence images and then input into the frame sequence processing software to obtain the motion trajectory of the object in the three-dimensional space. Based on the user's selection, the target object and the corresponding position in the frame sequence image are screened out from the multiple objects to determine the target motion trajectory of the target object in the three-dimensional space.

2. The method according to claim 1, characterized in that The virtual camera motion mode is two-dimensional motion, and the video to be processed is analyzed to determine the target motion trajectory of the target object among the multiple objects, including: Performing frame conversion processing on the video to be processed to obtain multiple frame images; Based on the single target tracking algorithm CSRT, the multiple frames of images are processed in sequence to obtain the positions of the multiple objects in the images of each frame; According to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame, the target motion trajectory of the target object in the two-dimensional space is determined.

3. The method according to claim 1, characterized in that The virtual camera motion mode is three-dimensional motion, and the parsing of the video to be processed includes: Processing the video to be processed frame by frame to obtain multiple frame sequence images; The plurality of frame sequence images are input into a preset first frame sequence image processing model to obtain a first motion trajectory of the target object in three-dimensional space. The first frame sequence image processing model is used to obtain a position of the object in the frame sequence images.

4. The method according to claim 3, characterized in that The method further comprises: In response to the user's parameter adjustment operation, the sensitivity parameter and the target object threshold in the first frame sequence image processing model are adjusted to obtain a second frame sequence image processing model, wherein the magnitude of the sensitivity parameter is used to indicate the sensitivity of identifying the object, and the target object threshold is used to indicate the gray value boundary of the preferred target object in each frame sequence image; Inputting the plurality of frame sequence images into the second frame sequence image processing model to obtain a second motion trajectory of the target object in three-dimensional space; In response to a first screening operation of a user, the target motion trajectory is determined among a first motion trajectory of the target object and a second motion trajectory of the target object.

5. The method according to claim 2, characterized in that: The step of determining the target motion trajectory of the target object in the two-dimensional space according to the time nodes corresponding to the multiple objects in the images of each frame and the positions of the multiple objects in the images of each frame includes: For each object, a coordinate system is established with the time node corresponding to the first frame image and the position of the object in the first frame image as the origin, with the horizontal axis being time and the vertical axis being position distance; Sequentially adding the time nodes corresponding to the respective frame images and the positions of the object in the images of the respective frames to the coordinate system to obtain a third motion trajectory of the object; In response to the second screening operation of the user, the third motion trajectory corresponding to the target object is determined in the third motion trajectories of the objects as the target motion trajectory in the two-dimensional space.

6. The method according to claim 3, characterized in that The three-dimensional space includes: a first plane, a second plane, and a third plane that are perpendicular to each other. Obtaining a first motion trajectory of the target object in the three-dimensional space includes: Obtaining a first sub-motion trajectory of the target object to be selected in each frame sequence image in the first plane, a second sub-motion trajectory of the target object to be selected in each frame sequence image in the second plane, and a third sub-motion trajectory of the target object to be selected in each frame sequence image in the third plane; Performing fitting processing on the first sub-motion trajectory, the second sub-motion trajectory and the third sub-motion trajectory to obtain a first motion trajectory of the target object to be selected in the three-dimensional space; In response to a third screening operation by the user, a first motion trajectory of the target object in the three-dimensional space is determined among the first motion trajectories of the target object to be selected in the three-dimensional space.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: The motion trajectory of the virtual camera is loaded into a preset running trajectory model to obtain the motion trajectory of the object on the graphical user interface in the application.

8. A device for determining a virtual camera motion trajectory, characterized in that: include: Determine modules and process modules; The determination module is used to analyze the video to be processed and determine the target motion trajectory of a target object among multiple objects, wherein the video to be processed is obtained by shooting the multiple objects with a virtual camera, the target motion trajectory is the motion trajectory of the target object in the video to be processed, and the target object is an object selected from the multiple objects and relatively still in the scene corresponding to the video to be processed; The processing module is used to perform reverse deduction processing on the target motion trajectory of the target object to obtain the motion trajectory of the virtual camera, where the motion trajectory of the virtual camera is the reverse running trajectory of the target motion trajectory; When the motion mode of the virtual camera is two-dimensional motion, the target motion trajectory of the target object in the two-dimensional space is determined by splitting the video to be processed into multiple frames of images and selecting the target object for processing to obtain the position of the target object on the image of the corresponding frame; When the virtual camera motion mode is three-dimensional motion, the video to be processed is split into multiple frame sequence images and then input into the frame sequence processing software to obtain the motion trajectory of the object in the three-dimensional space. Based on the user's selection, the target object and the corresponding position in the frame sequence image are screened out from the multiple objects to determine the target motion trajectory of the target object in the three-dimensional space.

9. A computer device comprising: A processor, a memory, and computer program instructions stored in the memory and executable on the processor, wherein the processor implements the method for determining the motion trajectory of a virtual camera as described in any one of claims 1 to 7 when executing the computer program instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method for determining the motion trajectory of a virtual camera as described in any one of claims 1 to 7 above.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it is used to implement the method for determining the motion trajectory of a virtual camera as described in any one of claims 1 to 7 above.

Citation Information

Patent Citations

  • Method for performing gait recognition by adopting three-dimensional reconstruction of monocular vision

    CN102697508A

  • Method and system of reproducing virtual reality dynamically

    CN102929386A

  • Track simulation method and device, terminal equipment and storage medium

    CN112819866A

  • Interface display method and apparatus, electronic device, and computer-readable storage medium

    US20200330868A1

  • Method and device for controlling terminal photographing, and computer readable storage medium

    WO2019061328A1