Video processing method and device, computer device and storage medium
By setting scene parameters in a virtual scene and obtaining stabilization data from a virtual camera, the problem of difficulty in evaluating video stabilization effects is solved, and highly accurate video stabilization effect evaluation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN TCL CORP RES CO LTD
- Filing Date
- 2022-12-27
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to accurately evaluate the effects of video stabilization, especially in the absence of an absolute "true value" for stabilization and camera parameters, making it difficult to objectively analyze the video stabilization effect.
By setting scene parameters in a virtual scene, videos from a virtual camera under both shake-free and shake-prone conditions are acquired. The video stabilization effect is then evaluated using scene stabilization data from the virtual camera in the target virtual scene, including comparative analysis of the virtual camera's pose, rotation angle, field of view, RGB color image, and depth map.
It enables objective and highly accurate evaluation of video stabilization effects, thereby improving the accuracy of video stabilization effect evaluation.
Smart Images

Figure CN118264924B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video stabilization processing technology, and in particular to a video processing method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Video stabilization technology is widely used in today's smart terminal devices, and stabilization effect evaluation refers to the measurement of the difference between the processed result and the subjective expectation. However, due to the difficulty in obtaining an absolute "true value" for stabilization, this problem is difficult to accurately reflect from objective analysis. The theoretical "true value" in video stabilization includes: the ideal uniform motion trajectory of the camera and the camera motion trajectory with added jitter noise, scene depth information, etc. Furthermore, when using sensor data to assist stabilization, camera calibration is also required to obtain camera focal length or field of view parameters. Without these true values, it is difficult to accurately and modularly evaluate the processing results. Summary of the Invention
[0003] This application provides a video processing method, apparatus, computer equipment, and storage medium to obtain more objective virtual scene stabilization data and improve the accuracy of video stabilization effect evaluation.
[0004] In a first aspect, embodiments of this application provide a video processing method, which includes:
[0005] Acquire the first video captured by a virtual camera in the target virtual scene;
[0006] Set scene parameters for the target virtual scene;
[0007] Based on the scene parameters, a second video is obtained by the virtual camera shooting in the target virtual scene;
[0008] The first video and the second video are processed to obtain virtual scene stabilization data of the virtual camera in the target virtual scene.
[0009] Secondly, embodiments of this application provide a video processing apparatus, which includes:
[0010] The first acquisition module is used to acquire the first video captured by the virtual camera in the target virtual scene;
[0011] The settings module is used to set scene parameters for the target virtual scene;
[0012] The second acquisition module is used to acquire a second video captured by the virtual camera in the target virtual scene based on the scene parameters.
[0013] The processing module is used to process the first video and the second video to obtain virtual scene stabilization data of the virtual camera in the target virtual scene.
[0014] Thirdly, embodiments of this application provide a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the video processing method described in the first aspect above.
[0015] Fourthly, embodiments of this application also provide a storage medium storing a computer program that, when executed by a processor, causes the processor to perform the video processing method described in the first aspect.
[0016] This application provides a video processing method, apparatus, computer device, and storage medium. It involves acquiring a first video captured by a virtual camera in a target virtual scene, setting scene parameters for the target virtual scene, acquiring a second video captured by the virtual camera in the target virtual scene based on the scene parameters, and processing the first and second videos to obtain virtual scene stabilization data of the virtual camera in the target virtual scene. This allows for the evaluation of the video stabilization effect of the first and second videos based on the virtual scene stabilization data. Using this method, objective and realistic virtual scene stabilization data can be obtained, thereby enabling the evaluation of video stabilization effect based on the virtual scene stabilization data and improving the accuracy of video stabilization effect evaluation. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic flowchart illustrating a video processing method provided in an embodiment of this application;
[0019] Figure 2 A flowchart illustrating the steps for obtaining a recorded video according to an embodiment of this application;
[0020] Figure 3 A flowchart illustrating the steps for obtaining virtual scene stabilization data according to an embodiment of this application;
[0021] Figure 4 A schematic diagram of an RGB image in virtual scene stabilization data provided in an embodiment of this application;
[0022] Figure 5 A schematic diagram of a depth map in virtual scene stabilization data provided in an embodiment of this application;
[0023] Figure 6 A schematic block diagram of a video processing apparatus provided in an embodiment of this application;
[0024] Figure 7 A schematic block diagram of a computer device provided in an embodiment of this application. Detailed Implementation
[0025] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0027] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0028] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0029] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a video processing method according to an embodiment of this application. The method includes steps S101 to S104.
[0030] S101. Obtain the first video captured by the virtual camera in the target virtual scene.
[0031] The current target virtual scene is a jitter-free target virtual scene.
[0032] In this embodiment, the target virtual scene is a pre-constructed three-dimensional space containing pre-defined scene parameters. The virtual camera is a movable camera within the target virtual scene, primarily used for capturing images of the target virtual scene. Specifically, this embodiment obtains a first video containing scene information from the target virtual scene by controlling the movement and capturing of the virtual camera within the target virtual scene.
[0033] S102. Set scene parameters for the target virtual scene.
[0034] The scene parameters include a first frequency parameter and a second frequency parameter for setting the shaker corresponding to the virtual camera, wherein the first frequency parameter and the second frequency parameter are parameters of different frequencies.
[0035] Optionally, the scene parameters also include the lighting parameters of the target virtual scene. The lighting parameters can be global illumination, sky light source, point light source, or other parameters that can be set in the target virtual scene, which will not be listed here.
[0036] S103. Based on the scene parameters, obtain the second video captured by the virtual camera in the target virtual scene.
[0037] The current target virtual scene is a target virtual scene with jitter.
[0038] Similarly, this embodiment obtains a second video containing scene information from the target virtual scene by controlling the movement and shooting of a virtual camera in the target virtual scene. Unlike the previous embodiment, the target virtual scene in this embodiment is a jittery scene, while the target virtual scene in the previous embodiment is a jitter-free scene.
[0039] S104. Process the first video and the second video to obtain virtual scene stabilization data of the virtual camera in the target virtual scene.
[0040] In this embodiment, the virtual scene stabilization data corresponds to a specific scene. The virtual scene stabilization data will differ depending on the scene and configuration parameter settings. Therefore, when the corresponding virtual scene stabilization data is needed, the corresponding scene needs to be pre-loaded, along with the relevant recording parameters, so that the scene can be adjusted based on the relevant scene parameters in the input recording parameters.
[0041] The virtual scene stabilization data corresponding to a scene includes: the field of view of the virtual camera, motion information, color map and depth map of the shooting scene, etc., and the motion information includes the movement trajectory of the virtual camera and the pose of the virtual camera during shooting.
[0042] For example, the virtual scene can be implemented based on the open-source Unreal Engine 4. When loading a scene using Unreal Engine 4, the corresponding scene can be selected and loaded directly from the Unreal Engine Store. Alternatively, the scene can be created in other 3D production software and then imported into the 3D scene.
[0043] After loading the scene, relevant parameters need to be set, including parameters for the virtual camera and environmental parameters. Environmental parameters include, at a minimum, scene lighting, encompassing global illumination, skylights, and point lights. Once the environmental parameters are set, the target virtual scene is obtained, allowing for subsequent processing to acquire stable virtual scene data.
[0044] In one embodiment, before acquiring the first video captured by the virtual camera in the target virtual scene, the embodiment further includes: calibrating and correcting the virtual camera, and determining the initial pose of the virtual camera. Specifically, virtual camera calibration refers to establishing the relationship between the pixel positions of the camera image and the positions of scene points. Based on the camera imaging model, the parameters of the camera model are solved by the correspondence between the coordinates of feature points in the image and the world coordinates. The model parameters that need to be calibrated for the virtual camera include intrinsic and extrinsic parameters. Virtual camera calibration not only enables the solution of the intrinsic and extrinsic parameters of the virtual camera, but also allows for the correction of the virtual camera to ensure that it can obtain more accurate images and videos.
[0045] The calibration method is not limited; it can be Zhang's calibration, specifically a camera calibration method based on a single-plane checkerboard. During calibration, to ensure the checkerboard fills the screen as much as possible, the scene view needs to be switched to an empty area and the checkerboard placed. Then, the virtual camera pose is adjusted to determine the final effect, i.e., the virtual camera's initial pose. Multiple checkerboard images can be obtained by repeating the above steps to determine the initial pose.
[0046] After loading the experimental scene and inputting the recording parameters, subsequent experiments and tests will be conducted to obtain the stable virtual scene data corresponding to the target virtual scene. Specifically, in response to video recording commands, the virtual camera in the Virtual 4 engine will be controlled to capture and acquire video, and the relevant video recordings will be obtained upon completion of the recording.
[0047] For example, in the Virtual 4 engine, when recording video in the loaded target virtual scene, video is acquired based on the input recording parameters. These parameters include the movement path of the virtual camera during video acquisition (i.e., the movement path of the virtual camera viewport), and the pose information of the virtual camera at different moments during video capture. By controlling the virtual camera to complete the pre-designed movement path according to different poses, the corresponding recorded video is obtained. (Refer to...) Figure 2 , Figure 2 This is a flowchart illustrating the steps for obtaining a recorded video according to an embodiment of this application, wherein the steps include steps S201 to S205.
[0048] Step S201: Determine the preset movement path and the starting pose of the virtual camera.
[0049] The movement path refers to the path along which the virtual camera moves and takes pictures. The pose includes information such as the virtual camera's position and viewing angle to determine the angle of the image captured by the virtual camera.
[0050] In this embodiment, before filming the virtual scene, it is necessary to obtain the recording parameters corresponding to the recording requirements. These recording parameters include the preset movement path and the starting pose of the virtual camera. Based on these recording parameters, the virtual camera can be controlled to film the virtual scene.
[0051] The received recording parameters include scene parameters for setting the scene, as well as parameters for controlling the virtual camera. Therefore, during video recording, it is necessary to identify the information contained in the recording parameters to achieve video recording.
[0052] Specifically, for recording parameters, the movement path and virtual camera pose information contained within the recording parameters are identified. The movement path refers to the movement path of the virtual camera during video recording, while the pose information refers to the virtual camera's pose at certain moments while moving and shooting based on the movement path. The pose information includes coordinate information, angle information, etc. After obtaining the movement path and pose information corresponding to the virtual camera, when determining to start video recording, the virtual camera is controlled to record video according to the obtained movement path and pose information, and the recorded video is obtained when the recording is completed.
[0053] Step S202: Based on the initial pose and the movement path, control the virtual camera to move along the movement path in the target virtual scene to capture video and obtain the first video.
[0054] The current target virtual scene is the virtual scene of the virtual camera under shake-free conditions.
[0055] Step S203: Obtain the first frequency parameter and the second frequency parameter for setting the shaker corresponding to the virtual camera.
[0056] Wherein, the first frequency parameter and the second frequency parameter are parameters of different frequencies.
[0057] Step S204: Configure the jitter based on the first frequency parameter and the second frequency parameter.
[0058] In one embodiment, to simulate the shaking of a real handheld device, a shaker is added to the virtual camera used for video recording. The shaker may include multiple high-frequency shakes and multiple low-frequency shakes. For shakers with higher shake frequencies, a first frequency parameter can be set, such as a smaller shake amplitude. For shakers with lower shake frequencies, a second frequency parameter can be set, such as a larger shake amplitude. This method can effectively simulate the combined effect of stride shaking and hand shake.
[0059] Optionally, the main methods for controlling the virtual camera to capture video include: controlling the virtual camera to capture video based on a timed trigger event. Specifically, the timed trigger event provided in this embodiment is a Tick event. The Tick event is generated in each frame of the game. For example, in a game running at 60 frames per second, the Tick event will be generated 60 times per second.
[0060] Step S205: Based on the initial pose and the movement path, control the virtual camera to move in the target virtual scene under the jittering action of the shaker with the first frequency parameter and the second frequency parameter to perform video acquisition and obtain the second video.
[0061] The current target virtual scene is the virtual scene under the superposition effect of the virtual camera simulating the stride tremor of the hand and the hand tremor, that is, the virtual scene under the condition of the virtual camera shaking.
[0062] When obtaining virtual scene stabilization data, it is necessary to obtain the virtual scene stabilization data corresponding to the presence of shaking, as well as the virtual scene stabilization data corresponding to the absence of shaking. Therefore, when recording video, it is possible to determine whether to set and add shaking parameters to the virtual camera based on the actual video path.
[0063] In particular, when recording video in response to a video recording command, the video recording command can be identified to determine whether the currently received video recording command is a shake-free recording or a shake-based recording, and then determine whether it is necessary to set and adjust the shaker associated with the camera.
[0064] The received recording parameters may include shake parameters for adjusting the camera-associated shaker, namely the first frequency parameter and the second frequency parameter. During actual video recording, it is determined whether to use these parameters based on the specific recording needs. That is, when recording video without shaking, recording proceeds directly; when recording video with shaking, the shaker corresponding to the virtual camera is first adjusted according to the shake parameters included in the recording parameters, and then the video is recorded.
[0065] In addition, the shake parameter can be entered before video recording. That is, it can be entered together with other parameters when recording, or it can be entered by prompting the operator to adjust the shake of the virtual camera according to the actual needs when shake recording is required.
[0066] After acquiring the recorded video, virtual scene stabilization data will be obtained based on the acquired video. Specifically, in response to the command to acquire virtual scene stabilization data, the camera's virtual scene stabilization data in the target virtual scene will be obtained from the acquired recorded video.
[0067] In one embodiment, the virtual scene stabilization data includes the pose, rotation angle, field of view, RGB color image, and depth map of the virtual camera. Specifically, after obtaining the virtual scene stabilization data for both jittery and jitter-free target virtual scenes, the video processing method provided in this embodiment further includes: evaluating the video stabilization effect of the first video and the second video based on the virtual scene stabilization data.
[0068] In this embodiment, the video stabilization effect of the first video and the second video can be evaluated by comparing any one or more data points from the camera pose, rotation angle, field of view, RGB color image, and depth map in the virtual scene stabilization data. For example, if the camera pose rotation angle change curve in the first video is smooth during movement, while the camera pose rotation angle change curve in the second video is jittery, comparing the jitter amplitude of the two curves indicates that the stabilization effect of the first video after jitter removal (i.e., no jitter) is better. As another example, if the RGB color image or depth map in the virtual scene stabilization data corresponding to the first video is clear, while the RGB color image or depth map in the virtual scene stabilization data corresponding to the second video is blurry, comparing the image clarity in the two cases indicates that the stabilization effect of the first video after jitter removal (i.e., no jitter) is better.
[0069] By comparing the pose, rotation angle, field of view, RGB color image, and depth map of the virtual camera in the virtual scene stabilization data, the video stabilization effect of the first video and the second video can be evaluated. This results in an objective and highly accurate evaluation of the video stabilization effect, which facilitates the optimization and adjustment of the pose of the virtual camera in the Virtual 4 engine during subsequent video stabilization adjustments, thereby improving the stabilization effect of video processing.
[0070] Therefore, when obtaining virtual scene stabilization data, by exporting the virtual scene stabilization data in the target virtual scene, we obtain the virtual scene stabilization data with and without jitter in the target virtual scene. (Refer to...) Figure 3 , Figure 3 This is a flowchart illustrating the steps for obtaining virtual scene stabilization data according to an embodiment of the present application, wherein the steps include steps S301 to S303.
[0071] Step S301: Respond to the virtual scene stabilization data acquisition command and determine the acquisition time of the acquired video frame;
[0072] Step S302: Based on the acquisition time, obtain the corresponding video frames from the first video and the second video;
[0073] Step S303: Based on the sequence number identifier of the video frame, obtain the first virtual scene stabilization data associated with the first video and the second virtual scene stabilization data associated with the second video.
[0074] Upon receiving and responding to a command to acquire virtual scene stabilization data, the system acquires data based on the obtained recorded video to obtain the virtual scene stabilization data corresponding to the target virtual scene. Specifically, upon responding to the received command to acquire virtual scene stabilization data, the system determines the acquisition time for video frame capture in the obtained recorded video. Then, based on the acquired acquisition time, video frames are acquired in the first and second videos to obtain several corresponding video frames. Each video frame corresponds to a unique and different acquisition time. Thus, based on the sequence number identifier corresponding to the video frame, the system can obtain the virtual scene stabilization data corresponding to the first and second videos.
[0075] In the Virtual 4 engine, the virtual camera used for video recording is a movable viewport. Video is captured by moving the viewport, and a corresponding recorded video is generated upon completion of recording. During video recording, the first and second videos can be recorded by triggering corresponding Tick events. After obtaining the first and second videos, the associated virtual scene stabilization data can also be obtained based on the Tick events.
[0076] The recorded video is captured by the virtual camera moving according to the set path and pose information. When recording based on Tick events, each video frame recorded at each Tick will have corresponding image and recording information. However, during the video recording process, data is not exported in real time. Instead, the relevant data results are obtained after the video recording is completed to generate virtual scene stabilization data.
[0077] For example, the obtained virtual scene stabilization data includes: camera pose, rotation angle, field of view, RGB color image, and depth map, with a one-to-one correspondence between pose, rotation angle, field of view, RGB color image, and depth map. Furthermore, the obtained virtual scene stabilization data can be recorded and stored independently based on different types, and different data have certain correlations and correspondences. For example, the obtained RGB color image can be recorded as follows: Figure 4 As shown, in Figure 4 It contains several RGB color images, and the depth images corresponding to the RGB color images can be like... Figure 5 As shown, with Figure 4 The images in the text correspond one-to-one.
[0078] In one embodiment, the process of acquiring virtual scene stabilization data can be as follows:
[0079] Step 1: By using code cutting and porting, the logic and functionality of the Unreal Rox-Plus project can be reproduced in any version of Unreal Engine 4. At the same time, the logic control of image storage has been added to ensure that the color image and depth image can be exported with the correct sequence number for easy video generation.
[0080] Step 2, Unreal Camera C++ Function Extension and Implementation: In order to improve the applicability of the logic and minimize code adaptation problems caused by changes in the recording scene, parameter information is received from external sources when setting parameters, such as virtual camera pose parameter setting functions and movement trajectory storage functions.
[0081] Step 3: Customize the Blueprint Encapsulation and Logic Implementation of the Virtual Camera: Implement the recording function through the Tick event triggered every frame; use tags to control the logical state; define a delegate function in the Blueprint to receive the viewport (virtual camera) pose parameters from the external scene. Video recording is completed in the virtual camera's Tick event. Based on externally set control conditions, the virtual camera will be in three working states:
[0082] Step 3.1: The recording event is triggered. In this step, the camera object obtains the pose information of the viewport controller and the pose information with added jitter parameters through a delegate function, frame by frame. In this mode, only the pose values are passed in through the camera object, and the execution process can be completed within 1ms. This is a real-time process.
[0083] Step 3.2: This step is triggered by the end-of-recording event. Each Tick event stores one frame of the original motion trajectory's color image and corresponding depth map. Because this step is time-consuming, the camera object first triggers a global engine pause, then sequentially reads and sets the pose values of the original motion path. The color image and depth map are obtained using the screenshot function. After storage, the pause is canceled. Once the original motion path has been read, the queue is cleared, and the process proceeds to Step 3.3.
[0084] Step 3.3: For each Tick event, store one frame of the jittery movement trajectory in color and the corresponding depth map. Because this step is time-consuming, the camera object first triggers a global engine pause, then sequentially reads and sets the pose values of the jittery movement path. The color image and depth map are obtained using the screenshot function. After storage, the pause is canceled. Once the jittery movement path processing is complete, the queue is cleared. At this point, an external event can be triggered to start recording, proceeding to step 3.1 to restart recording.
[0085] Step 4: Scene Blueprint Implementation: The scene blueprint is responsible for controlling the entire recording operation logic. The scene blueprint implements the specific triggering events for the blueprint recording camera delegate function. Specifically, the bound scene event will be triggered in the virtual camera's Tick event, which is responsible for passing the viewport pose information to the virtual camera. Because the viewport object is only visible within the scene, the camera object cannot access the viewport object. In addition, the scene blueprint also implements related logic triggering events. This invention triggers corresponding events by binding keyboard buttons, such as the camera recording start event, recording end event, and camera queue clearing event.
[0086] In summary, the video processing method provided in this application requires controlling the camera to acquire corresponding data in an experimental scene when obtaining stabilized virtual scene data. Specifically, firstly, a relevant scene, such as an experimental scene, is loaded, and input recording parameters are received. The loaded scene is then adjusted according to the scene parameters in the received recording parameters to obtain the target virtual scene. Then, in response to a video recording command, the camera is controlled to acquire and record video in the target virtual scene according to the movement path and camera pose information in the recording parameters, resulting in a corresponding recorded video. Finally, when obtaining the virtual scene stabilization data of the target virtual scene, the acquired video frames are determined in the recorded video, and the corresponding virtual scene stabilization data is obtained by associating the determined video frames. This method achieves the simulation of a real shake-free environment by setting camera shake parameters in the Virtual 4 engine, thereby obtaining corresponding objective and accurate virtual scene stabilization data. Based on the objective and accurate virtual scene stabilization data, the video stabilization effect can be evaluated, effectively improving the accuracy of the video stabilization effect evaluation.
[0087] This application also provides a video processing apparatus for performing any of the aforementioned video processing methods. Specifically, please refer to... Figure 6 , Figure 6 This is a schematic block diagram of a video processing apparatus provided in an embodiment of this application. The video processing apparatus 600 provided in this embodiment includes:
[0088] The first acquisition module 601 is used to acquire the first video obtained by the virtual camera shooting in the target virtual scene.
[0089] Setting module 602 is used to set scene parameters for the target virtual scene.
[0090] The second acquisition module 603 is used to acquire a second video captured by the virtual camera in the target virtual scene based on the scene parameters.
[0091] The processing module 604 is used to process the first video and the second video to obtain virtual scene stabilization data of the virtual camera in the target virtual scene.
[0092] In specific implementation, the above modules and / or units can be implemented as independent entities, or they can be arbitrarily combined and implemented as the same or several entities. For the specific implementation of the above modules and / or units, please refer to the previous method embodiments. For the specific beneficial effects that can be achieved, please also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.
[0093] Please see Figure 7 , Figure 7 A schematic block diagram of a computer device provided in an embodiment of this application.
[0094] See Figure 7 The computer device 700 includes a processor 702, a memory, and a network interface 707 connected via a system bus 701. The memory may include a non-volatile storage medium 703 and internal memory 704.
[0095] The non-volatile storage medium 703 can store an operating system 7031 and a computer program 7032. When the computer program 7032 is executed, it causes the processor 702 to perform a video processing method.
[0096] The processor 702 provides computing and control capabilities to support the operation of the entire computer device 700.
[0097] The internal memory 704 provides an environment for the execution of the computer program 7032 in the non-volatile storage medium 703. When the computer program 7032 is executed by the processor 702, the processor 702 can perform video processing methods.
[0098] This network interface 707 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 700 to which the present application is applied. The specific computer device 700 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0099] The processor 702 is used to run a computer program 7032 stored in a memory to implement the video processing method provided in this embodiment.
[0100] Those skilled in the art will understand that Figure 7The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 7 The embodiments shown are consistent and will not be repeated here.
[0101] It should be understood that in the embodiments of this application, the processor 702 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0102] In another embodiment of this application, a storage medium is provided. This storage medium may be a non-volatile, computer-readable storage medium. The storage medium stores a computer program, which, when executed by a processor, implements the video processing method provided in this embodiment.
[0103] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0106] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0107] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.
[0108] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A video processing method, characterized in that, The method includes: Acquire the first video captured by a virtual camera in the target virtual scene; Set scene parameters for the target virtual scene; Based on the scene parameters, a second video is obtained by the virtual camera shooting in the target virtual scene; The first video and the second video are processed to obtain virtual scene stabilization data of the virtual camera in the target virtual scene; The step of acquiring the first video captured by the virtual camera in the target virtual scene includes: Determine the preset movement path and the initial pose of the virtual camera; Based on the initial pose and the movement path, the virtual camera is controlled to move in the target virtual scene according to the movement path to capture video and obtain the first video. The scene parameters include a first frequency parameter and a second frequency parameter for setting the shaker corresponding to the virtual camera, wherein the first frequency parameter and the second frequency parameter are parameters of different frequencies; The step of acquiring a second video captured by the virtual camera in the target virtual scene based on the scene parameters includes: The jitter is set based on the first frequency parameter and the second frequency parameter; Based on the initial pose and the movement path, the virtual camera is controlled to move in the target virtual scene under the jittering action of the shaker with the first frequency parameter and the second frequency parameter in order to capture video and obtain a second video. The virtual scene stabilization data includes the field of view of the virtual camera, the movement information of the virtual camera during shooting, and the color map and depth map information of the shooting scene. The method further includes: evaluating the video stabilization effect of the first video and the second video by comparing the field of view of the virtual camera, the movement information of the virtual camera during shooting, and the color map and depth map information of the shooting scene in the first virtual scene stabilization data associated with the first video and the second virtual scene stabilization data associated with the second video.
2. The method according to claim 1, characterized in that, The process of processing the first video and the second video to obtain virtual scene stabilization data of the virtual camera in the target virtual scene includes: Responding to the virtual scene stabilization data acquisition command, determine the acquisition time of the acquired video frames; Based on the acquisition time, corresponding video frames are obtained from the first video and the second video; Based on the sequence number of the video frame, obtain the first virtual scene stabilization data associated with the first video and the second virtual scene stabilization data associated with the second video.
3. The method according to claim 1, characterized in that, The video capture includes: The virtual camera is controlled to capture video based on timed trigger events.
4. A video processing apparatus, characterized in that, The device includes: The first acquisition module is used to acquire the first video captured by the virtual camera in the target virtual scene; The settings module is used to set scene parameters for the target virtual scene; The second acquisition module is used to acquire a second video captured by the virtual camera in the target virtual scene based on the scene parameters. The processing module is used to process the first video and the second video to obtain virtual scene stabilization data of the virtual camera in the target virtual scene; The first acquisition module acquires a first video captured by a virtual camera in a target virtual scene, including: Determine the preset movement path and the initial pose of the virtual camera; Based on the initial pose and the movement path, the virtual camera is controlled to move in the target virtual scene according to the movement path to capture video and obtain the first video. The scene parameters include a first frequency parameter and a second frequency parameter for setting the shaker corresponding to the virtual camera, wherein the first frequency parameter and the second frequency parameter are parameters of different frequencies; The second acquisition module acquires a second video captured by the virtual camera in the target virtual scene based on the scene parameters, including: The jitter is set based on the first frequency parameter and the second frequency parameter; Based on the initial pose and the movement path, the virtual camera is controlled to move in the target virtual scene under the jittering action of the shaker with the first frequency parameter and the second frequency parameter in order to capture video and obtain a second video. The virtual scene stabilization data includes the field of view of the virtual camera, the movement information of the virtual camera during shooting, and the color map and depth map information of the shooting scene. The device is also used to: evaluate the video stabilization effect of the first video and the second video by comparing the field of view of the virtual camera, the movement information of the virtual camera when shooting, and the color map and depth map information of the shooting scene in the first virtual scene stabilization data associated with the first video and the second virtual scene stabilization data associated with the second video.
5. A computer device, characterized in that, The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the video processing method as described in any one of claims 1 to 3.
6. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, causes the processor to perform the video processing method as described in any one of claims 1 to 3.