Video processing method, device, electronic device, storage medium and program product
By identifying and adjusting the motion vector change amount of video clips, the problem of lack of jitter in high frame rate videos and excessive jitter in low frame rate videos is solved, and the effect of improving cinematic sense and clarity is achieved.
Patent Information
- Application Number
- CN202110420219.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-19
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2041-04-19
AI Technical Summary
High-frame-rate videos lack jitter when presenting, resulting in a decrease in cinematic sense, while low-frame-rate videos have too high jitter, affecting clarity.
By identifying video clips that do not meet the target jitter degree, the motion vector change amount of each frame image is calculated, and the frame image is adjusted according to the motion vector of adjacent frames to change the jitter sense.
Improve the jitter feeling of high-frame rate videos, thereby improving the sense of movies; reduce the jitter feeling of low-frame rate videos, and improve clarity.
Smart Images

Figure CN115225899B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to computer technology, and in particular to a video processing method, device, electronic device, storage medium and program product. Background Art
[0002] The higher the frame rate, the more actions are displayed per second, the higher the clarity, and the more realistic the scene. The frame rate here is measured in frames per second (fps). Videos with different frame rates give different visual effects. For example, videos with a frame rate greater than or equal to 24fps can give people a smooth visual effect.
[0003] Taking filming as an example, the most commonly used filming technique is to use a frame rate of 24fps for filming. A 24fps video can present a clearer foreground subject, as well as a blurred and jittery background (referred to as "jittery feeling"). The above visual effect can be called a "movie feeling". With the continuous improvement of filming equipment, a frame rate higher than 24fps (such as 48fps, 120fps) can be used for filming. However, videos with higher frame rates have clearer foregrounds and backgrounds, resulting in less blur and jitter in the picture (i.e., the jitter feeling of the video is poor), which in turn leads to a poorer movie feeling in videos with higher frame rates. Summary of the invention
[0004] The present application provides a video processing method, device, electronic device, storage medium and program product to change the jitter feeling of a video.
[0005] In a first aspect, the present application provides a video processing method, the method comprising:
[0006] Receiving a video to be processed and a target jitter degree of the video;
[0007] Identifying a video segment that does not meet the target jitter degree from the video;
[0008] According to the target jitter degree and the frame rate of the video clip, obtaining a motion vector change amount of each frame image in the video clip;
[0009] Each frame of image is adjusted according to the variation of the motion vector of each frame of image and the motion vector of an adjacent image of each frame of image to obtain an adjusted video segment.
[0010] Optionally, acquiring the motion vector variation of each frame image in the video segment according to the target jitter degree and the frame rate of the video segment includes:
[0011] According to the target jitter degree and the mapping relationship between the target jitter degree and the total change amount of the motion vector per second, obtaining the total change amount of the motion vector per second of the video clip;
[0012] According to the total change amount of the motion vector of the video clip per second and the frame rate of the video clip, the change amount of the motion vector of each frame image in the video clip is obtained.
[0013] Optionally, adjusting each frame image according to a change amount of a motion vector of each frame image and a motion vector of an adjacent image of each frame image includes:
[0014] For an i-th frame image among the frame images, based on the motion vector variation of the i-th frame image and the motion vectors of the adjacent images of the i-th frame image, the motion vector of the i-th frame image is obtained; i is an integer greater than or equal to 1;
[0015] The i-th frame image is adjusted based on the motion vector of the i-th frame image.
[0016] Optionally, the adjusting the i-th frame image includes:
[0017] The preset area of the i-th frame image is adjusted, or the background of the i-th frame image is adjusted.
[0018] Optionally, identifying a video segment that does not meet the target jitter degree from the video includes:
[0019] According to the target frame rate corresponding to the target jitter degree, a video segment having a frame rate that is not equal to the target frame rate is identified from the video.
[0020] Optionally, after obtaining the adjusted video segment, the method further includes:
[0021] Merging the adjusted video clip with a portion of the video other than the video clip to obtain an adjusted video;
[0022] The adjusted video is output.
[0023] In a second aspect, the present application provides a video processing device, the device comprising:
[0024] A receiving module, used for receiving a video to be processed and a target jitter degree of the video;
[0025] An identification module, used to identify video segments that do not meet the target jitter degree from the video;
[0026] A processing module is used to obtain the motion vector change of each frame image in the video clip according to the target jitter degree and the frame rate of the video clip; and adjust each frame image according to the motion vector change of each frame image and the motion vector of the adjacent image of each frame image to obtain an adjusted video clip.
[0027] In a third aspect, the present application provides an electronic device, including: at least one processor and a memory;
[0028] The memory stores computer-executable instructions;
[0029] The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method described in any one of the first aspects.
[0030] In a fourth aspect, the present application provides a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the method described in any one of the first aspects is implemented.
[0031] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in any one of the first aspects when executed by a processor.
[0032] The video processing method, device, electronic device, storage medium and program product provided by the present application, by identifying the video segments in the video to be processed that do not meet the target jitter degree, determine the video segments that need to change the jitter feeling. Then, according to the above-mentioned target jitter degree and the frame rate of the above-mentioned video segment, the motion vector change of each frame image in the video segment is obtained. Then, according to the obtained motion vector change of each frame image and the motion vector of the adjacent image of each frame image, each frame image is adjusted to change the jitter feeling of the above-mentioned frame image. Through the above-mentioned method, it is possible to improve the jitter feeling of videos with higher frame rates, thereby improving the cinematic feeling of videos with higher frame rates. For videos with lower frame rates, it is also possible to reduce the jitter feeling of videos with lower frame rates, thereby improving the clarity of videos with lower frame rates. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0034] Figure 1a Schematic diagram of the effect presented for videos with low frame rates;
[0035] Figure 1b Schematic diagram of the effect presented for videos with higher frame rates;
[0036] Figure 2 A flowchart of a video processing method provided in this application;
[0037] Figure 3 A schematic diagram of the structure of a video processing device provided by the present application;
[0038] Figure 4 A schematic diagram of the structure of an electronic device provided in this application.
[0039] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] When shooting a video, the higher the frame rate (in fps), the more motion the camera captures per second. Therefore, the higher the frame rate of the video, the more motion it shows per second, and the smoother the video. Figure 1a Schematic diagram of the effect of presenting a video with a low frame rate. Figure 1b This is a schematic diagram of the effect of presenting a video with a high frame rate. Figure 1a The frame rate of the video is less than Figure 1b The frame rate of the video. Figure 1a and 1b As shown in , the higher the frame rate of the video, the higher the clarity and the more the picture fits the actual scene.
[0042] Taking filming as an example, the most commonly used filming technique is to use a frame rate of 24fps for filming. Videos shot at a frame rate of 24fps can present a clearer foreground subject, as well as a blurred and jittery background (referred to as "jittery feeling"). The visual effect presented by a 24fps movie is also called a "movie feeling". With the continuous improvement of filming equipment, frame rates higher than 24fps (such as 48fps, 120fps) can be used for filming. However, videos with higher frame rates have clearer foregrounds and backgrounds, resulting in less blur and jitter in the picture (i.e., the jitter feeling of the video is poor), which in turn leads to a poorer movie feeling presented by videos with higher frame rates.
[0043] Therefore, the present application proposes a method for changing the jitter of a video to solve the problem of poor film quality presented by the video. Through this method, jitter can be increased for a video with a higher frame rate, thereby improving the film quality of the video, and jitter can be reduced for a video with a lower frame rate, thereby improving the clarity of the video. In specific implementation, the above method can be executed by an electronic device, which can be, for example, a server, a terminal, or other device with processing functions.
[0044] The technical solution of the present application is described in detail below in conjunction with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0045] Figure 2 A schematic diagram of a video processing method provided in this application. Figure 2 As shown, the method comprises the following steps:
[0046] S101, receiving a video to be processed and a target jitter degree of the video.
[0047] The video to be processed may be shot at at least one frame rate. For example, the video to be processed may be shot at frame rates of 48fps and 128fps, or the video to be processed may be shot at a frame rate of 128fps.
[0048] The target jitter refers to the jitter level that the video to be processed needs to reach. Optionally, the jitter can be represented by a frame rate, or a preset jitter level, etc. Exemplarily, the electronic device can receive a frame rate input by a user as the target jitter of the video. Alternatively, the electronic device can also display multiple jitter level options to the user, and determine the target jitter of the video based on the user's selection result for the jitter level option.
[0049] As a possible implementation manner, the electronic device may receive the video to be processed and the target jitter degree of the video through, for example, an application program interface (API) or a graphical user interface (GUI).
[0050] S102: Identify video segments that do not meet the target jitter degree from the video.
[0051] After receiving the above-mentioned video to be processed and the target jitter degree for the video, as a possible implementation method, the electronic device can determine the target frame rate corresponding to the target jitter degree. Then, according to the target frame rate corresponding to the target jitter degree, a video segment with a frame rate that is not equal to the target frame rate is identified from the video as a video segment that does not meet the target jitter degree. Among them, the video segment with a frame rate that is not equal to the target frame rate can be a video segment with a frame rate greater than the target frame rate, and / or a video segment with a frame rate less than the target frame rate.
[0052] Optionally, the video segment that does not meet the target jitter degree may be a part of the video to be processed. Alternatively, when the entire video to be processed does not meet the target jitter degree, the video segment that does not meet the target jitter degree may be the entire video to be processed.
[0053] For example, assuming that the length of the video to be processed is 10 seconds, the frame rates at different times in the video are shown in Table 1 below:
[0054] Table 1
[0055]
[0056]
[0057] Assuming that the target frame rate corresponding to the target jitter degree is 48fps, the video segments that do not meet the target jitter degree in the video to be processed are 4-6 seconds and 7-10 seconds of the video.
[0058] In another possible implementation, the electronic device may also identify video segments that do not meet the target jitter level from the video based on the user's mark on the video to be processed. Exemplarily, assuming that the user marks the first moment and the second moment of the video, the electronic device may obtain the portion between the first moment and the second moment of the video as the video segment that does not meet the target jitter level.
[0059] It should be understood that the present application does not limit how the electronic device identifies the video segment that does not meet the target jitter degree from the video. The above method is only a possible implementation method proposed by the present application. In specific implementation, the electronic device can also use other methods to identify the video segment that does not meet the target jitter degree from the video.
[0060] S103: Obtain the motion vector variation of each frame image in the video segment according to the target jitter degree and the frame rate of the video segment.
[0061] The motion vector (MV) refers to the relative displacement between the current image block and the "best matching block in the reference image of the current image block".
[0062] As a possible implementation, after identifying a video segment that does not meet the target jitter, the electronic device can obtain the total change of the motion vector per second of the video segment according to the target jitter and the mapping relationship between the target jitter and the total change of the motion vector per second. Optionally, the above mapping relationship can be set by the user offline and pre-stored in the electronic device.
[0063] Then, the electronic device can obtain the change amount of the motion vector of each frame image in the video clip according to the total change amount of the motion vector per second of the video clip and the frame rate of the video clip. Exemplarily, the electronic device can obtain the change amount of the motion vector of each frame image in the video clip by the following formula (1).
[0064] V0=V 总 ÷F (1)
[0065] Among them, V0 represents the change of motion vector of each frame image in the video clip, V 总 It represents the total change of the motion vector of the video clip per second, and F represents the frame rate of the video clip.
[0066] For example, the mapping relationship between the target jitter degree and the total change amount of the motion vector per second may be shown in the following Table 2:
[0067] Table 2
[0068] Serial number Target jitter Total change of motion vector per second 1 Jitter 1 Total change of motion vector 1 2 Jitter 2 Total change of motion vector 2 3 Jitter 3 Total change of motion vector 3 … … …
[0069] In this mapping relationship, optionally, the total change of the motion vector per second may increase as the jitter increases. Alternatively, the total change of the motion vector per second may also decrease as the jitter increases. Exemplarily, assuming that the target jitter of the above video is jitter 1, according to the mapping relationship shown in Table 2, the electronic device can obtain the total change of the motion vector per second of the video clip as the total change of the motion vector 1. Assuming that the frame rate of the video clip is 100fps, according to formula (1), the change of the motion vector of each frame image in the video clip can be obtained as the value of the total change of the motion vector 1 divided by 100.
[0070] As another possible implementation, the electronic device may also obtain the motion vector variation of each frame image in the video segment according to the mapping relationship among the target jitter degree, the frame rate of the video segment, and the motion vector variation of each frame image. Exemplarily, the mapping relationship among the target jitter degree, the frame rate of the video segment, and the motion vector variation of each frame image may be as shown in the following Table 3:
[0071] Table 3
[0072]
[0073] Exemplarily, assuming that the target jitter degree of the above video is jitter degree 2, and the frame rate of the video clip is frame rate 1, according to the mapping relationship shown in Table 3, the electronic device can obtain the motion vector change of each frame image of the video clip as motion vector change 21.
[0074] S104 , adjusting each frame of image according to the variation of the motion vector of each frame of image and the motion vector of an adjacent image of each frame of image to obtain an adjusted video segment.
[0075] Before adjusting each frame image, the electronic device needs to obtain the motion vector of each frame image in the video clip. Taking any frame image in the video clip as an example, as a possible implementation method, for the i-th frame image in each frame image, the electronic device can obtain the motion vector of the i-th frame image based on the motion vector change amount of the i-th frame image and the motion vector of the adjacent image of the i-th frame image. Wherein, i is an integer greater than or equal to 1.
[0076] Exemplarily, for the i-th frame image in each frame image, the electronic device may, for example, obtain the motion vector of the i-th frame image based on the motion vector change of the i-th frame image and the motion vector of the (i-1)-th frame image. If i=1, the motion vector of the first frame image may be pre-set by the user and stored in the electronic device. Alternatively, the electronic device may, for example, also obtain the motion vector of the i-th frame image based on the motion vector change of the i-th frame image and the motion vector of the (i+1)-th frame image. Exemplarily, the above-mentioned step of obtaining the motion vector of the i-th frame image may be implemented, for example, by optical flow method and the like. The specific implementation may refer to the existing implementation method, which will not be described in detail in this application.
[0077] Then, the electronic device can adjust the i-th frame image based on the motion vector of the i-th frame image. Referring to the above method, after adjusting each frame image of the above video segment, an adjusted video segment is obtained.
[0078] In the above implementation, optionally, the electronic device may adjust the preset area of the i-th frame image based on the motion vector of the i-th frame image. The preset area may be preset by a user, for example. It should be understood that the preset areas of each frame image of a video clip may be the same or different. If the preset areas of each frame image of the same video clip are the same, the preset areas of different video clips may be the same or different for different video clips.
[0079] Alternatively, the electronic device may also adjust the background of the i-th frame image based on the motion vector of the i-th frame image. In this implementation, before adjusting the background of the i-th frame image, the electronic device may optionally obtain the background of the i-th frame image by image segmentation or other methods. Then, based on the motion vector of the i-th frame image, the background of the i-th frame image is adjusted.
[0080] Alternatively, the electronic device may further adjust the entire area of the i-th frame image based on the motion vector of the i-th frame image.
[0081] Exemplarily, the electronic device can adjust each frame of image by using a fuzzy inference algorithm. In this implementation, the motion vectors of each frame of image and the adjacent images of each frame of image can be used as inputs of the fuzzy inference algorithm, and the change in the motion vector of each frame of image can be used as a judgment condition of the fuzzy inference algorithm to adjust each frame of image. In specific implementation, how to use the fuzzy inference algorithm to adjust each frame of image can refer to the existing implementation, and this application will not repeat it here.
[0082] In another possible implementation, illustratively, the above method of obtaining the motion vector of each frame image in the video clip and adjusting each frame image can also be implemented by a neural network. For example, each frame image of the video clip can be input into a trained first neural network to obtain the motion vector of each frame image. Then, the change amount of the motion vector of each frame image and the motion vector of the adjacent image of each frame image are used as inputs of the trained second neural network to adjust each frame image.
[0083] Through any of the above implementations, when the frame rate of a video clip is greater than the target frame rate corresponding to the target jitter degree, the electronic device can adjust each frame image of the video clip so that the motion vector of each frame image increases, thereby increasing the jitter feeling of the video clip to improve the film feeling of the video clip. As an example, the effect presented by the video clip before increasing the jitter feeling can be as follows Figure 1b The effect of the video clip presented by adding a sense of shaking to the video clip in the above manner can be, for example, as shown in FIG. Figure 1a As shown. Figure 1a and Figure 1b As shown, Figure 1a The vibration is higher than Figure 1b The sense of shaking.
[0084] When the frame rate of the video clip is less than the target frame rate corresponding to the target jitter degree, the electronic device can adjust each frame image of the video clip in the above manner so that the motion vector of each frame image is reduced, thereby reducing the jitter of the video clip to improve the clarity of the video clip. As an example, the effect of the video clip before reducing the jitter can be as follows: Figure 1a The effect of reducing the jitter of the video clip by the above method can be as follows. Figure 1b As shown. Figure 1a and Figure 1b As shown, Figure 1b The clarity is higher than Figure 1a clarity.
[0085] In this embodiment, by identifying the video segments that do not meet the target jitter degree in the video to be processed, the video segments that need to change the jitter sense are determined. Then, based on the above target jitter degree and the frame rate of the above video segment, the motion vector change of each frame image in the video segment is obtained. Then, based on the acquired motion vector change of each frame image and the motion vector of the adjacent image of each frame image, each frame image is adjusted to change the jitter sense of the above frame image. Through the above method, it is possible to improve the jitter sense of videos with higher frame rates, thereby improving the cinematic sense of videos with higher frame rates. For videos with lower frame rates, it is also possible to reduce the jitter sense of videos with lower frame rates, thereby improving the clarity of videos with lower frame rates.
[0086] As a possible implementation manner, after obtaining the adjusted video segment, the electronic device may further merge the adjusted video segment with the portion of the video to be processed other than the video segment, so as to obtain the adjusted video to be processed.
[0087] For example, still taking the video to be processed shown in the aforementioned Table 1 as an example, assuming that the 1st to 3rd seconds and the 7th to 10th seconds of the video are video segments that do not meet the target jitter degree, the electronic device adjusts each frame image of the video segment to obtain an adjusted video segment A. Then, the electronic device can merge the video segment A with the 4th to 6th seconds of the video in chronological order to obtain the adjusted video to be processed.
[0088] After obtaining the adjusted video to be processed, the electronic device can output the adjusted video for the user to view. Optionally, the electronic device can control the display device to display the adjusted video. Alternatively, the electronic device can also send the adjusted video to other devices for the user using the above device to view.
[0089] Figure 3 This is a schematic diagram of the structure of a video processing device provided by this application. Figure 3 As shown, the device includes: a receiving module 21, an identification module 22, and a processing module 23. Among them,
[0090] The receiving module 21 is used to receive the video to be processed and the target jitter degree of the video.
[0091] The identification module 22 is used to identify video segments that do not meet the target jitter degree from the video.
[0092] The processing module 23 is used to obtain the motion vector change of each frame image in the video clip according to the target jitter degree and the frame rate of the video clip; adjust each frame image according to the motion vector change of each frame image and the motion vector of the adjacent image of each frame image to obtain an adjusted video clip.
[0093] Optionally, the processing module 23 is specifically used to obtain the total change of the motion vector of the video clip per second according to the target jitter degree and the mapping relationship between the target jitter degree and the total change of the motion vector per second; and obtain the motion vector change of each frame image in the video clip according to the total change of the motion vector of the video clip per second and the frame rate of the video clip.
[0094] Optionally, the processing module 23 is specifically configured to obtain, for an i-th frame image among the frames of images, a motion vector of the i-th frame image based on a motion vector variation of the i-th frame image and motion vectors of adjacent images of the i-th frame image; and adjust the i-th frame image based on the motion vector of the i-th frame image, wherein i is an integer greater than or equal to 1.
[0095] Optionally, the processing module 23 is specifically configured to adjust a preset area of the i-th frame image, or adjust a background of the i-th frame image.
[0096] Optionally, the identification module 22 is specifically configured to identify, from the video, a video segment having a frame rate that is not equal to the target frame rate according to the target frame rate corresponding to the target jitter degree.
[0097] Optionally, the processing module 23 is further configured to merge the adjusted video segment with the portion of the video other than the video segment to obtain the adjusted video. In this implementation, the video processing device may further include an output module 24, configured to output the adjusted video.
[0098] The video processing device provided in the present application is used to execute the aforementioned video processing method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0099] Figure 4 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 4 As shown, the electronic device 300 may include: at least one processor 301 and a memory 302 .
[0100] The memory 302 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.
[0101] The memory 302 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0102] The processor 301 is used to execute the computer-executable instructions stored in the memory 302 to implement the video processing method described in the above method embodiment. The processor 301 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0103] Optionally, the electronic device 300 may further include a communication interface 303. In a specific implementation, if the communication interface 303, the memory 302 and the processor 301 are implemented independently, the communication interface 303, the memory 302 and the processor 301 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0104] Optionally, in a specific implementation, if the communication interface 303, the memory 302 and the processor 301 are integrated on a chip, the communication interface 303, the memory 302 and the processor 301 can complete communication through an internal interface.
[0105] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes. Specifically, the computer-readable storage medium stores program instructions, and the program instructions are used for the methods in the above embodiments.
[0106] The present application also provides a program product, which includes an execution instruction, which is stored in a readable storage medium. At least one processor of the electronic device can read the execution instruction from the readable storage medium, and at least one processor executes the execution instruction so that the electronic device implements the video processing method provided by the various embodiments described above.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A video processing method, characterized in that: The method comprises: Receiving a video to be processed and a target jitter degree of the video; Identifying a video segment that does not meet the target jitter degree from the video; According to the target jitter degree and the mapping relationship between the target jitter degree and the total change amount of the motion vector per second, obtaining the total change amount of the motion vector per second of the video clip; According to the total change amount of the motion vector of the video clip per second and the frame rate of the video clip, obtaining the change amount of the motion vector of each frame image in the video clip; Adjusting each frame of image according to a change amount of a motion vector of each frame of image and a motion vector of an adjacent image of each frame of image to obtain an adjusted video segment; The adjusting of each frame image according to the change amount of the motion vector of each frame image and the motion vector of an adjacent image of each frame image comprises: For an i-th frame image among the frame images, based on the motion vector variation of the i-th frame image and the motion vectors of the adjacent images of the i-th frame image, the motion vector of the i-th frame image is obtained; i is an integer greater than or equal to 1; Based on the motion vector of the i-th frame image, a preset area of the i-th frame image is adjusted, or the background of the i-th frame image is adjusted.
2. The method according to claim 1, characterized in that The step of identifying a video segment that does not meet the target jitter degree from the video includes: According to the target frame rate corresponding to the target jitter degree, a video segment having a frame rate that is not equal to the target frame rate is identified from the video.
3. The method according to claim 1, characterized in that After obtaining the adjusted video clip, the method further includes: Merging the adjusted video clip with a portion of the video other than the video clip to obtain an adjusted video; The adjusted video is output.
4. A video processing device, characterized in that: The device comprises: A receiving module, used for receiving a video to be processed and a target jitter degree of the video; An identification module, used to identify video segments that do not meet the target jitter degree from the video; A processing module, configured to obtain the total change amount of the motion vector per second of the video clip according to the target jitter degree and a mapping relationship between the target jitter degree and the total change amount of the motion vector per second; According to the total change amount of the motion vector of the video clip per second and the frame rate of the video clip, the change amount of the motion vector of each frame image in the video clip is obtained; according to the change amount of the motion vector of each frame image and the motion vector of an adjacent image of each frame image, each frame image is adjusted to obtain an adjusted video clip; The processing module is specifically configured to obtain, for an i-th frame image among the frames of images, a motion vector of the i-th frame image based on a motion vector variation of the i-th frame image and motion vectors of adjacent images of the i-th frame image; wherein i is an integer greater than or equal to 1; Based on the motion vector of the i-th frame image, a preset area of the i-th frame image is adjusted, or the background of the i-th frame image is adjusted.
5. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method described in any one of claims 1 to 3 is implemented.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Video frame rate upconversion method and device
CN101616279A
Systems and methods to control judder visibility
CN106063242A