Video processing method, device and storage medium

By only buffering the motion parameter data of the electronic device during the video recording stage and performing anti-shake processing after recording, the problems of large memory usage and high power consumption in the prior art are solved, and video recording with low memory usage and low power consumption are achieved.

CN113747097BActive Publication Date: 2025-08-19BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010411677.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-14
Publication Date
2025-08-19
Estimated Expiration
2040-05-14

AI Technical Summary

Technical Problem

The prior art requires cache image data and gyroscope data for anti-shake processing during video recording, resulting in large memory usage and high power consumption, which increases the heating of electronic devices.

Method used

During the video recording stage, each frame of image data is directly encoded, and data of the motion parameters of the electronic device related to it is obtained to determine the anti-shake processing strategy. Only the motion parameter data is cached, the image data is not cached, and the anti-shake processing is not performed during the recording stage.

Benefits of technology

It reduces the memory usage and power consumption of electronic devices and reduces the heat generated during recording.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113747097B_ABST
    Figure CN113747097B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a video processing method, device and storage medium. The video processing method includes: obtaining image data of the Nth frame image of the video to be recorded, wherein N is a positive integer greater than or equal to 1; encoding the image data of the obtained Nth frame image to obtain the encoded data of the Nth frame image; obtaining parameter data of the motion parameters of the electronic device of x frames related to the Nth frame image according to a preset rule, wherein x is a positive integer greater than or equal to 1; determining the anti-shake processing strategy of the Nth frame image based on the parameter data of the motion parameters of the electronic device of x frames obtained; storing the encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image as a video file of the Nth frame image. The video processing method provided by the present disclosure does not need to cache a corresponding amount of image data during the video recording stage, thereby reducing the memory usage of the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video processing, and in particular to a video processing method, device, and storage medium. Background Art

[0002] In the related art, during the video recording process, the image will be processed according to the shaking situation, so as to reduce the shaking of the video. The anti-shake processing of image data generally uses the gyroscope sensor on the electronic device to obtain the gyroscope data (Gyro data) of the electronic device during the video recording process, and processes the image data of each frame of the video to achieve the purpose of anti-shake. In order to perform anti-shake processing on the video, it is necessary to cache the image data and corresponding Gyro data of the images included in a long video, which takes up a large amount of memory, and the frame image data of the video needs to be anti-shake processed during the video recording, which increases the power consumption and heat generation of the electronic device. Providing a video processing method that occupies a small amount of memory and has low power consumption is an urgent problem to be solved. Summary of the Invention

[0003] To overcome the problems existing in the related art, the present disclosure provides a video processing method, device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, a video processing method is provided, which is applied to an electronic device. The processing method is applied to a video recording process, and the processing method includes:

[0005] Obtain image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1;

[0006] Encoding the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image;

[0007] Acquiring parameter data of motion parameters of the electronic device for x frames related to the Nth frame of image according to a preset rule, where x is a positive integer greater than or equal to 1;

[0008] Determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device;

[0009] The encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image are stored as a video file of the Nth frame image.

[0010] The parameter data of the motion parameters of the electronic device of frames x related to the Nth frame image are obtained in one of the following ways:

[0011] Method 1: continuously acquiring parameter data of motion parameters of the electronic device from frame n to frame n+X-1 corresponding to the images from frame N to frame N+X-1, where X is a positive integer greater than or equal to 1;

[0012] Method 2: Starting from the Nth frame, parameter data of the motion parameters of the electronic device corresponding to X frames of images are acquired at equal time intervals, where X is a positive integer greater than or equal to 1.

[0013] The parameter data of the motion-related parameters of the electronic device may include one or more of the following:

[0014] Parameter data of movement direction parameters, parameter data of movement speed parameters; parameter data of movement mode parameters.

[0015] The step of determining the anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device includes:

[0016] The anti-shake parameter data of the Nth frame of image is determined according to the acquired x frames of parameter data of the motion parameters of the electronic device.

[0017] According to a second aspect of an embodiment of the present disclosure, a video processing method is provided, which is applied to an electronic device. The processing method is applied to a video playback process, and the processing method includes:

[0018] Get the video file of the Nth frame image, where N is a positive integer greater than or equal to 1;

[0019] Obtaining encoded data of the Nth frame of image from the video file of the Nth frame of image;

[0020] Decoding the encoded data of the N-th image frame to obtain image data of the N-th image frame;

[0021] Obtaining an anti-shake processing strategy for the Nth frame image from the Nth frame video file;

[0022] Anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

[0023] The anti-shake processing strategy for obtaining the Nth frame image from the video file of the Nth frame image includes:

[0024] Obtaining anti-shake parameter data of the Nth frame image from the video file of the Nth frame image;

[0025] The performing anti-shake processing on the Nth frame image according to the anti-shake processing strategy of the Nth frame image includes:

[0026] Anti-shake processing is performed on the N-th frame of image according to the anti-shake parameter data of the N-th frame of image.

[0027] According to a third aspect of an embodiment of the present disclosure, a video processing device is provided, wherein the processing device is applied to a video recording process, and the processing device includes:

[0028] A first acquisition module is configured to acquire image data of an Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1;

[0029] an encoding module configured to encode the acquired image data of the Nth frame image to obtain encoded data of the Nth frame image;

[0030] A second acquisition module is configured to acquire parameter data of motion parameters of the electronic device of x frames related to the Nth frame of image according to a preset rule, where x is a positive integer greater than or equal to 1;

[0031] a determination module configured to determine an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of parameter data of the motion parameters of the electronic device;

[0032] The storage module is configured to store the encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image as a video file of the Nth frame image.

[0033] The second acquisition module acquires parameter data of motion parameters of the electronic device in frames x related to the Nth frame image in one of the following ways:

[0034] Method 1: continuously acquiring parameter data of motion parameters of the electronic device from frame n to frame n+X-1 corresponding to the images from frame N to frame N+X-1, where X is a positive integer greater than or equal to 1;

[0035] Method 2: Starting from the Nth frame, parameter data of the motion parameters of the electronic device corresponding to X frames of images are acquired at equal time intervals, where X is a positive integer greater than or equal to 1.

[0036] The parameter data of the motion-related parameters of the electronic device may include one or more of the following:

[0037] Parameter data of movement direction parameters, parameter data of movement speed parameters; parameter data of movement mode parameters.

[0038] Wherein, the determining module is configured to:

[0039] The anti-shake parameter data of the Nth frame of image is determined according to the acquired x frames of parameter data of the motion parameters of the electronic device.

[0040] According to a fourth aspect of an embodiment of the present disclosure, a video processing device is provided, the processing device being applied to a video playback process, the processing device comprising:

[0041] A third acquisition module is configured to acquire a video file of an N-th frame image, where N is a positive integer greater than or equal to 1;

[0042] A fourth acquisition module is configured to acquire the encoded data of the Nth frame of image from the video file of the Nth frame of image;

[0043] a decoding module configured to decode the encoded data of the N-th image frame to obtain image data of the N-th image frame;

[0044] The fourth acquisition module is configured to acquire an anti-shake processing strategy for the Nth frame image from the Nth frame video file;

[0045] The anti-shake processing module is configured to perform anti-shake processing on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

[0046] Wherein, the fourth acquisition module is configured to:

[0047] Obtaining anti-shake parameter data of the Nth frame image from the video file of the Nth frame image;

[0048] The anti-shake processing module is configured to:

[0049] Anti-shake processing is performed on the N-th frame of image according to the anti-shake parameter data of the N-th frame of image.

[0050] According to a fifth aspect of an embodiment of the present disclosure, a video processing apparatus is provided, including:

[0051] processor;

[0052] a memory for storing processor-executable instructions;

[0053] Wherein, the processor is configured to:

[0054] Obtain image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1;

[0055] Encoding the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image;

[0056] Acquiring parameter data of motion parameters of the electronic device for x frames related to the Nth frame of image according to a preset rule, where x is a positive integer greater than or equal to 1;

[0057] Determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device;

[0058] The encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image are stored as a video file of the Nth frame image.

[0059] According to a sixth aspect of an embodiment of the present disclosure, a video processing apparatus is provided, including:

[0060] processor;

[0061] a memory for storing processor-executable instructions;

[0062] Wherein, the processor is configured to:

[0063] Get the video file of the Nth frame image, where N is a positive integer greater than or equal to 1;

[0064] Obtaining encoded data of the Nth frame of image from the video file of the Nth frame of image;

[0065] Decoding the encoded data of the N-th image frame to obtain image data of the N-th image frame;

[0066] Obtaining an anti-shake processing strategy for the Nth frame image from the Nth frame video file;

[0067] Anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

[0068] According to a seventh aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a video processing method, the method comprising:

[0069] Obtain image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1;

[0070] Encoding the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image;

[0071] Acquiring parameter data of motion parameters of the electronic device for x frames related to the Nth frame of image according to a preset rule, where x is a positive integer greater than or equal to 1;

[0072] Determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device;

[0073] The encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image are stored as a video file of the Nth frame image.

[0074] According to an eighth aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a video processing method, the method comprising:

[0075] Get the video file of the Nth frame image, where N is a positive integer greater than or equal to 1;

[0076] Obtaining encoded data of the Nth frame of image from the video file of the Nth frame of image;

[0077] Decoding the encoded data of the N-th image frame to obtain image data of the N-th image frame;

[0078] Obtaining an anti-shake processing strategy for the Nth frame image from the Nth frame video file;

[0079] Anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

[0080] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: In the video processing method provided by the present disclosure, during the video recording phase, only the parameter data of the motion parameters of the electronic device used for anti-shake processing corresponding to each frame of image is cached, and the corresponding amount of image data does not need to be cached, thereby reducing the memory usage of the electronic device. Furthermore, during the video recording phase, the video processing method provided by the present disclosure does not require anti-shake processing for the video to be recorded, thereby reducing the power consumption of the electronic device during the video recording process and reducing the heating state of the electronic product.

[0081] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0083] Figure 1 An example diagram showing a video processing method in the prior art is shown;

[0084] Figure 2 A flowchart of a video processing method according to an exemplary embodiment is shown;

[0085] Figure 3 It shows that Figure 2 In step S13, parameter data of motion parameters of the electronic device of frames x related to the Nth frame are obtained according to a preset rule;

[0086] Figure 4 An exemplary diagram of a video processing method according to an exemplary embodiment is shown;

[0087] Figure 5 It shows that Figure 1 In step S14, a flow chart of a method for determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device;

[0088] Figure 6 A flowchart of a video processing method according to an exemplary embodiment is shown;

[0089] Figure 7 It shows that Figure 6 A flowchart of a method for obtaining an anti-shake processing strategy for the Nth frame image from a video file of the Nth frame image in step S24, and a flowchart of a method for performing anti-shake processing on the Nth frame image according to the anti-shake processing strategy for the Nth frame image in step S25;

[0090] Figure 8 An exemplary diagram of a video processing method according to an exemplary embodiment is shown. Figure 8 The example diagram shown is a method for processing a video during video playback;

[0091] Figure 9 is a block diagram of a video processing device according to an exemplary embodiment;

[0092] Figure 10 is a block diagram of a video processing device according to an exemplary embodiment;

[0093] Figure 11 It is a block diagram of a video processing apparatus according to an exemplary embodiment (general structure of a mobile terminal). DETAILED DESCRIPTION

[0094] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent like or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present invention, as detailed in the appended claims.

[0095] The present disclosure relates to a video processing method. In the related processing method, the video is subjected to anti-shake processing during the video recording stage, such as Figure 1 As shown, Figure 1 An example diagram showing a video processing method in the prior art is shown. Figure 1 The illustrated video stabilization method uses the stabilization processing of the Mth frame of a video as an example, where t represents time, and the frames of the video to be recorded are acquired in chronological order. To perform stabilization processing on the Mth frame of a video, it is necessary to continuously receive image data 101' of Y frames, image data of the Mth frame, image data of the M+1th frame, and so on, up to image data of the M+Y-1th frame. Gyro data 102' corresponding to these consecutive Y frames, Gyro data corresponding to the mth frame, Gyro data corresponding to the m+1th frame, and so on, up to Gyro data corresponding to the m+Y-1th frame, are then acquired. Stabilization processing 201' is performed on the Mth frame based on the Y-frame Gyro data 102' corresponding to the image data of these consecutive Y frames. After stabilization processing, the image data of the Mth frame after stabilization processing is encoded. Then, the image data of the M+1th frame image is subjected to anti-shake processing. Image data 103' of the Y-frame image, image data of the M+1th frame image, image data of the M+2th frame image, and so on are continuously received, and the Y-frame gyro data 104' corresponding to the consecutive Y-frame images, the gyro data corresponding to the m+1th frame image, the gyro data corresponding to the m+2th frame image, and so on are obtained. Based on the gyro data 104' corresponding to the consecutive Y-frame images, the M+1th frame image is subjected to anti-shake processing. After the anti-shake processing, the image data of the M+1th frame image after the anti-shake processing is encoded. This process is repeated to complete the anti-shake processing of the recorded video. Performing anti-shake processing on a video book in the above manner requires storing at least the image data of the Y-frame images of the desired video and the corresponding Y-frame gyro data. This requires a large amount of memory. Furthermore, the anti-shake processing is performed during the video recording process, which increases the power consumption of the electronic device and makes the electronic product prone to overheating.

[0096] The video processing method provided by the present disclosure directly encodes the acquired image data of each frame of the video to be recorded to form the coded data of each frame of the image, acquires the parameter data of the motion parameters of the electronic device used to perform anti-shake processing on each frame of the image, and determines the anti-shake processing strategy for each frame of the image based on the acquired parameter data of the motion parameters of the electronic device used to perform anti-shake processing on each frame of the image. During the video recording stage, the coded data of each frame of the video to be recorded and the corresponding anti-shake processing strategy are stored as a corresponding frame video file. In the video processing method provided by the present disclosure, during the video recording stage, only the parameter data of the motion parameters of the electronic device used to perform anti-shake processing on each frame of the image is cached, and there is no need to cache the corresponding amount of image data, thereby reducing the memory usage of the electronic device. Moreover, the video processing method provided by the present disclosure does not need to perform anti-shake processing on the video to be recorded during the video recording stage, thereby reducing the power consumption of the electronic device during the video recording process and reducing the heating state of the electronic product.

[0097] The embodiment of the present disclosure provides a video processing method. The video processing method is used in an electronic device. Figure 2 A flow chart of a method for processing a video according to an exemplary embodiment is shown. Figure 2 As shown, the processing method is applied to the video recording process, and the video processing method includes the following steps.

[0098] In step S11, image data of the Nth frame of the video to be recorded is obtained, where N is a positive integer greater than or equal to 1;

[0099] In step S12, the acquired image data of the N-th frame image is encoded to obtain encoded data of the N-th frame image;

[0100] In step S13, parameter data of motion parameters of the electronic device of frames x related to the Nth frame is obtained according to a preset rule, where x is a positive integer greater than or equal to 1;

[0101] In step S14, an anti-shake processing strategy for the Nth frame image is determined based on the acquired x frames of motion parameter data of the electronic device;

[0102] In step S15 , the encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image are stored as a video file of the Nth frame image.

[0103] This method is applied to electronic devices, such as mobile phones, PADs, tablet computers, etc. When the electronic device is recording a video, it obtains the image data of the Nth frame image, encodes the image data of the Nth frame image, and obtains the encoded data of the Nth frame image. According to the preset rules, the parameter data of the motion parameters of the x-frame electronic device related to the Nth frame is obtained, and the anti-shake processing strategy of the Nth frame image is determined according to the obtained parameter data of the motion parameters of the x-frame electronic device; the encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image are stored as a video file of the Nth frame image. The motion parameters of the electronic device refer to the motion parameters of the electronic device that affect the video recording during the video recording process. The motion parameters may include any motion parameters that affect the video recording, for example, may include one or more of the following methods: motion direction parameters, motion speed parameters, motion mode parameters. The parameter data of the motion parameters may be gyroscope data, Gyro data.

[0104] The video processing method provided by the present disclosure eliminates the need to cache a corresponding amount of image data during the video recording phase, thereby reducing memory usage in electronic devices. Furthermore, during the video recording phase, there is no need to perform anti-shake processing on the recorded video, thereby reducing power consumption and heating of the electronic device during the video recording process.

[0105] An embodiment of the present disclosure provides a method for processing a video. Figure 3 It shows that Figure 2 In step S13, the parameter data of the motion parameters of the electronic device of the x-th frame related to the N-th frame is obtained according to the preset rule:

[0106] In step S131, parameter data of x frames of motion parameters of the electronic device related to the Nth frame of image is obtained in one of the following ways:

[0107] Method 1: continuously acquiring parameter data of motion parameters of the electronic device from frame n to frame n+X-1 corresponding to the images from frame N to frame N+X-1, where X is a positive integer greater than or equal to 1;

[0108] Method 2: Starting from the Nth frame, parameter data of the motion parameters of the electronic device corresponding to X frames of images are acquired at equal time intervals, where X is a positive integer greater than or equal to 1.

[0109] In method 1, in order to accurately perform anti-shake processing on the Nth frame of image, starting from the Nth frame of image, parameter data of the motion parameters of the electronic device from frames n to frames n+X-1 corresponding to the images from frames N to frames N+X-1 are continuously acquired in chronological order, and the anti-shake processing strategy for the Nth frame of image is determined based on the acquired parameter data of the motion parameters of the electronic device from frames n to frames n+X-1. Where X and x are equal, the parameter data of the motion parameters of the electronic device from frames n to frames n+X-1 are the parameter data of the motion parameters of the electronic device from frames x.

[0110] In method 2, in order to further reduce cached data, on the basis of ensuring that the anti-shake strategy of the Nth frame image can be accurately determined, parameter data of motion parameters of x frames of electronic devices corresponding to X frames of images can be obtained backward in time sequence at equal time intervals, and the anti-shake processing strategy of the Nth frame image can be determined based on the parameter data of motion parameters of the electronic device of the obtained X frames.

[0111] Figure 4 An exemplary diagram of a video processing method according to an exemplary embodiment is shown. Figure 4 The example diagram shown is a method for processing a video during video recording. Figure 4 In the example shown, the parameter data of the motion parameters of the electronic device of x frames related to the Nth frame image are obtained according to the first method. Figure 4 As shown, each time the image data of a frame of image is obtained, the image data is encoded to obtain the encoded data of the frame of image. For example, after obtaining the image data 101 of the Nth frame of image, the image data is video encoded to obtain the encoded data N of the Nth frame of image. Figure 4Numbered 102 in the example. Image data for the N+1th frame is obtained, and video encoding is performed on the image data to obtain encoded data N+1 for the N+1th frame. Similarly, video encoding is performed on each frame of the video to be recorded to obtain encoded data for each frame. To accurately perform anti-shake processing on each frame of the video to be recorded, parameter data for motion-related parameters of the electronic device corresponding to X frames of image data are continuously acquired, starting from the frame, sequentially backward in time t. An anti-shake processing strategy for each frame of image is determined based on the acquired parameter data for the corresponding motion parameters. The encoded data for each frame and the anti-shake processing strategy for each frame of image are stored as a video file for each frame of image. For example, after obtaining image data for the Nth frame of image, the image data for the Nth frame of image is encoded to obtain encoded data N for the Nth frame of image. To accurately perform anti-shake processing on the Nth frame of video, motion parameter data 103 for the electronic device corresponding to frames N to N+X-1th frames of image data are continuously acquired, starting from the Nth frame, sequentially backward in time t. An anti-shake processing strategy for the Nth frame image is determined based on the acquired motion parameter data 103 of the electronic device for frames n through n+X-1. The encoded data N of the Nth frame image and the anti-shake processing strategy for the Nth frame image are stored as a video file for the Nth frame image. After acquiring the image data for the N+1th frame image, the image data for the N+1th frame image is encoded to obtain encoded data N+1 for the N+1th frame image. To accurately perform anti-shake processing on the N+1th frame video, parameter data for the motion parameters of the electronic device for frames n+1 through n+Xth corresponding to frames N+1 through N+Xth are acquired sequentially in time t, starting from the N+1th frame. An anti-shake processing strategy for the N+1th frame image is determined based on the acquired parameter data for the motion parameters of the electronic device for frames n+1 through n+Xth. The encoded data N+1 of the N+1th frame image and the anti-shake processing strategy for the N+1th frame image are stored as a video file for the N+1th frame image. And so on, all the video files to be recorded are obtained.

[0112] The present disclosure provides a video processing method, such as Figure 5 As shown, Figure 5 It shows that Figure 1 In step S14, according to the obtained x frames of motion parameter data of the electronic device, the anti-shake processing strategy of the Nth frame image is determined as shown in the flowchart of the method. Figure 5 As shown, the processing method is applied to the video recording process, and the video processing method includes the following steps:

[0113] In step S141 , anti-shake parameter data of the Nth frame of image is determined based on the acquired x frames of parameter data of motion parameters of the electronic device.

[0114] In the present disclosure, anti-shake parameter data for the Nth frame of image can be determined based on parameter data of motion parameters of an electronic device acquired in x frames, so that each frame of the acquired video can be anti-shake processed based on the anti-shake parameter data. The anti-shake parameter data can include any parameters for anti-shake processing of each frame of the video, such as image data of the Nth frame of image, a cropping area, a rotation angle, image correction parameters, etc.

[0115] The embodiment of the present disclosure provides a video processing method. The video processing method is used in an electronic device. Figure 6 A flow chart of a method for processing a video according to an exemplary embodiment is shown. Figure 6 As shown, the processing method is applied to the video playback process, and the video processing method includes the following steps.

[0116] In step S21, a video file of the Nth frame image is obtained, where N is a positive integer greater than or equal to 1;

[0117] In step S22, the encoded data of the Nth frame image is obtained from the video file of the Nth frame image;

[0118] In step S23, the coded data of the N-th frame image is decoded to obtain the image data of the N-th frame image;

[0119] In step S24, an anti-shake processing strategy for the Nth frame image is obtained from the Nth frame video file;

[0120] In step S25 , anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy for the Nth frame image, so as to obtain the Nth frame image after anti-shake processing.

[0121] During video playback, in the video processing method provided by the present disclosure, a video file of the Nth frame image is obtained, and the encoded data of the Nth frame image is obtained from the video file of the Nth frame image; the encoded data of the Nth frame image is decoded to obtain the image data of the Nth frame image; the anti-shake processing strategy of the Nth frame image is obtained from the video file of the Nth frame image; and the Nth frame image is anti-shake processed according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing. In the video processing method provided by the present disclosure, the anti-shake processing of the video is set in the video playback stage, and there is no need to perform anti-shake processing on each frame image in the recorded video during the video recording stage, thereby reducing the power consumption of the electronic device during the video recording process and reducing the heating state of the electronic product.

[0122] The present disclosure provides a video processing method, such as Figure 7 As shown, Figure 7 It shows that Figure 6In step S24, a flow chart of a method for obtaining an anti-shake processing strategy for the Nth frame image from a video file of the Nth frame image is shown below:

[0123] In step S241 , anti-shake parameter data of the Nth frame of image is obtained from the video file of the Nth frame of image.

[0124] In the present disclosure, anti-shake parameter data for the Nth frame of image can be obtained from a video file of the Nth frame of image. The anti-shake parameter data can include any parameters for anti-shake processing of each frame of the video, for example, image data of the Nth frame of image, a cropping area, a rotation angle, image correction parameters, etc.

[0125] Figure 7 It is also shown that Figure 6 In step S25, a flow chart of a method for performing anti-shake processing on the N-th frame image according to the anti-shake processing strategy of the N-th frame image is shown as follows:

[0126] In step S251 , anti-shake processing is performed on the Nth frame image according to the anti-shake parameter data of the Nth frame image.

[0127] The Nth frame image can be anti-shake processed in any way in the prior art that can perform anti-shake processing based on the anti-shake parameter data of the Nth frame image. For example, the Nth frame image can be anti-shake processed by cropping, rotating, twisting, etc. based on the anti-shake parameter data of the Nth frame image.

[0128] The Nth frame of image after anti-shake processing can be transmitted to the display module for further processing and display.

[0129] Figure 8 An exemplary diagram of a video processing method according to an exemplary embodiment is shown. Figure 8 The example diagram shown is a method for processing a video during video playback. Figure 8In the process, the encoded data of the Nth frame image is obtained from the video file 201 of the Nth frame image and decoded 202 to obtain the image data of the Nth frame image. The Nth frame image corresponding to the obtained image data of the Nth frame image is subjected to anti-shake processing 203 to obtain the Nth frame image after anti-shake processing. The Nth frame image after anti-shake processing can then be transmitted to the display module for further processing and display. The encoded data of the N+1th frame image is obtained from the video file of the N+1th frame image and decoded to obtain the image data of the N+1th frame image. The N+1th frame image corresponding to the obtained image data of the N+1th frame image is subjected to anti-shake processing to obtain the N+1th frame image after anti-shake processing. The N+1th frame image after anti-shake processing can then be transmitted to the display module for further processing and display. In this way, the decoding and anti-shake processing of the image frames of the video in the video playback stage are completed, and the anti-shake image is subsequently processed and displayed, thereby completing the video playback.

[0130] In an exemplary embodiment of the present disclosure, a video processing device is provided. Figure 9 As shown, Figure 9 FIG. 1 is a block diagram of a video processing device according to an exemplary embodiment. Figure 9 The device includes a first acquisition module 901, an encoding module 902, a second acquisition module 903, a determination module 904 and a storage module 905.

[0131] The first acquisition module 901 is configured to acquire image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1;

[0132] The encoding module 902 is configured to encode the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image;

[0133] The second acquisition module 903 is configured to acquire parameter data of motion parameters of the electronic device of frames x related to the Nth frame of image according to a preset rule, where x is a positive integer greater than or equal to 1;

[0134] The determination module 904 is configured to determine an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device;

[0135] The storage module 905 is configured to store the encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image as a video file of the Nth frame image.

[0136] The second acquisition module 903 acquires parameter data of motion parameters of the electronic device in frames x related to the Nth frame image in one of the following ways:

[0137] Method 1: continuously acquiring parameter data of motion parameters of the electronic device from frame n to frame n+X-1 corresponding to the images from frame N to frame N+X-1, where X is a positive integer greater than or equal to 1;

[0138] Method 2: Starting from the Nth frame, parameter data of the motion parameters of the electronic device corresponding to X frames of images are acquired at equal time intervals, where X is a positive integer greater than or equal to 1.

[0139] The parameter data of the motion-related parameters of the electronic device may include one or more of the following:

[0140] Parameter data of movement direction parameters, parameter data of movement speed parameters; parameter data of movement mode parameters.

[0141] The determining module 904 is configured to:

[0142] The anti-shake parameter data of the Nth frame of image is determined according to the acquired x frames of parameter data of the motion parameters of the electronic device.

[0143] In an exemplary embodiment of the present disclosure, a video processing device is provided. Figure 10 As shown, Figure 10 1 is a block diagram of a video processing device according to an exemplary embodiment, wherein the processing device is applied to the video playback process. Figure 10 The device includes a third acquisition module 1001, a fourth acquisition module 1002, an encoding module 1003 and an anti-shake processing module 1004.

[0144] The third acquisition module 1001 is configured to acquire a video file of an N-th frame image, where N is a positive integer greater than or equal to 1;

[0145] The fourth acquisition module 1002 is configured to acquire the encoded data of the Nth frame of image from the video file of the Nth frame of image;

[0146] The decoding module 1003 is configured to decode the encoded data of the N-th image frame to obtain image data of the N-th image frame;

[0147] The fourth acquisition module 1002 is configured to acquire an anti-shake processing strategy for the Nth frame image from the Nth frame video file;

[0148] The anti-shake processing module 1004 is configured to perform anti-shake processing on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

[0149] The fourth acquisition module 1002 is configured to:

[0150] Obtaining anti-shake parameter data of the Nth frame image from the video file of the Nth frame image;

[0151] The anti-shake processing module 1004 is configured to:

[0152] Anti-shake processing is performed on the N-th frame of image according to the anti-shake parameter data of the N-th frame of image.

[0153] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0154] Figure 11 FIG1 is a block diagram of a video processing apparatus 1100 according to an exemplary embodiment. For example, apparatus 1100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0155] Reference Figure 11 , device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input / output (I / O) interface 1112 , a sensor component 1114 , and a communication component 1116 .

[0156] The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1102 may include one or more modules to facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.

[0157] The memory 1104 is configured to store various types of data to support the operation of the device 1100. Examples of such data include instructions for any application or method operating on the device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 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.

[0158] The power component 1106 provides power to the various components of the device 1100. The power component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 1100.

[0159] The multimedia component 1108 includes a screen that provides an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0160] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC) that is configured to receive external audio signals when the device 1100 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1104 or transmitted via the communication component 1116. In some embodiments, the audio component 1110 also includes a speaker for outputting audio signals.

[0161] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.

[0162] Sensor assembly 1114 includes one or more sensors for providing various aspects of the status assessment of device 1100. For example, sensor assembly 1114 can detect the open / closed state of device 1100, the relative positioning of components, such as the display and keypad of device 1100. Sensor assembly 1114 can also detect changes in the position of device 1100 or a component of device 1100, the presence or absence of user contact with device 1100, the orientation or acceleration / deceleration of device 1100, and changes in the temperature of device 1100. Sensor assembly 1114 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1114 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 1114 can also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0163] The communication component 1116 is configured to facilitate wired or wireless communication between the device 1100 and other devices. The device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0164] In an exemplary embodiment, the apparatus 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.

[0165] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by the processor 1120 of the apparatus 1100 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0166] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a video processing method, the method comprising:

[0167] Obtain image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1;

[0168] Encoding the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image;

[0169] Acquiring parameter data of motion parameters of the electronic device for x frames related to the Nth frame of image according to a preset rule, where x is a positive integer greater than or equal to 1;

[0170] Determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device;

[0171] The encoded data of the Nth image and the anti-shake processing strategy of the Nth frame image are stored as a video file of the Nth frame image.

[0172] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to perform a video processing method, the method comprising:

[0173] Get the video file of the Nth frame image, where N is a positive integer greater than or equal to 1;

[0174] Obtaining encoded data of the Nth frame of image from the video file of the Nth frame of image;

[0175] Decoding the encoded data of the N-th image frame to obtain image data of the N-th image frame;

[0176] Obtaining an anti-shake processing strategy for the Nth frame image from the Nth frame video file;

[0177] Anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

[0178] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.

[0179] It should be understood that the present invention is not limited to the exact construction 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 invention is limited only by the appended claims.

Claims

1. A video processing method, applied to an electronic device, characterized in that: The processing method is applied to a video recording process, and the processing method includes: Obtain image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1; Encoding the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image; Obtaining, according to a preset rule, parameter data of motion parameters of the electronic device for x frames associated with the Nth frame of image, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters include gyroscope data; Determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device; storing the encoded data of the N-th frame image and the anti-shake processing strategy of the N-th frame image as a video file of the N-th frame image; During video recording, there is no need to cache image data.

2. The video processing method according to claim 1, characterized in that: Obtain parameter data of the motion parameters of the electronic device of frames x related to the Nth frame image in one of the following ways: Method 1: continuously acquiring parameter data of motion parameters of the electronic device from frame n to frame n+X-1 corresponding to the images from frame N to frame N+X-1, where X is a positive integer greater than or equal to 1; Method 2: Starting from the Nth frame, parameter data of the motion parameters of the electronic device corresponding to X frames of images are acquired at equal time intervals, where X is a positive integer greater than or equal to 1.

3. The video processing method according to claim 1, characterized in that: The parameter data of the motion-related parameters of the electronic device may include one or more of the following: Parameter data of movement direction parameters, parameter data of movement speed parameters; parameter data of movement mode parameters.

4. The video processing method according to claim 1, characterized in that: Determining the anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device includes: The anti-shake parameter data of the Nth frame of image is determined according to the acquired x frames of parameter data of the motion parameters of the electronic device.

5. A video processing method, applied to an electronic device, characterized in that: The processing method is applied to the video playback process, and the processing method includes: Get the video file of the Nth frame image, where N is a positive integer greater than or equal to 1; during the video playback process, it is not necessary to obtain image data; Obtaining encoded data of the Nth frame of image from the video file of the Nth frame of image; Decoding the encoded data of the N-th image frame to obtain image data of the N-th image frame; Obtaining an anti-shake processing strategy for an N-th frame image from the N-th frame video file; determining the anti-shake processing strategy for the N-th frame image based on x-frame acquired parameter data of motion parameters of the electronic device, wherein the x-frame parameter data of the motion parameters of the electronic device are parameter data of x-frame motion parameters of the electronic device associated with the N-th frame image acquired according to a preset rule, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters include gyroscope data; Anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

6. The video processing method according to claim 5, characterized in that: The anti-shake processing strategy for obtaining the Nth frame image from the video file of the Nth frame image includes: Obtaining anti-shake parameter data of the Nth frame image from the video file of the Nth frame image; The performing anti-shake processing on the Nth frame image according to the anti-shake processing strategy of the Nth frame image includes: Anti-shake processing is performed on the N-th frame of image according to the anti-shake parameter data of the N-th frame of image.

7. A video processing device, characterized in that: The processing device is applied to the video recording process, and the processing device includes: A first acquisition module is configured to acquire image data of an Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1; an encoding module configured to encode the acquired image data of the Nth frame image to obtain encoded data of the Nth frame image; a second acquisition module configured to acquire, according to a preset rule, parameter data of motion parameters of x frames of electronic devices associated with the Nth frame of image, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters include gyroscope data; a determination module configured to determine an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of parameter data of the motion parameters of the electronic device; a storage module configured to store the encoded data of the N-th frame image and the anti-shake processing strategy of the N-th frame image as a video file of the N-th frame image; During video recording, there is no need to cache image data.

8. The video processing device according to claim 7, characterized in that: The second acquisition module acquires parameter data of motion parameters of the electronic device of frames x related to the Nth frame image in one of the following ways: Method 1: continuously acquiring parameter data of motion parameters of the electronic device from frame n to frame n+X-1 corresponding to the images from frame N to frame N+X-1, where X is a positive integer greater than or equal to 1; Method 2: Starting from the Nth frame, parameter data of the motion parameters of the electronic device corresponding to X frames of images are acquired at equal time intervals, where X is a positive integer greater than or equal to 1.

9. The video processing device according to claim 7, characterized in that: The parameter data of the motion-related parameters of the electronic device may include one or more of the following: Parameter data of movement direction parameters, parameter data of movement speed parameters; parameter data of movement mode parameters.

10. The video processing device according to claim 7, characterized in that: The determining module is configured to: The anti-shake parameter data of the Nth frame of image is determined according to the acquired x frames of parameter data of the motion parameters of the electronic device.

11. A video processing device, characterized in that: The processing device is applied to the video playback process, and the processing device includes: A third acquisition module is configured to acquire a video file of an N-th frame image, where N is a positive integer greater than or equal to 1; during the video playback process, it is not necessary to acquire image data; A fourth acquisition module is configured to acquire the encoded data of the Nth frame of image from the video file of the Nth frame of image; a decoding module configured to decode the encoded data of the N-th image frame to obtain image data of the N-th image frame; The fourth acquisition module is configured to acquire an anti-shake processing strategy for an N-th frame image from the N-th frame video file; the anti-shake processing strategy for the N-th frame image is determined based on x frames of acquired parameter data of motion parameters of the electronic device, wherein the x-frames of parameter data of the motion parameters of the electronic device are x frames of parameter data of motion parameters of the electronic device associated with the N-th frame image acquired according to a preset rule, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters include gyroscope data; The anti-shake processing module is configured to perform anti-shake processing on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

12. The video processing device according to claim 11, characterized in that: The fourth acquisition module is configured to: Obtaining anti-shake parameter data of the Nth frame image from the video file of the Nth frame image; The anti-shake processing module is configured to: Anti-shake processing is performed on the N-th frame of image according to the anti-shake parameter data of the N-th frame of image.

13. A video processing device, characterized in that: include: processor; memory for storing processor-executable instructions; Wherein, the processor is configured to: Obtain image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1; Encoding the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image; Obtaining, according to a preset rule, parameter data of motion parameters of an electronic device for x frames associated with the Nth frame of image, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters includes gyroscope data; Determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device; storing the encoded data of the N-th frame image and the anti-shake processing strategy of the N-th frame image as a video file of the N-th frame image; During video recording, there is no need to cache image data.

14. A video processing device, characterized in that: include: processor; memory for storing processor-executable instructions; Wherein, the processor is configured to: Get the video file of the Nth frame image, where N is a positive integer greater than or equal to 1; during the video playback process, it is not necessary to obtain image data; Obtaining encoded data of the Nth frame of image from the video file of the Nth frame of image; Decoding the encoded data of the N-th image frame to obtain image data of the N-th image frame; Obtaining an anti-shake processing strategy for the Nth frame image from the Nth frame video file; the anti-shake processing strategy for the Nth frame image is determined based on x frames of acquired parameter data of motion parameters of the electronic device, wherein the x frames of parameter data of the motion parameters of the electronic device are x frames of parameter data of motion parameters of the electronic device associated with the Nth frame image acquired according to a preset rule, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters include gyroscope data; Anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

15. A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a video processing method, the method comprising: Obtain image data of the Nth frame of the video to be recorded, where N is a positive integer greater than or equal to 1; Encoding the acquired image data of the N-th frame image to obtain encoded data of the N-th frame image; Obtaining, according to a preset rule, parameter data of motion parameters of an electronic device for x frames associated with the Nth frame of image, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters includes gyroscope data; Determining an anti-shake processing strategy for the Nth frame of image based on the acquired x frames of motion parameter data of the electronic device; storing the encoded data of the N-th frame image and the anti-shake processing strategy of the N-th frame image as a video file of the N-th frame image; During video recording, there is no need to cache image data.

16. A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to perform a video processing method, the method comprising: Get the video file of the Nth frame image, where N is a positive integer greater than or equal to 1; During video playback, there is no need to obtain image data; Obtaining encoded data of the Nth frame of image from the video file of the Nth frame of image; Decoding the encoded data of the N-th image frame to obtain image data of the N-th image frame; Obtaining an anti-shake processing strategy for the Nth frame image from the Nth frame video file; The anti-shake processing strategy for the Nth frame image is determined based on x frames of acquired parameter data of motion parameters of the electronic device, wherein the x frames of parameter data of the motion parameters of the electronic device are x frames of parameter data of motion parameters of the electronic device associated with the Nth frame image acquired according to a preset rule, where x is a positive integer greater than or equal to 1; the motion parameters of the electronic device refer to motion parameters of the electronic device that affect video recording during video recording; the parameter data of the motion parameters include gyroscope data; Anti-shake processing is performed on the Nth frame image according to the anti-shake processing strategy of the Nth frame image to obtain the Nth frame image after anti-shake processing.

Citation Information

Patent Citations

  • Video anti-shake method and device for electronic equipment and electronic equipment

    CN110049246A

  • Anti-jitter processing method and device for video data, electronic equipment and storage medium

    CN110366003A