Video processing method and apparatus, and device and storage medium

By obtaining the position information of the display object in the video and calculating the motion blur parameters for motion blur processing, the problem of low fluency after video compression is solved, and the frame rate is effectively reduced and the fluency is improved.

WO2024174971A1PCT designated stage expired Publication Date: 2024-08-29VIVO MOBILE COMM CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/077675
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-22
Filing Date
2024-02-20
Publication Date
2024-08-29

AI Technical Summary

Technical Problem

After video compression, the frame rate is reduced, resulting in low fluency and affecting the user viewing experience.

Method used

By obtaining the position information of the display object in the video between adjacent frame images, calculating the motion blur parameters, performing motion blur processing, synthesizing the image to simulate the inter-frame motion of the display object, and generating a compressed video.

Benefits of technology

It improves video fluency, solves the lag problem caused by reduced frame rate after video compression, and enhances user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077675_29082024_PF_FP_ABST
    Figure CN2024077675_29082024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a video processing method and apparatus, and a device and a storage medium. The method comprises: when M1 image frames of a first video have been acquired, determining the positions of a display object in the first video in two adjacent image frames among the M1 image frames, so as to obtain N pieces of motion information, wherein N < M1; acquiring N motion blur parameters associated with the N pieces of motion information; performing motion blurring processing on N synthesized-image frames on the basis of the N motion blur parameters, so as to obtain N second image frames, wherein a synthesized image is obtained by synthesizing the two adjacent image frames; and generating a second video on the basis of the N second image frames.
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device, equipment and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202310157128.8 filed in China on February 22, 2023, the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application belongs to the field of video processing technology, and specifically relates to a video processing method, apparatus, device and storage medium. Background Art

[0004] Video compression technology is a common video processing technology that usually compresses the video by reducing the frame rate to solve the problems of space occupation and traffic consumption caused by large video volume.

[0005] In the related art, after compressing a video using the above-mentioned video compression technology, the compressed video will become stuck and not smooth due to the reduced frame rate, which affects the user's video viewing experience.

[0006] Summary of the Invention

[0007] The purpose of the embodiments of the present application is to provide a video processing method, apparatus, device and storage medium that can solve the problem of low fluency after video compression.

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

[0009] When the M1 frame image of the first video is acquired, a position of the display object in the first video between two adjacent frames of the M1 frame image is determined to obtain N pieces of motion information, where N<M1;

[0010] Obtaining N motion blur parameters associated with the N motion information;

[0011] Based on N motion blur parameters, motion blurring is performed on N frames of synthesized images to obtain N frames of second images, wherein the synthesized image is obtained by synthesizing two adjacent frames of images;

[0012] A second video is generated based on the N frames of second images.

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

[0014] a determination module configured to, upon acquiring an M1 frame image of the first video, determine a position of a display object in the first video between two adjacent frames of the M1 frame image, and obtain N pieces of motion information, where N<M1;

[0015] An acquisition module, configured to acquire N motion blur parameters associated with the N motion information;

[0016] a blurring processing module, configured to perform motion blurring processing on N frames of synthesized images based on N motion blur parameters, to obtain N frames of second images, wherein the synthesized image is obtained by synthesizing two adjacent frames of images;

[0017] A generating module is used to generate a second video based on N frames of second images.

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

[0019] In a fourth aspect, an embodiment of the present application provides a readable storage medium, which stores a program or instruction. When the program or instruction is executed by a processor, the steps of the video processing method of the first aspect are implemented.

[0020] 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 programs or instructions to implement the steps of the video processing method of the first aspect.

[0021] 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.

[0022] In an embodiment of the present application, in a scenario where a first video is compressed, after acquiring the M1 frame image of the first video, the position of the display object in the first video between two adjacent frames of the M1 frame image is determined, and N motion information that can reflect the inter-frame changes of the display object between each two adjacent frames is obtained. On this basis, N motion blur parameters associated with the N motion information are obtained, and after synthesizing the two adjacent frames to obtain N frames of synthesized images, the N frames of synthesized images are motion blurred based on the N motion blur parameters to obtain N frames of second images. In this way, a second video is generated based on the N frames of second images, and the frame rate of the first video can be reduced by combining two frames into one frame, thereby achieving compression of the first video. The motion blur processing can superimpose a motion blur effect on the synthesized image, simulating the motion process of the display object between frames in the synthesized image, supplementing the inter-frame motion information of the display object that is missing in the first video, thereby improving the smoothness of the second video. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] FIG1 is a flow chart of a video processing method according to an embodiment of the present application;

[0024] FIG2 is a flow chart of a video processing method according to another embodiment of the present application;

[0025] FIG3 is a flow chart of a video processing method provided in yet another embodiment of the present application;

[0026] FIG4 is a flow chart of a video processing method provided in yet another embodiment of the present application;

[0027] FIG5 is a schematic diagram of an example of a second image provided by an embodiment of the present application;

[0028] FIG6 is a schematic structural diagram of a video processing device provided in an embodiment of the present application;

[0029] FIG7 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0030] FIG8 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0031] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0032] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0033] Video compression is a common video processing technique that typically reduces the frame rate to compress videos, addressing the space and data consumption issues associated with large video sizes. In related technologies, using this technology to compress videos can cause the video to become jittery and less fluid due to the reduced frame rate, impacting the user's viewing experience.

[0034] In response to the problems encountered in the related art, an embodiment of the present application provides a video processing method. In the scenario of compressing a first video, after obtaining the M1 frame image of the first video, the position of the display object in the first video between two adjacent frames of the M1 frame image is determined, and N motion information that can reflect the inter-frame changes of the display object in each adjacent frame is obtained. On this basis, N motion blur parameters associated with the N motion information are obtained. After synthesizing the two adjacent frames to obtain N frames of synthesized images, the N frames of synthesized images are motion blurred based on the N motion blur parameters to obtain N frames of second images. In this way, a second video is generated based on the N frames of second images. By combining two frames into one frame, the frame rate of the first video can be reduced to achieve compression of the first video. The motion blur processing can superimpose the motion blur effect on the synthesized image, simulating the motion process of the display object between frames in the synthesized image, ensuring the smoothness of the second video, and solving the problem of low smoothness after video compression in the related art.

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

[0036] Figure 1 is a flow chart of a video processing method provided by an embodiment of the present application. The execution subject of the video processing method may be an electronic device. It should be noted that the execution subject does not constitute a limitation of the present application.

[0037] As shown in FIG. 1 , the video processing method provided in the embodiment of the present application may include steps 110 to 140 .

[0038] Step 110 : When the M1 frame image of the first video is acquired, the position of the display object in the first video between two adjacent frames of the M1 frame image is determined to obtain N pieces of motion information.

[0039] Among them, the first video is the video to be compressed, there can be at least one display object in the first video, and the display objects can be the same or different in different image frames. This application does not make specific restrictions on this; the number of image frames in the first video can be greater than or equal to M1, N<M1.

[0040] If two adjacent frames of images each include at least one display object, the generated motion information may include motion change information of the at least one display object, that is, each piece of motion information may reflect the inter-frame motion change of the at least one display object between two adjacent frames.

[0041] In some embodiments, when the electronic device obtains the M1 frame image of the first video, it can determine the position of the display object between multiple adjacent frames of images to obtain N pieces of motion information.

[0042] Specifically, in adjacent multiple frames of images, the display object has different positions between each two frames of images, and the display object can produce a position change between each two frames of images. Therefore, after determining the position of the display object between adjacent multiple frames of images, the position change of the display object between two adjacent frames of images can be obtained to obtain the position change of the display object between adjacent multiple frames of images.

[0043] For example, if M1 is 9 and the electronic device needs to determine the position change of the display object between three adjacent frames, then after acquiring nine frames, the electronic device can first determine the position change of the display object between each two frames. For example, the position change of the display object between the first and second frames, and between the second and third frames, can be determined to obtain the position change of the display object between the first and third frames, and finally the position change between the first and third frames, the fourth and sixth frames, and the seventh and ninth frames. In some embodiments, each two adjacent frames can constitute a group of images, so M1 frame images correspond to M1 / 2 groups of images, each group of images corresponds to one piece of motion information, and thus N = M1 / 2 pieces of motion information can be obtained.

[0044] For example, if M1 is 60, the position change of the display object between two adjacent frames of images can be determined, such as the 1st frame and the 2nd frame, the 3rd frame and the 4th frame, the 5th frame and the 6th frame... Based on the position change of the display object between each group of images, a motion information can be obtained. 60 frames of images correspond to 30 groups of images, so N=30 motion information can be obtained.

[0045] Step 120: Obtain N motion blur parameters associated with the N motion information.

[0046] Step 130 : Based on N motion blur parameters, motion blur processing is performed on N frames of synthesized images respectively to obtain N frames of second images, wherein the synthesized image is obtained by synthesizing two adjacent frames of images.

[0047] Specifically, the electronic device can perform a synthesis process on two adjacent frames in the M1 frame image. Each group of two adjacent frames can generate a composite image, thus obtaining N = M1 / 2 frames of composite images. Because each group of two adjacent frames has a corresponding relationship with motion information and motion blur parameters, and each group of two adjacent frames also has a corresponding relationship with the composite image, the motion blur parameters and the composite image also have a one-to-one correspondence. The electronic device can perform motion blur processing on the corresponding two adjacent frames based on each motion blur parameter. Through this motion blur processing, the motion process of the displayed object between frames can be simulated in the composite image, superimposing a motion blur effect on the composite image.

[0048] Step 140: Generate a second video based on N frames of second images.

[0049] Among them, the second video is a compressed video of the first video. Compared with the first video, the number of frames of the second video is significantly reduced.

[0050] The video processing method provided in the embodiment of the present application, in the scenario of compressing the first video, after obtaining the M1 frame image of the first video, determines the position of the display object in the first video between two adjacent frames of the M1 frame image, and obtains N motion information that can reflect the inter-frame changes of the display object in each adjacent frame. On this basis, N motion blur parameters associated with the N motion information are obtained, and after synthesizing the two adjacent frames to obtain N frames of synthesized images, the N frames of synthesized images are respectively subjected to motion blur processing based on the N motion blur parameters to obtain N frames of second images. In this way, the second video is generated based on the N frames of second images, and the frame rate of the first video can be reduced by combining two frames into one frame to achieve compression of the first video. The motion blur processing can superimpose the motion blur effect on the synthesized image, simulate the motion process of the display object between frames in the synthesized image, supplement the inter-frame motion information of the display object missing in the first video, and thus improve the smoothness of the second video.

[0051] The above steps 110 to 140 are described in detail below with reference to specific embodiments.

[0052] In step 110 , when the M1 frame image of the first video is acquired, the position of the display object in the first video between two adjacent frames of the M1 frame image is determined to obtain N pieces of motion information.

[0053] In some embodiments of the present application, before step 110, the method may further specifically include: performing interval sampling on the original image frames of the first video according to a preset sampling interval to obtain M1 frame images.

[0054] Among them, the original frame number of the first video is M2, and the preset sampling interval can be set according to specific needs, for example, set to 1 frame, 2 frames or other values, and this application does not make specific limitations on this.

[0055] Exemplarily, the number M2 of original image frames of the first video is 120. If the preset sampling interval is 1, the electronic device can obtain the 1st frame, the 3rd frame, the 5th frame... and finally obtain M1=60 frames of images after sampling; if the preset sampling interval is 2, the electronic device can obtain the 1st frame, the 4th frame, the 7th frame... and finally obtain M1=40 frames of images after sampling.

[0056] In an embodiment of the present application, after sampling the first video according to a preset sampling interval, the number of image frames can be reduced. Thus, by synthesizing two adjacent frames of the sampled image frames and generating a second video based on the synthesized image frames, the number of image frames in the second video can be effectively reduced, the frame rate of the first video can be lowered, and effective compression of the first video can be achieved, thereby reducing the memory space and data consumption of the first video.

[0057] In some embodiments of the present application, before step 110, the method may further specifically include: inserting a transition frame into the M2 frame image of the first video to obtain the M1 frame image.

[0058] Specifically, the electronic device can insert a transition frame in the M2 frame image of the first video based on a preset interpolation interval. The preset interpolation interval can be set according to specific needs, for example, it can be set to insert a transition frame every 1 frame, every two frames, or every other number of frames. This application does not make any specific restrictions on this.

[0059] For example, the original number of frames of the first video is 120. The electronic device can insert a transition frame between two adjacent frames based on the frame insertion technology, and finally insert 119 transition frames into the 120 frames of images, and finally obtain M2=239 frames of images.

[0060] In this embodiment of the present application, by inserting a transition frame into the M2 frame, the difference between the two adjacent frames can be reduced, and the displacement change of the displayed object between the two adjacent frames can be reduced, thereby supplementing the motion information of the displayed object between the two adjacent frames of the M2 frame. Therefore, the synthesis processing and motion blurring processing based on the M1 frame after the insertion of the transition frame can further improve the smoothness of the second video.

[0061] In some embodiments of the present application, two adjacent frames of images may include a first frame of image and a second frame of image. Figure 2 is a flow chart of a video processing method provided in another embodiment of the present application. Step 110 may include steps 210 and 220 shown in Figure 2.

[0062] Step 210 : Based on an image recognition algorithm, obtain the coordinates of a first pixel point of the display object in the first frame image and the coordinates of a second pixel point of the display object in the second frame image.

[0063] The first pixel coordinates are pixel coordinate values ​​of the display object in the first frame image, and the second pixel coordinates are pixel coordinate values ​​of the display object in the second frame image.

[0064] It should be noted that this application does not specifically limit the type of image recognition algorithm. For example, the image recognition algorithm of this application may include but is not limited to: depth-first search algorithm, breadth-first search algorithm, Dijkstra algorithm, Bellman-Ford algorithm, Floyd-Warshall algorithm, Prim algorithm, and Kruskal algorithm.

[0065] Step 220 : Based on the first pixel coordinate and the second pixel coordinate, determine the displacement distance and displacement angle of the display object between two adjacent frames of images to obtain motion information.

[0066] Among them, the coordinates of the first pixel point correspond to the starting position of the display object changing between frames, and the coordinates of the second pixel point correspond to the ending position of the display object changing between frames. Based on the starting position and the ending position, the displacement distance of the display object can be obtained; the displacement angle can be the rotation angle of the display object during the movement between frames.

[0067] In an embodiment of the present application, by obtaining the pixel coordinates of the display object in two adjacent frames of images, the displacement distance and displacement angle of the display object between the two adjacent frames of images can be determined through the change of the pixel coordinates, thereby quickly and accurately obtaining the motion information of the display object between the two adjacent frames of images.

[0068] In step 120 , N motion blur parameters associated with the N motion information are obtained.

[0069] Among them, the motion blur parameter is used to characterize the degree of blur, and the degree of blur is positively correlated with the displacement distance and displacement angle. That is, the greater the displacement distance of the display object between two adjacent frames of images, the higher the degree of blur represented by the associated motion blur parameter; the greater the displacement angle of the display object between two adjacent frames of images, the higher the degree of blur represented by the associated motion blur parameter.

[0070] Step 130 : Based on N motion blur parameters, motion blur processing is performed on N frames of synthesized images respectively to obtain N frames of second images, wherein the synthesized image is obtained by synthesizing two adjacent frames of images.

[0071] In some embodiments of the present application, step 130 may specifically include: performing motion blur processing on the display object in the composite image based on motion blur parameters associated with the displacement distance and the displacement angle.

[0072] Among them, the motion blur parameter is used to characterize the blur degree, and the blur degree is positively correlated with the displacement distance and displacement angle.

[0073] In the embodiments of the present application, the blur parameters used in motion blur processing are associated with the displacement distance and displacement angle of the displayed object between frames. Thus, based on these blur parameters, a corresponding motion blur effect can be superimposed on the composite image, making the motion blur effect more compatible with the motion of the displayed object. For example, if the displayed object moves quickly, the displacement distance between two adjacent frames is large. Therefore, a larger blur effect can be superimposed on the faster-moving display object in the composite image, making the blur effect more compatible with the display object's motion.

[0074] Optionally, different motion blurring processes may be performed on different display objects in the same frame, and different motion blurring effects may be performed on the display objects according to motion parameters of the display objects.

[0075] In some embodiments of the present application, step 130 may specifically include at least one of the following:

[0076] When the generated displacement angle is less than a preset angle threshold, a linear blur effect is superimposed on the display object and its motion trajectory in the direction of motion of the display object based on a motion blur parameter associated with the displacement distance;

[0077] When the displacement angle is greater than a preset angle threshold, a circular motion blur effect is superimposed on the displayed object and its motion trajectory, centered on the focal point in the composite image, based on the motion blur parameters associated with the displacement distance and displacement angle;

[0078] When the size of the display object changes between two adjacent frames, a radial blur effect is superimposed on the display object, where the farther the object is from the radial center point, the higher the blurriness. The radial center point is the center position of the composite image.

[0079] Among them, the preset angle threshold can be set according to specific needs, for example, it can be set to any value between 0 and 10 degrees. If the displacement angle is less than the preset angle threshold, it can be considered that the motion trajectory of the display object between two adjacent frames of images is a linear motion trajectory, and no displacement angle is generated. Therefore, a linear blur effect can be superimposed on the display object and its motion trajectory.

[0080] In one example, the preset angle threshold is 5 degrees. As shown in FIG3 , after the first frame image 301 and the second frame image 302 are synthesized, a synthesized image 303 can be obtained. Since the displacement angle of the display object "small ball" between 301 and 302 is 0, that is, its motion trajectory is a linear motion trajectory, a linear blurring effect can be superimposed on the "small ball" and its motion trajectory in the motion direction of the "small ball", direction 1, to obtain the second image 304.

[0081] In another example, the preset angle threshold is 5 degrees. As shown in FIG4 , after the first frame image 401 and the second frame image 402 are synthesized, a synthesized image 403 can be obtained. Since the displacement angle of the display object "small ball" between 401 and 402 is greater than 5 degrees, that is, its motion trajectory is a nonlinear motion trajectory, a circular motion blur effect can be superimposed on the "small ball" and its motion trajectory as shown in FIG5 to obtain a second image 501.

[0082] In another example, if the size of the displayed object changes between two adjacent frames of images, that is, the displayed object is scaled, the electronic device can use the image center position of the composite image as the radiation center point to superimpose a radiation blur effect on the displayed object, with the blurring increasing as the object is farther away from the radiation center point.

[0083] In an embodiment of the present application, based on the different motion modes of a display object between two adjacent frames, the electronic device can superimpose different motion blur effects on it. Specifically, if the motion trajectory of the display object between two adjacent frames is a linear motion trajectory, a linear blur effect can be superimposed on the display object and its motion trajectory, thereby simulating the linear motion process of the display object in the composite image; if the angle of the display object changes during the motion between two adjacent frames, a circular dynamic blur effect can be superimposed on the display object and its motion trajectory, thereby simulating the nonlinear motion process of the display object in the composite image; if the display object is scaled between two adjacent frames, the electronic device can superimpose a radial blur effect on the display object, with the farther the distance from the radial center point, the higher the degree of blur, thereby simulating the scaling process of the display object in the composite image. In this way, the electronic device can superimpose a motion blur effect that is more adaptable to the motion process of the display object in the composite image, better restore the motion process of the display object in the second image, and make the motion process of the display object in the second video smoother and more fluent.

[0084] Step 140: Generate a second video based on N frames of second images.

[0085] In some embodiments, the electronic device may assemble N frames of second images to generate a second video.

[0086] It should be noted that the video processing method provided in the embodiments of this application can be executed by a video processing device or a control module within the video processing device that is used to execute the video processing method. In the embodiments of this application, the video processing device provided in the embodiments of this application is described using the video processing device executing the video processing method as an example. The video processing device is described in detail below.

[0087] FIG6 is a schematic structural diagram of a video processing device provided in this application.

[0088] As shown in FIG6 , an embodiment of the present application provides a video processing device 600 , which includes a determination module 610 , an acquisition module 620 , a motion blur processing module 630 , and a generation module 640 .

[0089] The determining module 610 is configured to, when acquiring the M1 frame image of the first video, determine the position of the display object in the first video between two adjacent frames of the M1 frame image, and obtain N pieces of motion information, where N<M1;

[0090] An acquisition module 620 is configured to acquire N motion blur parameters associated with the N motion information;

[0091] A blur processing module 630 is configured to perform motion blur processing on N frames of synthesized images based on N motion blur parameters to obtain N frames of second images, wherein the synthesized image is obtained by synthesizing two adjacent frames of images;

[0092] The generating module 640 is configured to generate a second video based on N frames of second images.

[0093] The video processing device provided in an embodiment of the present application, in a scenario where a first video is compressed, after acquiring the M1 frame image of the first video, determines the position of the display object in the first video between two adjacent frames of the M1 frame image, and obtains N motion information that can reflect the inter-frame changes of the display object between each two adjacent frames. On this basis, N motion blur parameters associated with the N motion information are obtained, and after synthesizing the two adjacent frames to obtain N frames of synthesized images, the N frames of synthesized images are motion blurred based on the N motion blur parameters to obtain N frames of second images. In this way, a second video is generated based on the N frames of second images, and the frame rate of the first video can be reduced by combining two frames into one frame, thereby achieving compression of the first video. The motion blur processing can superimpose a motion blur effect on the synthesized image, simulating the motion process of the display object between frames in the synthesized image, supplementing the inter-frame motion information of the display object missing in the first video, thereby improving the smoothness of the second video.

[0094] In some embodiments of the present application, two adjacent frames of images include a first frame of image and a second frame of image, and the determination module 610 includes: an acquisition unit, used to acquire the first pixel coordinates of the display object in the first frame of image and the second pixel coordinates of the display object in the second frame of image based on an image recognition algorithm; a determination unit, used to determine the displacement distance and displacement angle generated by the display object between the two adjacent frames of image based on the first pixel coordinates and the second pixel coordinates, to obtain motion information.

[0095] In some embodiments of the present application, the blur processing module 630 is specifically used to: perform motion blur processing on the display object in the composite image based on the motion blur parameters associated with the displacement distance and displacement angle; wherein the motion blur parameters are used to characterize the degree of blur, and the degree of blur is positively correlated with the displacement distance and displacement angle.

[0096] In some embodiments of the present application, the blurring processing module 630 is specifically used for at least one of the following: when the generated displacement angle is less than a preset angle threshold, based on the motion blur parameters associated with the displacement distance, a linear blur effect is superimposed on the display object and its motion trajectory in the direction of motion of the display object; when the displacement angle is greater than the preset angle threshold, based on the motion blur parameters associated with the displacement distance and the displacement angle, a circular dynamic blur effect is superimposed on the display object and its motion trajectory with the focus in the composite image as the center; when the size of the display object changes in two adjacent frames of images, a radial blur effect is superimposed on the display object, where the farther away from the radial center point, the higher the degree of blur, wherein the radial center point is the center position of the composite image.

[0097] In some embodiments of the present application, the apparatus further includes: a sampling module configured to perform interval sampling on the M2 frame images of the first video according to a preset sampling interval to obtain the M1 frame images.

[0098] In some embodiments of the present application, the apparatus further includes: an insertion frame processing module for inserting a transition frame into the M2 frame image of the first video to obtain the M1 frame image.

[0099] The video processing device provided in the embodiment of the present application can implement the various processes implemented by the electronic device in the method embodiments of Figures 1 to 5. To avoid repetition, they are not described here.

[0100] The video processing device in the embodiment of the present application can be an electronic device, or a component, integrated circuit, or chip in the electronic device. The electronic device can be a terminal, or other devices other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not specifically limit it.

[0101] 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.

[0102] Optionally, as shown in Figure 7, an embodiment of the present application also provides an electronic device 700, including a processor 701 and a memory 702, and the memory 702 stores a program or instruction that can be run on the processor 701. When the program or instruction is executed by the processor 701, each process of the above-mentioned video processing method or video processing device method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0104] FIG8 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.

[0105] The electronic device 800 includes but is not limited to components such as a radio frequency unit 801 , a network module 802 , an audio output unit 803 , an input unit 804 , a sensor 805 , a display unit 806 , a user input unit 807 , an interface unit 808 , a memory 809 , and a processor 810 .

[0106] Those skilled in the art will appreciate that the electronic device 800 may further include a power source (such as a battery) to power various components. The power source may be logically connected to the processor 810 via a power management system, thereby enabling management of charging, discharging, and power consumption through the power management system. The electronic device structure shown in FIG8 does not limit the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components or arrange the components differently, which will not be described in detail here.

[0107] Among them, the processor 810 is used to determine the position of the display object in the first video between two adjacent frames of the M1 frame image when the M1 frame image of the first video is obtained, and obtain N motion information, N<M1; the processor 810 is also used to obtain N motion blur parameters associated with the N motion information; the processor 810 is also used to perform motion blur processing on the N frames of synthetic images based on the N motion blur parameters, to obtain N frames of second images, wherein the synthetic image is obtained by synthesizing two adjacent frames of images; the processor 810 is also used to generate a second video based on the N frames of second images.

[0108] In some embodiments of the present application, two adjacent frames of images include a first frame of image and a second frame of image, and the position of the display object in the first video between the two adjacent frames of the M1 frame image is determined. The processor 810 is also used to: obtain the first pixel coordinates of the display object in the first frame of image and the second pixel coordinates of the display object in the second frame of image based on the image recognition algorithm; determine the displacement distance and displacement angle generated by the display object between the two adjacent frames of image based on the first pixel coordinates and the second pixel coordinates to obtain motion information.

[0109] In some embodiments of the present application, motion blur processing is performed on N frames of synthetic images based on N motion blur parameters, and the processor 810 is specifically used to: perform motion blur processing on the display objects in the synthetic image based on the motion blur parameters associated with the displacement distance and the displacement angle; wherein the motion blur parameters are used to characterize the degree of blur, and the degree of blur is positively correlated with the displacement distance and the displacement angle.

[0110] In some embodiments of the present application, the processor 810 is specifically used for at least one of the following: when the generated displacement angle is less than a preset angle threshold, based on the motion blur parameters associated with the displacement distance, a linear blur effect is superimposed on the display object and its motion trajectory in the direction of movement of the display object; when the displacement angle is greater than the preset angle threshold, based on the motion blur parameters associated with the displacement distance and the displacement angle, a circular dynamic blur effect is superimposed on the display object and its motion trajectory with the focus in the composite image as the center; when the size of the display object changes in two adjacent frames of images, a radial blur effect is superimposed on the display object, where the farther the distance from the radial center point, the higher the degree of blur, wherein the radial center point is the center position of the composite image.

[0111] In some embodiments of the present application, the processor 810 is further configured to: perform interval sampling on the M2 frame image of the first video according to a preset sampling interval to obtain the M1 frame image.

[0112] In some embodiments of the present application, the processor 810 is further configured to: insert a transition frame into the M2 frame image of the first video to obtain the M1 frame image.

[0113] In an embodiment of the present application, in a scenario where a first video is compressed, after acquiring the M1 frame image of the first video, the position of the display object in the first video between two adjacent frames of the M1 frame image is determined, and N motion information that can reflect the inter-frame changes of the display object in each adjacent frame is obtained. On this basis, N motion blur parameters associated with the N motion information are obtained, and after synthesizing the two adjacent frames to obtain N frames of synthesized images, the N frames of synthesized images are motion blurred based on the N motion blur parameters to obtain N frames of second images. In this way, a second video is generated based on the N frames of second images, and the frame rate of the first video can be reduced by combining two frames into one frame, thereby achieving compression of the first video. The motion blur processing can superimpose a motion blur effect on the synthesized image, simulate the motion process of the display object between frames in the synthesized image, and supplement the inter-frame motion information of the display object that is missing in the first video, thereby improving the smoothness of the second video.

[0114] It should be understood that in an embodiment of the present application, the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042, and the graphics processor 8041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes a touch panel 8071 and at least one of other input devices 8072. The touch panel 8071 is also called a touch screen. The touch panel 8071 may include two parts: a touch detection device and a touch controller. Other input devices 8072 may include, but are not limited to, a physical keyboard, keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0115] The memory 809 can be used to store software programs and various data. The memory 809 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, N required application programs or instructions (such as sound playback, image playback, etc.), etc. In addition, the memory 809 may include a volatile memory or a non-volatile memory, or the memory 809 may include both volatile and non-volatile memory. 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 random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 809 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0116] Processor 810 may include one or more processing units. Optionally, processor 810 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 810.

[0117] 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 or video processing device method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0118] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

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

[0120] 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.

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

[0122] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to being performed in the order shown or discussed, and may also include being performed in a substantially simultaneous manner or in the opposite order as 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.

[0123] 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 the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially 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, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0124] 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 this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A video processing method, the method comprising: When the M1 frame image of the first video is acquired, a position of a display object in the first video between two adjacent frames of the M1 frame image is determined to obtain N pieces of motion information, where N<M1; Obtaining N motion blur parameters associated with the N motion information; Based on the N motion blur parameters, respectively perform motion blur processing on N frames of synthesized images to obtain N frames of second images, wherein the synthesized image is obtained by synthesizing the two adjacent frames of images; A second video is generated based on the N frames of second images.

2. The method according to claim 1, wherein: The two adjacent frames of images include a first frame of image and a second frame of image, and determining a position of a display object in the first video between two adjacent frames of the M1 frame of image includes: Based on an image recognition algorithm, obtaining first pixel coordinates of the display object in the first frame image and second pixel coordinates of the display object in the second frame image; Based on the first pixel point coordinates and the second pixel point coordinates, the displacement distance and the displacement angle of the display object between the two adjacent frames of images are determined to obtain the motion information.

3. The method according to claim 2, wherein: The performing motion blur processing on the N frames of synthetic images based on the N motion blur parameters respectively includes: Based on the motion blur parameters associated with the displacement distance and the displacement angle, performing motion blur processing on the displayed object in the composite image; The motion blur parameter is used to characterize the blur degree, and the blur degree is positively correlated with the displacement distance and the displacement angle.

4. The method according to claim 3, wherein: The performing motion blur processing on the displayed object in the composite image includes at least one of the following: In the case where the displacement angle generated is less than the preset angle threshold, based on the displacement angle Distance-related motion blur parameters, superimposing a linear blur effect on the display object and its motion trajectory in the direction of motion of the display object; When the displacement angle is greater than a preset angle threshold, based on a motion blur parameter associated with the displacement distance and the displacement angle, a ring-shaped dynamic blur effect is superimposed on the display object and its motion trajectory with the focus in the synthetic image as the center; When the size of the display object changes in two adjacent frames of images, a radial blur effect is superimposed on the display object, wherein the farther the display object is from the radial center point, the higher the blur degree is, wherein the radial center point is the center position of the composite image.

5. The method according to claim 1, wherein: The method further comprises: According to a preset sampling interval, the M2 frame image of the first video is sampled at intervals to obtain the M1 frame image.

6. The method according to claim 1, wherein: The method further comprises: A transition frame is inserted into the M2 frame image of the first video to obtain the M1 frame image.

7. A video processing device, comprising: A determination module, configured to determine, when an M1 frame image of a first video is acquired, a position of a display object in the first video between two adjacent frames of the M1 frame image, and obtain N pieces of motion information, N<M1; An acquisition module, used for acquiring N motion blur parameters associated with the N motion information; A blur processing module, used for performing motion blur processing on N frames of synthesized images based on the N motion blur parameters to obtain N frames of second images, wherein the synthesized image is synthesized from the two adjacent frames of images; A generating module is used to generate a second video based on the N frames of second images.

8. The device according to claim 7, wherein: The two adjacent frames of images include a first frame of image and a second frame of image, and the determining module includes: an acquisition unit, configured to acquire, based on an image recognition algorithm, a first pixel coordinate of the display object in the first frame image and a second pixel coordinate of the display object in the second frame image; Pixel coordinates; A determination unit is used to determine the displacement distance and displacement angle of the display object between the two adjacent frames of images based on the first pixel point coordinates and the second pixel point coordinates to obtain the motion information.

9. The device according to claim 8, wherein: The blur processing module is specifically used to perform motion blur processing on the display object in the synthetic image based on the motion blur parameters associated with the displacement distance and the displacement angle; The motion blur parameter is used to characterize the blur degree, and the blur degree is positively correlated with the displacement distance and the displacement angle.

10. The device according to claim 9, wherein: The gelatinization processing module is specifically used for at least one of the following: When the generated displacement angle is less than a preset angle threshold, based on a motion blur parameter associated with the displacement distance, a linear blur effect is superimposed on the display object and its motion trajectory in the motion direction of the display object; When the displacement angle is greater than a preset angle threshold, based on a motion blur parameter associated with the displacement distance and the displacement angle, a ring-shaped dynamic blur effect is superimposed on the display object and its motion trajectory with the focus in the synthetic image as the center; When the size of the display object changes in two adjacent frames of images, a radial blur effect is superimposed on the display object, wherein the farther the display object is from the radial center point, the higher the blur degree is, wherein the radial center point is the center position of the composite image.

11. The device according to claim 7, wherein: The device also includes: The sampling module is used to perform interval sampling on the M2 frame image of the first video according to a preset sampling interval to obtain the M1 frame image.

12. The device according to claim 7, wherein: The device also includes: The inserted frame processing module is used to insert a transition frame into the M2 frame image of the first video to obtain the M1 frame image.

13. An electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the video processing method according to any one of claims 1 to 6.

14. A readable storage medium storing a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the video processing method according to any one of claims 1 to 6.

15. An electronic device, configured to implement the page display method according to any one of claims 1-6.

16. A chip comprising a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run a program or instruction to implement the video processing method according to any one of claims 1 to 6.

17. A computer program product, wherein when instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the video processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Apparatus, method, and program for processing image

    CN101610349A

  • Motion blur simulation

    CN111557016A

  • Motion blur generation method and device and terminal equipment

    CN114419073A

  • Method and device for realizing motion perception fuzzy special effect based on optical flow method

    CN114862725A

  • Video processing method and device, equipment and storage medium

    CN116156079A