Video processing method and device

By analyzing and adjusting the movement speed of objects in mobile phone video, the problem of poor video playback effect caused by object motion imbalance in the existing technology is solved, and a more coordinated video playback effect is achieved.

CN116156250BActive Publication Date: 2024-09-13VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310149440.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-09-13
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

In the existing mobile phone video recording technology, the fast and slow motion functions can only accelerate or decelerate the movement of objects in the entire video, causing the objects to move too fast or too slow, resulting in poor video playback effects.

Method used

By analyzing the movement speed of objects in the original video, select objects that meet the target conditions as reference objects, and adjust the number of image frames according to the movement speeds of the reference object and the target object to generate the target video so that the number of image frames of the target object is consistent with that of the reference object. Movement speed matching.

Benefits of technology

It improves the video playback effect, avoids the problem of video effect deterioration caused by object movement imbalance, and makes the movement speed of each object more coordinated.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116156250B
    Figure CN116156250B
Patent Text Reader

Abstract

The present application discloses a video processing method and a device thereof, belonging to the field of video technology. The embodiment of the present application provides a video processing method, the method comprising: determining the movement speed of each object in the original video based on multiple image frames included in the original video; determining the object whose movement speed meets the target condition among the objects as the reference object; adjusting the number of image frames included in the original video according to the movement speed of the reference object and the movement speed of the target object, and obtaining the image frames corresponding to the target object; wherein the target object is any object among the objects except the reference object, and the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object; generating the target video according to the multiple image frames and the image frames corresponding to each of the target objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of video technology, and specifically relates to a video processing method and a device thereof. Background Art

[0002] As the functions of mobile phone cameras become more and more abundant, the scenarios in which users use mobile phones to record videos are gradually increasing. Mobile phone recording functions include fast-motion recording and slow-motion recording, which can accelerate or decelerate the subject to be photographed.

[0003] The fast-motion recording or slow-motion recording function in the prior art can only accelerate all movements or decelerate all movements, which causes fast-moving objects in fast-motion to move faster, and slow-moving objects in slow-motion to move slower. However, in a video recorded by a single fast-motion recording or slow-motion recording function, there may be objects moving too fast or too slow, and the imbalance of objects moving too fast or too slow will cause the video playback effect to deteriorate. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a video processing method and device thereof, which can solve the problem of poor video playback effect caused by unbalanced object motion in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a video processing method, the method comprising:

[0006] Determine the movement speed of each object in the original video based on a plurality of image frames included in the original video;

[0007] Determine the object whose moving speed meets the target condition among the objects as the reference object;

[0008] According to the movement speed of the reference object and the movement speed of the target object, the number of image frames included in the original video is adjusted to obtain image frames corresponding to the target object; wherein the target object is any object among the objects except the reference object, and the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object;

[0009] A target video is generated according to the multiple image frames and the image frames corresponding to the target objects.

[0010] In a second aspect, an embodiment of the present application provides a video processing device, the device comprising:

[0011] A first determination module, configured to determine a motion speed of each object in the original video based on a plurality of image frames included in the original video;

[0012] A second determination module is used to determine the object whose movement speed meets the target condition among the objects as a reference object;

[0013] an adjustment module, configured to adjust the number of image frames included in the original video according to the movement speed of the reference object and the movement speed of the target object, so as to obtain image frames corresponding to the target object; the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object;

[0014] A generating module is used to generate a target video according to the multiple image frames and the image frames corresponding to the target objects.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the video processing method described in the first aspect are implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the video processing method described in the first aspect are implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the video processing method described in the first aspect.

[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the video processing method as described in the first aspect.

[0019] In an embodiment of the present application, the movement speed of each object in the original video is determined based on a plurality of image frames included in the original video; an object whose movement speed meets the target condition among the objects is determined as a reference object; according to the movement speed of the reference object and the movement speed of the target object, the number of image frames included in the original video is adjusted to obtain image frames corresponding to the target object; wherein the target object is any object among the objects except the reference object, and the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object; and a target video is generated based on the plurality of image frames and the image frames corresponding to each of the target objects. In this way, an object whose movement speed meets the target conditions is used as a reference object, and the reference object is used as a benchmark. Based on the movement speed of the reference object and the movement speed of the target object itself, image frames corresponding to the target object are obtained, so that the number of image frames contained in the image frames corresponding to each target object matches the movement speed of the reference object and the movement speed of each target object. Therefore, a target video is generated based on multiple image frames and image frames corresponding to each target object. The number of image frames corresponding to any target object in the target video can also match the movement speed of the reference object and the movement speed of the target object, so that the movement speeds of each object in the target video are more coordinated, and thus the problem of poor video effect caused by motion disorder can be avoided to a certain extent, thereby improving the video playback effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic diagram of the steps of a video processing method according to an embodiment of the present application;

[0021] Figure 2 is a schematic diagram of the steps of another video processing method according to an embodiment of the present application;

[0022] Figure 3 is a structural schematic diagram of a video processing device according to an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of the structure of another electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0026] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0027] The video processing method provided in the embodiment of the present application is described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0028] The present application embodiment provides a video processing method, such as Figure 1 As shown, the video processing method includes:

[0029] Step S1, determining the movement speed of each object in the original video based on a plurality of image frames included in the original video.

[0030] It should be noted that video recording is to use a camera to shoot a frame of image at a fixed interval, for example, to shoot a frame of image at an interval of 1 / 30 second, that is, to shoot 30 frames of image per second, to obtain multiple image frames. Then, the multiple image frames shot are packaged and compressed to generate a video file. By decompressing the video file, multiple image frames used to generate the video file can be obtained.

[0031] In an embodiment of the present application, the original video may be a video file captured by a mobile terminal such as a mobile phone or a tablet, or a camera or other photographing device. The multiple image frames included in the original video may be obtained by decompressing the original video into frames of images, thereby obtaining the multiple image frames included in the original video. Among them, the multiple image frames may be arranged in a certain order, and the arrangement order of the multiple image frames may be the shooting order of the multiple image frames in the original video. The objects in the original video may be objects displayed in the picture content of the multiple image frames, for example, the sun, trees, pedestrians, etc.

[0032] In the embodiment of the present application, the motion trajectory of each object in multiple image frames can be obtained according to the change of the position of each object in multiple image frames in the original video, and the motion time of each object in multiple image frames can be determined according to the shooting interval time of multiple image frames, and then the motion speed of each object can be calculated according to the motion trajectory and motion time of each object, and finally the motion speed of each object in the original video can be determined. Among them, the motion trajectory of any object can be specifically calculated according to the change of the coordinate position of the object in multiple image frames, and the motion time of the object in multiple image frames can be calculated according to the frame rate of the original video or the shooting interval time of multiple image frames. Of course, other methods can also be used to obtain the motion trajectory and motion time of the object, and the embodiment of the present application does not limit this.

[0033] Step S2: determine the object whose movement speed meets the target condition among the objects as the reference object.

[0034] In the embodiment of the present application, the target condition may be that the difference between the moving speed of the object and the reference speed is a preset value. The preset value may be zero or a fixed value, and the embodiment of the present application does not limit this. The reference speed may be the arithmetic mean corresponding to the moving speed of each object. Alternatively, the reference speed may also be the weighted average corresponding to the moving speed of each object. Specifically, the weight corresponding to any object may be set according to actual needs, and a weighted average may be calculated according to the moving speed of each object and the weight corresponding to each object, and the weighted average may be used as the reference speed.

[0035] For example, the sun moves slowly and pedestrians move quickly. The weight corresponding to the sun can be set to 10, and the weight corresponding to the pedestrian can be set to 1. This can reduce the impact of the speed of extremely fast or slow objects on the reference speed.

[0036] It should be noted that if the number of objects that meet the target conditions is greater than or equal to 2, the movement speed of the reference object can be determined based on the movement speeds of all objects that meet the target conditions. Specifically, the average speed corresponding to the movement speeds of all objects that meet the target conditions can be calculated, and the average speed can be used as the movement speed of the reference object.

[0037] Optionally, the target condition may also be that the absolute value of the difference between the object's movement speed and the reference speed is the smallest. In the embodiment of the present application, the object with the smallest absolute value of the difference between the movement speed of each object and the reference speed may be used as the reference object. The movement speed of the reference object refers to the movement speed of the object with the smallest absolute value of the difference.

[0038] Step S3, adjusting the number of image frames contained in the original video according to the movement speed of the reference object and the movement speed of the target object, to obtain image frames corresponding to the target object; wherein the target object is any object among the objects except the reference object, and the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object.

[0039] In an embodiment of the present application, for any target object other than the reference object among the objects, the difference between the movement speed of the reference object and the movement speed of the target object can be calculated based on the movement speed of the reference object and the movement speed of the target object. If the difference is positive, indicating that the reference object moves slower than the target object, the number of image frames included in the multiple image frames can be proportionally reduced according to the proportional relationship between the movement speed of the reference object and the movement speed of the target object, and the reduced multiple image frames are used as the image frames corresponding to the target object. If the difference is negative, indicating that the reference object moves faster than the target object, the number of image frames included in the multiple image frames can be proportionally increased according to the proportional relationship between the movement speed of the reference object and the movement speed of the target object, and the increased multiple image frames are used as the image frames corresponding to the target object.

[0040] In the embodiment of the present application, the number of image frames corresponding to the target object can be the number of image frames remaining after the number of image frames included in the multiple image frames is proportionally reduced, or the number of all image frames after the number of image frames included in the multiple image frames is proportionally increased. Therefore, the number of image frames corresponding to the target object matches the proportional relationship between the movement speed of the reference object and the movement speed of the target object, so that the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object.

[0041] The image frames corresponding to the target object may be Z image frames arranged in a certain order, where Z is a positive integer, and the arrangement order of the Z image frames may be determined according to the shooting order of the multiple image frames. Specifically, the number of the multiple image frames is defined as M, and if M>Z, the arrangement order of the Z image frames may be consistent with the arrangement order of the image frames corresponding to the Z image frames in the multiple image frames, and if M<Z, the arrangement order of the Z image frames may be determined according to the arrangement order of the multiple image frames and the number of image frames that are proportionally increased to the multiple image frames.

[0042] Step S4, generating a target video according to the multiple image frames and the image frames corresponding to the target objects.

[0043] In the embodiment of the present application, for any image frame corresponding to a target object, the image frame corresponding to the target object can be matched with multiple image frames in their respective arrangement order, and then the one-to-one corresponding image frames are fused to obtain a new image frame, and the obtained new image frame is used as the latest image frame corresponding to the target object. Among them, the sub-image of the target object in the image frame corresponding to the target object can be obtained by cutting out, and then the image part at the corresponding position in the one-to-one corresponding image frame is replaced according to the sub-image of the target object, so that the one-to-one corresponding image frames are fused to obtain a new image.

[0044] In an embodiment of the present application, the image frames corresponding to each target object can be fused into multiple image frames in sequence. Specifically, the sub-image contained in the image frame corresponding to the first target object can be fused into multiple image frames by cutting out and replacing, so as to obtain multiple image frames after the initial fusion. Then, the sub-image contained in the image frame corresponding to the second target object is fused into the multiple image frames after the initial fusion by cutting out and replacing, so as to sequentially fuse the image frames corresponding to each target object into multiple image frames, so as to obtain multiple image frames that completely fuse the image frames corresponding to each target object. Finally, a video file is compressed and generated based on the multiple image frames after all fusion using video compression software as the target video.

[0045] In an embodiment of the present application, the movement speed of each object in the original video is determined based on a plurality of image frames included in the original video; an object whose movement speed meets the target condition among the objects is determined as a reference object; according to the movement speed of the reference object and the movement speed of the target object, the number of image frames included in the original video is adjusted to obtain image frames corresponding to the target object; wherein the target object is any object among the objects except the reference object, and the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object; and a target video is generated based on the plurality of image frames and the image frames corresponding to each of the target objects. In this way, an object whose movement speed meets the target conditions is used as a reference object, and the reference object is used as a benchmark. Based on the movement speed of the reference object and the movement speed of the target object itself, image frames corresponding to the target object are obtained, so that the number of image frames contained in the image frames corresponding to each target object matches the movement speed of the reference object and the movement speed of each target object. Therefore, a target video is generated based on multiple image frames and image frames corresponding to each target object. The number of image frames corresponding to any target object in the target video can also match the movement speed of the reference object and the movement speed of the target object, so that the movement speeds of each object in the target video are more coordinated, and thus the problem of poor video effect caused by motion disorder can be avoided to a certain extent, thereby improving the video playback effect.

[0046] Optionally, step S3 may include the following steps:

[0047] Step S31, when the moving speed of the target object is less than the moving speed of the reference object, the multiple image frames are subjected to frame extraction processing according to the moving speed of the reference object and the moving speed of the target object to obtain image frames corresponding to the target object.

[0048] In an embodiment of the present application, the difference between the movement speed of the reference object and the movement speed of the target object can be calculated based on the movement speed of the reference object and the movement speed of the target object. If the difference is positive, it means that the movement speed of the target object is less than the movement speed of the reference object, indicating that the target object moves slower than the reference object.

[0049] In the embodiment of the present application, when the moving speed of the target object is less than the moving speed of the reference object, the moving speed ratio of the reference object to the target object is calculated according to the moving speed of the reference object and the moving speed of the target object, wherein the moving speed ratio is a value greater than 1. Frames can be extracted from multiple image frames according to the actual value of the moving speed ratio, and then the extracted images are arranged in the corresponding order in the multiple image frames as the image frames corresponding to the target object. The actual value of the moving speed ratio can be rounded and the integer part can be used as the number of extracted frames.

[0050] Step S32, when the moving speed of the target object is not less than the moving speed of the reference object, interpolate the multiple image frames according to the moving speed of the reference object and the moving speed of the target object to obtain image frames corresponding to the target object.

[0051] In an embodiment of the present application, the difference between the movement speed of the reference object and the movement speed of the target object can be calculated based on the movement speed of the reference object and the movement speed of the target object. If the difference is zero or negative, it means that the movement speed of the target object is not less than the movement speed of the reference object, indicating that the target object moves at the same speed as the reference object or faster than the reference object.

[0052] In the embodiment of the present application, when the moving speed of the target object is not less than the moving speed of the reference object, the moving speed ratio of the target object to the reference object is calculated according to the moving speed of the reference object and the moving speed of the target object, wherein the moving speed ratio is a value greater than or equal to 1. Multiple image frames can be interpolated according to the actual value of the moving speed ratio, and the image frames used for interpolation can be obtained by copying the image frames before or after the interpolation position, and then the multiple image frames after interpolation are used as the image frames corresponding to the target object. Among them, the actual value of the moving speed ratio can be rounded and the integer part can be used as the number of interpolated frames.

[0053] In the embodiment of the present application, when the moving speed of the target object is less than the moving speed of the reference object, the multiple image frames are subjected to frame extraction processing according to the moving speed of the reference object and the moving speed of the target object to obtain the image frame corresponding to the target object;

[0054] In the case where the moving speed of the target object is not less than the moving speed of the reference object, the multiple image frames are interpolated according to the moving speed of the reference object and the moving speed of the object to obtain the image frames corresponding to the target object. In this way, it is convenient to distinguish the target object whose moving speed is less than the reference object or the target object whose moving speed is not less than the reference object according to the moving speed of the reference object. By performing frame extraction on multiple image frames to obtain the image frames corresponding to the target object whose moving speed is less than the reference object, the moving speed displayed by the target object in the corresponding image frame can be accelerated. And by performing frame interpolation on multiple image frames to obtain the image frames corresponding to the target object whose moving speed is not less than the reference object, the moving speed displayed by the target object in the corresponding image frame can be slowed down. To a certain extent, the moving speed of the target object that moves faster than the reference object is slowed down, and the moving speed of the target object that moves slower than the reference object is accelerated, so as to avoid the moving speed of a single object being too fast or too slow, thereby making the moving speed of each object more coordinated.

[0055] Optionally, step S31 may include the following steps:

[0056] Step S311, determining a frame extraction ratio according to the movement speed of the reference object and the movement speed of the target object.

[0057] In the embodiment of the present application, the ratio of the movement speed of the reference object to the movement speed of the target object can be determined according to the movement speed of the reference object and the movement speed of the target object, and the movement speed ratio is used as the frame extraction ratio. Specifically, refer to the following formula (1):

[0058]

[0059] Among them, r i represents the frame extraction ratio corresponding to the i-th object among all objects, v0 represents the movement speed of the reference object, and v i represents the moving speed of the ith object. Wherein, the calculation result of formula (1) retains the integer part.

[0060] Step S312: extract an image frame from the multiple image frames according to the frame extraction ratio as a first target image frame.

[0061] In the embodiment of the present application, the plurality of image frames may be divided into a plurality of groups according to the frame extraction ratio, and the first image frame of each group may be extracted as the first target image frame, that is, according to the frame extraction ratio r i From multiple image frames, each r i An image frame is extracted from the image frames, and the extracted image frame is then used as the first target image frame.

[0062] Step S313: compose an image frame corresponding to the target object according to the first target image frame.

[0063] In the embodiment of the present application, the first target image frames may be arranged in the extraction order, and the arranged first target image frames may be used as image frames corresponding to the target object.

[0064] In the embodiment of the present application, the frame extraction ratio is determined according to the motion speed of the reference object and the motion speed of the target object; an image frame is extracted from the multiple image frames according to the frame extraction ratio as the first target image frame; and the image frame corresponding to the target object is composed according to the first target image frame. In this way, the multiple image frames can be conveniently processed according to the frame extraction ratio, thereby improving the efficiency of the frame extraction processing, and the image frame corresponding to the target object can be conveniently obtained according to the extracted first target image frame, thereby improving the efficiency of obtaining the image frame corresponding to the target object.

[0065] Optionally, step S32 may include the following steps:

[0066] Step S321 : determining an interpolation ratio according to the movement speed of the reference object and the movement speed of the target object.

[0067] In the embodiment of the present application, the motion speed ratio of the target object to the reference object can be determined according to the motion speed of the reference object and the motion speed of the target object, and the motion speed ratio can be used as the interpolation ratio.

[0068] Step S322 : acquiring an image frame from the multiple image frames according to the interpolation ratio as a second target image frame.

[0069] In the embodiment of the present application, the plurality of image frames may be divided into a plurality of groups according to the interpolation ratio, and the first image frame of each group may be copied as the second target image frame, that is, according to the interpolation ratio x i From multiple image frames, each x i The method further comprises the step of duplicating an image frame from a plurality of image frames, and then using the duplicated image frame as a second target image frame.

[0070] Step S323: inserting the second target image frame into the multiple image frames, and composing an image frame corresponding to the target object according to the multiple image frames after the second target image frame is inserted.

[0071] In the embodiment of the present application, the second target image frame can be sequentially inserted into the multiple image frames according to the corresponding copy positions in the multiple image frames, and the multiple image frames after the insertion are used as the image frames corresponding to the target object. Specifically, for any second target image frame, according to the corresponding copy position of the second target image frame in the multiple image frames, the second target image frame can be inserted in front of or behind the image frame corresponding to the copy position, so that the second target image frame is inserted into the multiple image frames. This is only an example, and the embodiment of the present application is not limited to this.

[0072] In the embodiment of the present application, the interpolation ratio is determined according to the motion speed of the reference object and the motion speed of the target object; an image frame is obtained from the multiple image frames according to the interpolation ratio as the second target image frame; the second target image frame is inserted into the multiple image frames, and the image frame corresponding to the target object is composed according to the multiple image frames after the second target image frame is inserted. In this way, multiple image frames can be conveniently interpolated according to the interpolation ratio to improve the efficiency of interpolation processing, and the image frame corresponding to the target object can be conveniently obtained according to the obtained second target image frame, thereby improving the efficiency of obtaining the image frame corresponding to the target object.

[0073] Optionally, step S1 may include the following steps:

[0074] Step S11, obtaining image coordinate information of each object in a plurality of image frames included in the original video.

[0075] In an embodiment of the present application, the image frames can be divided into regions according to the positions of the objects in the multiple image frames included in the original video, each region contains only one object, and the objects in each region are marked with identifiers. For example, multiple image frames contain the sun, trees, pedestrians, etc., and object A, object B, and object C can be used as the corresponding identifiers of the sun, trees, and pedestrians, respectively, to mark the sun, trees, and pedestrians, respectively.

[0076] In an embodiment of the present application, each image frame in a plurality of image frames can be coordinateized. Specifically, the lower left corner of the image frame can be used as the coordinate origin, and a coordinate system can be constructed with two sides adjacent to the coordinate origin of the image frame as coordinate axes. For each object on any image frame, the coordinates of the center position of the object in the coordinate system corresponding to the image frame can be obtained according to the position of the object in the image frame, as the image coordinates of the object on the image frame. Accordingly, for any object, the image coordinates of the object in the coordinate systems corresponding to each of the plurality of image frames are obtained respectively to form the image coordinate information corresponding to the object, thereby obtaining the image coordinate information of each object in the plurality of image frames included in the original video. For example, for object A, the coordinates (Ax i ,Ayi ), and according to the image coordinates (Ax i ,Ay i ) generates the image coordinate information matrix corresponding to object A, as shown in the following matrix (2):

[0077]

[0078] Among them, matrix A represents the image coordinate information matrix corresponding to object A, Ax1 represents the x coordinate of object A in the first image frame, Ay1 represents the y coordinate of object A in the first image frame, and so on. n represents the x coordinate of object A in the nth image frame, Ay n Indicates the y coordinate of object A in the nth image frame. This is only an example, and the embodiment of the present application does not limit this.

[0079] Step S12, calculating the speed of each object corresponding to each image frame in the multiple image frames according to the image coordinate information of each object, the frame rate of the original video and the multiple image frames.

[0080] In the embodiment of the present application, the multiple image frames can be numbered according to the shooting order of the multiple image frames to obtain the frame numbers of the multiple image frames, such as f1, f2, f3, etc. The speed of each object in each image frame can be calculated according to the frame numbers of the multiple image frames, the image coordinate information of each object and the frame rate of the original video. Specifically, for any object among the objects, the following formula (3) can be used:

[0081]

[0082] Among them, fps is the number of frames transmitted per second (Frames Per Second, fps), which represents the frame rate of the original video. x1 represents the x-coordinate of the center point of the object in the previous image frame, x2 represents the x-coordinate of the center point of the object in the next image frame, y1 represents the y-coordinate of the center point of the object in the previous image frame, y2 represents the y-coordinate of the center point of the object in the next image frame, f1 represents the frame number of the previous image frame, and f2 represents the frame number of the next image frame. For example, for object A, the speed v1 of object A in the first frame and the speed v2 of object A in the second frame can be calculated by formula (3), and then v3, v4, ... v n .

[0083] Step S13, determining the movement speed of each object according to the speed of each object corresponding to each image frame.

[0084] In the embodiment of the present application, the average speed of each object can be calculated according to the speed of each object corresponding to each image frame, and the average speed of each object is used as the speed of each object. Specifically, for any object among the objects, the following formula (4) can be used:

[0085]

[0086] Among them, v i represents the speed of the object corresponding to the i-th image frame, and N represents the number of image frames of the plurality of image frames. For example, referring to formula (4), the average speed V corresponding to object A can be calculated: A , and V A As the moving speed of object A.

[0087] In an embodiment of the present application, the image coordinate information of each object in the multiple image frames included in the original video is obtained; the speed of each object corresponding to each image frame in the multiple image frames is calculated according to the image coordinate information of each object, the frame rate of the original video and the multiple image frames; the movement speed of each object is determined according to the speed of each object corresponding to each image frame. In this way, the image coordinate information of each object can be obtained, and the speed of each object corresponding to each image frame can be conveniently calculated according to the image coordinate information, the frame rate of the original video and the multiple image frames, so that the movement speed of each object in the multiple image frames can be conveniently determined according to the speed of each object corresponding to each image frame.

[0088] Optionally, step S2 may include the following steps:

[0089] Step S21, determining a reference speed according to the movement speed of each object and a preset weight.

[0090] In an embodiment of the present application, the preset weight corresponding to any object can be determined based on the speed of the object relative to other objects. For example, the sun moves very slowly relative to pedestrians. If the preset weight corresponding to pedestrians is 1, the preset weight corresponding to the sun can be set to 10. This can reduce the impact of the speed of extremely fast or extremely slow objects on the reference speed value.

[0091] In the embodiment of the present application, the movement speed corresponding to any object can be multiplied by a preset weight, and then the product of the movement speed corresponding to each object and the preset weight is summed and averaged to obtain a weighted average of the movement speeds of each object, and the weighted average is used as a reference speed. Specifically, refer to the following formula (5) and formula (6):

[0092]

[0093]

[0094] Among them, V t represents the reference speed, v i represents the motion speed corresponding to the i-th object, a i represents the preset weight corresponding to the i-th object, and N represents the total number of objects.

[0095] Step S22: Determine the object whose absolute value of the difference between the moving speed and the reference speed is the smallest among the objects as the reference object.

[0096] In the embodiment of the present application, the difference between the moving speed of each object and the reference speed is calculated to obtain the difference between the moving speed of each object and the reference speed, and the object corresponding to the difference with the smallest absolute value is selected as the reference object according to the difference between the moving speed of each object and the reference speed. A -V t | is the smallest, then object A is selected as the reference object.

[0097] In the embodiment of the present application, the reference speed is determined according to the movement speed of each object and the preset weight; the object with the smallest absolute value of the difference between the movement speed and the reference speed among the objects is determined as the reference object. In this way, the influence of the movement speed of each object on the reference speed can be adjusted by the size of the preset weight, so that the reference speed is more coordinated with the movement speed of each object. Further, according to the absolute value of the difference between the reference speed and the movement speed of each object, a reference object is selected from each object. Since the reference speed is coordinated with the movement speed of each object after adjustment by the preset weight, the object with the smallest absolute value of the difference between the movement speed and the reference speed among the objects is determined as the reference object, so that the reference object has more reference value.

[0098] Optionally, step S4 may include the following steps:

[0099] Step S41 : for any of the target objects, obtaining a sub-image and image coordinates of the target object according to an image frame corresponding to the target object.

[0100] In an embodiment of the present application, for any target object, according to the image frames corresponding to the target object, the image portions containing the target object in each image frame are cut out, the image portions obtained by cutout are used as sub-images of the target object, and the coordinates of the center position of the cutout image portions are used as image coordinates of the target object, thereby obtaining the sub-images and image coordinates of the target object corresponding to each image frame in the image frames corresponding to the target object.

[0101] Step S42, determining the target coordinates in the multiple image frames that match the image coordinates based on the image coordinates of the target object, and updating the sub-image corresponding to the target coordinates in the multiple image frames to the sub-image of the target object, to obtain the latest image frame corresponding to the target object; wherein the latest image frame includes the updated multiple image frames.

[0102] In an embodiment of the present application, for any image frame corresponding to a target object, the image frame corresponding to the target object can be matched one by one with multiple image frames in their respective arrangement order. For any image frame in the image frames corresponding to the target object, the coordinates consistent with the image coordinates of the target object in the image frame can be determined according to the image coordinates of the target object in the image frame, and the coordinates consistent with the image coordinates are used as the target coordinates corresponding to the image frame. In the same way, the target coordinates that match the image coordinates in multiple image frames are determined according to the image coordinates of the target object corresponding to each image frame.

[0103] In an embodiment of the present application, for an image frame corresponding to any target object, the image frame corresponding to the target object can be corresponded one-to-one with multiple image frames in their respective arrangement orders. For any image frame among the multiple image frames, positioning can be performed according to the target coordinates corresponding to the image frame, and the sub-image at the position corresponding to the target coordinates is determined as the sub-image that needs to be updated. Then, the sub-image at the image coordinates corresponding to the target object corresponding to the target coordinates is determined as the sub-image to be updated, and the sub-image to be updated is replaced by the sub-image to be updated, so that the sub-image corresponding to the target coordinates in the image frame is updated to the sub-image corresponding to the target object. Finally, the sub-images corresponding to the target coordinates in the multiple image frames are respectively updated to the sub-images corresponding to the target object in the same manner, and the updated multiple image frames are used as the latest image frames corresponding to the target object.

[0104] Step S43: generating the target video according to the latest image frame corresponding to each of the target objects.

[0105] In the embodiment of the present application, after obtaining the latest image frame corresponding to the first target object, the latest image frame of the first target object can be used as the reference image frame of the second target object, and the target coordinates matching the image coordinates in the reference image frame are determined according to the image coordinates of the second target object, and the sub-image corresponding to the target coordinates in the reference image frame is updated to the sub-image corresponding to the second target object, so as to obtain the latest image frame corresponding to the second target object. By analogy, the latest image frame of the last object in each object is finally obtained, and a video file is generated by compressing the image in the latest image frame using video compression software as the target video. For example, the latest image frame of a pedestrian is used as the reference image frame, and the target coordinates matching the image coordinates in the reference image frame are determined according to the image coordinates of the sun, and the sub-image corresponding to the target coordinates in the reference image frame is updated to the sub-image corresponding to the sun, so as to obtain the latest image frame corresponding to the sun. Since the movement speed of the sun is accelerated after the frame extraction process, the latest image frame can obtain the effect of a fast-moving sun in the sky and a slowly walking pedestrian on the ground.

[0106] In an embodiment of the present application, for any of the target objects, according to the image frame corresponding to the target object, the sub-image and image coordinates of the target object are obtained; according to the image coordinates of the target object, the target coordinates matching the image coordinates in the multiple image frames are determined, and the sub-image corresponding to the target coordinates in the multiple image frames is updated to the sub-image of the target object, so as to obtain the latest image frame corresponding to the target object; wherein the latest image frame includes the updated multiple image frames; and the target video is generated according to the latest image frame corresponding to each of the target objects. In this way, the sub-image corresponding to the target coordinates in the multiple image frames can be conveniently updated by the sub-image and image coordinates corresponding to each target object, so that the sub-image of each target object in the multiple image frames matches the image frame corresponding to each target object. Moreover, since the latest image frame includes the updated multiple image frames, the target video is generated according to the latest image frame corresponding to each target object, so that the sub-image of each target object in the target video also matches the image frame corresponding to each target object, so that the movement speed of each object in the target video is more coordinated, and thus the problem of poor video effect caused by motion disorder can be avoided to a certain extent, thereby improving the video playback effect.

[0107] Optionally, before step S43, the method further includes:

[0108] Step S5, according to the target number, cropping the latest image frames corresponding to each of the target objects to obtain the cropped latest image frames corresponding to each of the target objects; wherein the number of image frames contained in the cropped latest image frames matches the target number, the target number is the number of image frames contained in the image frames corresponding to the benchmark object, and the benchmark object is the target object with the smallest number of image frames contained in the image frames corresponding to each of the target objects.

[0109] In the embodiment of the present application, since the number of image frames contained in the latest image frame corresponding to each target object is processed by frame extraction or frame insertion, the number of image frames contained in each latest image frame is different. The frame extraction process makes the number of image frames contained in the corresponding latest image frame smaller relative to the multiple image frames, and the frame insertion process makes the number of image frames contained in the corresponding latest image frame larger relative to the multiple image frames.

[0110] In an embodiment of the present application, the target object with the least number of image frames contained in the latest image frame corresponding to each target object can be used as the reference object, and the number of image frames contained in the latest image frame corresponding to the reference object can be used as the target number. Then, according to the target number, the number of image frames contained in the latest image frame corresponding to each target object is adjusted. Specifically, the number of image frames consistent with the target number starting from the first image frame in each latest image frame is retained, and the other image frames are deleted, that is, the latest image frame corresponding to each target object is cropped so that the number of image frames contained in the cropped latest image frame is consistent with the target number, so that the number of image frames contained in the cropped latest image frame matches the target number. By cropping each latest image frame according to the target number, the common part of the latest image frame corresponding to each target object can be retained, and the common part retained by each latest image frame can be used as the cropped latest image frame corresponding to each target object.

[0111] In an embodiment of the present application, the latest image frames corresponding to each of the target objects are cropped according to the target number to obtain the latest cropped image frames corresponding to each of the target objects; wherein the number of image frames contained in the latest cropped image frames matches the target number, the target number is the number of image frames contained in the image frames corresponding to the reference object, and the reference object is the target object with the smallest number of image frames contained in the image frames corresponding to each of the target objects. Since the target number is the number of image frames contained in the image frames corresponding to the reference object, and the reference object is the target object with the smallest number of image frames contained in the image frames corresponding to each of the target objects, the image frames of the common parts that are consistent with the target number in the latest image frames corresponding to each of the target objects can be retained, and the image frames that exceed the target number can be cropped so that the number of image frames contained in the latest cropped image frames corresponding to each of the target objects matches the target number.

[0112] Figure 2 is a schematic diagram of the steps of another video processing method provided by an embodiment of the present application. Figure 2 As shown, the video processing method includes: steps 601 to 604, which are data marking, frame motion speed calculation, motion speed tuning and content fusion. Among them, the data marking can divide the image into regions according to the positions of each object in multiple image frames included in the original video, each region only contains one object, and the objects in each region are marked by identification. For example, multiple image frames contain the sun, trees, pedestrians, etc., and objects A, B, and C can be used to represent the sun, trees, and pedestrians respectively. The frame motion speed calculation can be calculated by formula (3) according to the frame numbers of multiple image frames, the image coordinate information of the target object and the frame rate of the original video. Then, the average speed of the target object is calculated according to the speed of the target object corresponding to each image frame by formula (4), and the average speed is used as the motion speed of the target object. Finally, the reference speed is determined according to the motion speed of each object and the preset weight by formula (5).

[0113] Among them, the motion speed tuning can determine the frame extraction ratio or the frame insertion ratio according to the motion speed of the reference object and the motion speed of the target object, and adjust the number of image frames contained in multiple image frames according to the frame extraction ratio or the frame insertion ratio to obtain the image frames corresponding to the target object. Content fusion can correspond the image frames corresponding to each target object to multiple image frames in sequence one by one, and then fuse the image frames corresponding to each target object with the multiple image frames to obtain new images, thereby obtaining the latest image frames corresponding to each target object. Then, the image frames corresponding to each target object are cropped according to the number of targets, and the common parts of the image frames corresponding to each target object are retained. The common parts of the image frames corresponding to each target object are compressed using video compression software to generate a video file as the target video. In the case where the target video includes the sun and pedestrians, the target video is played to show the scene of people running on the ground and the changing of the sun and the moon in the sky, organically integrating fast and slow moving objects to improve the video playback effect.

[0114] The present application embodiment provides a video processing device, such as Figure 3 As shown, the device 70 includes:

[0115] A first determination module 701 is used to determine the movement speed of each object in the original video based on a plurality of image frames included in the original video;

[0116] A second determination module 702, configured to determine an object whose moving speed meets the target condition among the objects as a reference object;

[0117] An adjustment module 703 is used to adjust the number of image frames included in the original video according to the movement speed of the reference object and the movement speed of the target object to obtain image frames corresponding to the target object; the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object;

[0118] The generating module 704 is configured to generate a target video according to the multiple image frames and the image frames corresponding to the target objects.

[0119] Optionally, the adjustment module 703 is specifically used to:

[0120] When the moving speed of the target object is less than the moving speed of the reference object, the plurality of image frames are subjected to frame extraction processing according to the moving speed of the reference object and the moving speed of the target object to obtain image frames corresponding to the target object;

[0121] When the moving speed of the target object is not less than the moving speed of the reference object, the multiple image frames are interpolated according to the moving speed of the reference object and the moving speed of the object to obtain image frames corresponding to the target object.

[0122] Optionally, the adjustment module 703 is further configured to:

[0123] Determining a frame extraction ratio according to the movement speed of the reference object and the movement speed of the target object;

[0124] Extracting an image frame from the multiple image frames according to the frame extraction ratio as a first target image frame;

[0125] An image frame corresponding to the target object is composed according to the first target image frame.

[0126] Optionally, the adjustment module 703 is further configured to:

[0127] Determining an interpolation ratio according to a movement speed of the reference object and a movement speed of the target object;

[0128] Acquire an image frame from the plurality of image frames according to the interpolation frame ratio as a second target image frame;

[0129] The second target image frame is inserted into the multiple image frames, and an image frame corresponding to the target object is formed according to the multiple image frames after the second target image frame is inserted.

[0130] Optionally, the first determining module 701 is specifically configured to:

[0131] Acquire image coordinate information of each object in a plurality of image frames included in the original video;

[0132] Calculating the speed of each object corresponding to each image frame in the multiple image frames according to the image coordinate information of each object, the frame rate of the original video and the multiple image frames;

[0133] According to the speed of each object corresponding to each image frame, the moving speed of each object is determined. Optionally, the second determining module 702 is specifically configured to:

[0134] Determine a reference speed according to the movement speed of each object and a preset weight;

[0135] The object whose absolute value of the difference between the moving speed and the reference speed value is the smallest among the objects is determined as the reference object.

[0136] Optionally, the generating module 704 is specifically used for:

[0137] For any of the target objects, obtaining a sub-image and image coordinates of the target object according to an image frame corresponding to the target object;

[0138] Determining target coordinates in the multiple image frames that match the image coordinates according to the image coordinates of the target object, and updating the sub-images corresponding to the target coordinates in the multiple image frames to the sub-images of the target object, to obtain the latest image frame corresponding to the target object; wherein the latest image frame includes the updated multiple image frames;

[0139] The target video is generated according to the latest image frame corresponding to each of the target objects.

[0140] Optionally, the device 70 further includes:

[0141] A cropping module is used for cropping the latest image frames corresponding to each target object according to the target number before the generation module generates the target video, so as to obtain the cropped latest image frames corresponding to each target object; wherein the number of image frames contained in the cropped latest image frames matches the target number, the target number is the number of image frames contained in the image frames corresponding to the reference object, and the reference object is the target object with the smallest number of image frames contained in the image frames corresponding to the target objects.

[0142] The advantages of the video processing device and the video processing method described above over the prior art are the same, and will not be described in detail here.

[0143] The video processing device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0144] The video processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0145] The video processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0146] Alternatively, if Figure 4 As shown, an embodiment of the present application further provides an electronic device 80, including a processor 801 and a memory 802, wherein the memory 802 stores programs or instructions that can be executed on the processor 801, and when the program or instructions are executed by the processor 801, the various steps of the above-mentioned video processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0147] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0148] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0149] The electronic device 90 includes but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910 and other components.

[0150] Those skilled in the art will appreciate that the electronic device 90 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 910 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0151] It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 907 includes a touch panel 9071 and at least one of other input devices 9072. The touch panel 9071 is also called a touch screen. The touch panel 9071 may include two parts: a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0152] The memory 909 can be used to store software programs and various data. The memory 909 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 909 may include a volatile memory or a non-volatile memory, or the memory 909 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 909 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0153] The processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 910.

[0154] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned video processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0155] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0156] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned video processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0157] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0158] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned video processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0159] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0160] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0161] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A video processing method, characterized in that: The method comprises: Determine the movement speed of each object in the original video based on a plurality of image frames included in the original video; Determine the object whose moving speed meets the target condition among the objects as the reference object; According to the movement speed of the reference object and the movement speed of the target object, the number of image frames included in the original video is adjusted to obtain image frames corresponding to the target object; wherein the target object is any object among the objects except the reference object, and the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object; Generate a target video according to the multiple image frames and the image frames corresponding to the target objects; The step of adjusting the number of image frames included in the original video according to the movement speed of the reference object and the movement speed of the target object to obtain the image frames corresponding to the target object includes: When the moving speed of the target object is less than the moving speed of the reference object, the plurality of image frames are subjected to frame extraction processing according to the moving speed of the reference object and the moving speed of the target object to obtain image frames corresponding to the target object; When the moving speed of the target object is not less than the moving speed of the reference object, the multiple image frames are interpolated according to the moving speed of the reference object and the moving speed of the object to obtain image frames corresponding to the target object.

2. The method according to claim 1, characterized in that The step of performing frame extraction processing on the plurality of image frames according to the movement speed of the reference object and the movement speed of the target object to obtain the image frame corresponding to the target object includes: Determine the frame extraction ratio according to the movement speed of the reference object and the movement speed of the target object; Extracting an image frame from the plurality of image frames according to the frame extraction ratio as a first target image frame; An image frame corresponding to the target object is composed according to the first target image frame.

3. The method according to claim 1, characterized in that The interpolation process is performed on the multiple image frames according to the movement speed of the reference object and the movement speed of the target object to obtain the image frame corresponding to the target object, including: Determining an interpolation ratio according to a movement speed of the reference object and a movement speed of the target object; Acquire an image frame from the plurality of image frames according to the interpolation frame ratio as a second target image frame; The second target image frame is inserted into the multiple image frames, and an image frame corresponding to the target object is formed according to the multiple image frames after the second target image frame is inserted.

4. The method according to claim 1, characterized in that: The determining, based on a plurality of image frames included in the original video, the movement speed of each object in the original video comprises: Acquire image coordinate information of each object in a plurality of image frames included in the original video; Calculating the speed of each object corresponding to each image frame in the multiple image frames according to the image coordinate information of each object, the frame rate of the original video and the multiple image frames; The moving speed of each object is determined according to the speed of each object corresponding to each image frame.

5. A video processing device, characterized in that: The device comprises: A first determination module, configured to determine a motion speed of each object in the original video based on a plurality of image frames included in the original video; A second determination module is used to determine the object whose movement speed meets the target condition among the objects as a reference object; an adjustment module, configured to adjust the number of image frames included in the original video according to the movement speed of the reference object and the movement speed of the target object, so as to obtain image frames corresponding to the target object; the target object is any object among the objects except the reference object, and the number of image frames corresponding to the target object matches the movement speed of the reference object and the movement speed of the target object; A generating module, configured to generate a target video according to the plurality of image frames and the image frames corresponding to the target objects; Wherein, the adjustment module is specifically used for: When the moving speed of the target object is less than the moving speed of the reference object, the plurality of image frames are subjected to frame extraction processing according to the moving speed of the reference object and the moving speed of the target object to obtain image frames corresponding to the target object; When the moving speed of the target object is not less than the moving speed of the reference object, the multiple image frames are interpolated according to the moving speed of the reference object and the moving speed of the object to obtain image frames corresponding to the target object.

6. The device according to claim 5, characterized in that The adjustment module is also specifically used for: Determine the frame extraction ratio according to the movement speed of the reference object and the movement speed of the target object; Extracting an image frame from the plurality of image frames according to the frame extraction ratio as a first target image frame; An image frame corresponding to the target object is composed according to the first target image frame.

7. The device according to claim 5, characterized in that The adjustment module is also specifically used for: Determining an interpolation ratio according to a movement speed of the reference object and a movement speed of the target object; Acquire an image frame from the plurality of image frames according to the interpolation frame ratio as a second target image frame; The second target image frame is inserted into the multiple image frames, and an image frame corresponding to the target object is formed according to the multiple image frames after the second target image frame is inserted.

8. The device according to claim 5, characterized in that The first determining module is specifically used for: Acquire image coordinate information of each object in a plurality of image frames included in the original video; Calculating the speed of each object corresponding to each image frame in the multiple image frames according to the image coordinate information of each object, the frame rate of the original video and the multiple image frames; The moving speed of each object is determined according to the speed of each object corresponding to each image frame.