Video processing method and apparatus, and device, computer-readable storage medium and product

By extracting the highlighted light areas in the video frame and generating spots and shadow areas based on global motion information, the cumbersome operation problems in the prior art are solved, and the effect of simplifying the video processing flow and improving the acquisition efficiency is achieved.

WO2025140197A1PCT designated stage expired Publication Date: 2025-07-03BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/141867
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-28
Filing Date
2024-12-24
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

The existing video processing methods are cumbersome to optimize the display effect and have high professional requirements, resulting in low video acquisition efficiency.

Method used

By extracting the highlight area of ​​the video frame, determining the global motion information, and blurring it based on it, generating the spot area and the drag area, superimposing it on the highlight area to present a glossy effect.

Benefits of technology

The video processing process is simplified, the requirements for users' professional skills are reduced, the video acquisition efficiency is improved, and the glossy effect is matched with the video content movement, enhancing authenticity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024141867_03072025_PF_FP_ABST
    Figure CN2024141867_03072025_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the embodiments of the present disclosure are a video processing method and apparatus, and a device, a computer-readable storage medium and a product. The method comprises: acquiring a video to be processed; for a video frame in said video, extracting a highlight region in the video frame, and determining global motion information corresponding to the video frame, wherein the global motion information comprises motion information corresponding to pixel points in the video frame; on the basis of the global motion information, performing blurring processing on the highlight region, so as to obtain a glare region and a motion blur region which correspond to the highlight region; and overlaying the glare region and the motion blur region on the highlight region in the video frame, so as to obtain a target video.
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device, equipment, computer-readable storage medium and product

[0001] This application claims priority to Chinese Patent Application No. 202311842162.5 filed on December 28, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field

[0002] The embodiments of the present disclosure relate to a video processing method, apparatus, device, computer-readable storage medium, and product. Background Art

[0003] With the rapid development of photography technology, users can now capture videos using video capture devices. To enrich the visual effects of the captured videos, such as creating metallic or glassy luster effects in at least some areas of the video, it is often necessary to adjust the camera position and lighting during the shooting process.

[0004] Therefore, video processing using the above method is often complicated and requires high professional skills from the user, resulting in low video acquisition efficiency and failure to meet the actual needs of users. Summary of the Invention

[0005] The embodiments of the present disclosure provide a video processing method, apparatus, device, computer-readable storage medium, and product, which are used to solve the technical problem that the existing methods for optimizing video display effects are relatively complicated to operate.

[0006] In a first aspect, an embodiment of the present disclosure provides a video processing method, including:

[0007] Get the video to be processed;

[0008] Extracting highlight areas from video frames in a video to be processed, and determining global motion information corresponding to the video frames, wherein the global motion information includes motion information corresponding to pixels in the video frames;

[0009] Performing blur processing on the highlight area based on global motion information to obtain a light spot area and a smear area corresponding to the highlight area;

[0010] The light spot area and the smear area are superimposed on the highlight area in the video frame to obtain a target video.

[0011] In a second aspect, an embodiment of the present disclosure provides a video processing device, including:

[0012] An acquisition module is used to obtain the video to be processed;

[0013] a determination module, configured to extract, for a video frame in a video to be processed, a highlight area in the video frame, and determine global motion information corresponding to the video frame, wherein the global motion information includes motion information corresponding to pixels in the video frame;

[0014] a processing module, configured to perform blur processing on the highlight area based on global motion information to obtain a light spot area and a smear area corresponding to the highlight area;

[0015] A synthesis module is used to superimpose the light spot area and the smear area on the highlight area in the video frame to obtain a target video.

[0016] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0017] The memory stores computer-executable instructions;

[0018] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the video processing method described in the first aspect and various possible designs of the first aspect.

[0019] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the video processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0020] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the video processing method described in the first aspect and various possible designs of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, a brief introduction to the drawings required for the embodiments will be given below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

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

[0023] FIG2 is a flow chart of a video processing method provided by another embodiment of the present disclosure;

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

[0025] FIG4 is a flow chart of a video processing method provided by another embodiment of the present disclosure;

[0026] FIG5 is a schematic structural diagram of a video processing device provided by an embodiment of the present disclosure;

[0027] FIG6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0029] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0030] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0031] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0032] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0033] In order to solve the technical problem that the operation of optimizing video display effects is relatively complicated, the present disclosure provides a video processing method, device, equipment, computer-readable storage medium and product.

[0034] It should be noted that the video processing method, apparatus, device, computer-readable storage medium, and product provided by the present disclosure can be applied to any video processing scenario to make at least part of the video appear glossy.

[0035] To enrich the display effect of the video, you can control the highlight area or specified area in the video to present metallic luster, glass luster, and other gloss effects formed by light shining on the surface of a smooth object.

[0036] In the related art, in order to make at least part of the video present a glossy effect, it is necessary to manually adjust the camera position, lighting, and other factors during the video capture process. This operation is often cumbersome and requires high professional skills from the user.

[0037] In the process of solving the above technical problems, the inventors discovered through research that, in order to automatically implement video processing, after obtaining the video to be processed, the highlight area in each video frame can be extracted. This allows the addition of effects such as halos and trails around the highlight areas to create a glossy effect similar to that created by light shining on a smooth surface.

[0038] Optionally, for each video frame, global motion information corresponding to the video frame can be calculated based on the video frame and its adjacent video frames. This global motion information can represent the direction and amplitude of motion of the content in the video frame. Based on this global motion information, the highlight area is blurred to form a light spot area and a smear area corresponding to the highlight area. The light spot area and the smear area can match the motion trend of the content in the video frame. The light spot area and the smear area are superimposed on the highlight area in the video frame to obtain the target video.

[0039] FIG1 is a flow chart of a video processing method provided by an embodiment of the present disclosure. As shown in FIG1 , the method includes:

[0040] Step 101: Obtain the video to be processed.

[0041] The execution subject of this embodiment is a video processing device. The video processing device can be coupled to a terminal device. Thus, based on a trigger operation of the user on the terminal device, the video to be processed can be obtained, and the light spot area and the smear area can be superimposed on the highlight area in the video frame corresponding to the video to be processed to obtain the target video. Alternatively, the video processing device can also be coupled to a server that is communicatively connected to the terminal device. Thus, the video processing request sent by the terminal device can be obtained, and based on the video processing request, the video to be processed can be obtained, and the light spot area and the smear area can be superimposed on the highlight area in the video frame corresponding to the video to be processed to obtain the target video.

[0042] In this embodiment, in order to implement the video processing operation, a video to be processed can be obtained, wherein the video to be processed can be collected by the user in real time or uploaded by the user in a preset storage path, and this disclosure does not impose any restrictions on this.

[0043] Step 102: For a video frame in the video to be processed, extract a highlight area in the video frame and determine global motion information corresponding to the video frame, wherein the global motion information includes motion information corresponding to pixels in the video frame.

[0044] In this embodiment, after acquiring the video to be processed, the highlight region within each frame can be extracted. This allows subsequent image processing to be performed on the highlight region, resulting in a glossy effect similar to light shining on a smooth surface. High-frequency regions within the video frame can be identified and filtered using a box filter to obtain a filtered result. The difference between the video frame and the filtered result is calculated to obtain the highlight region.

[0045] Furthermore, since the main content of the video being processed is in continuous motion, in order to make the video processing results more closely follow the motion trend of the main content of the video being processed, the global motion information corresponding to the video frame can also be determined. The global motion information includes the motion information corresponding to the pixels in the video frame. The motion information includes the motion angle, motion amplitude, etc.

[0046] Step 103 : Blurring the highlight area based on global motion information to obtain a light spot area and a smear area corresponding to the highlight area.

[0047] In this embodiment, after obtaining the global motion information, the highlight area may be blurred based on the global motion information to obtain a light spot area and a smear area corresponding to the highlight area.

[0048] For example, a Gaussian blur can be applied to the highlight area to create a spot area that matches the global motion information, while a radial blur can be applied to the highlight area to create a smear area that matches the global motion information. Global motion information can be the average horizontal and vertical motion of the pixel along the UV coordinate axis. Therefore, the sampling area used in the blurring process can be adjusted based on the global motion information. The blurring operation is then performed within the adjusted sampling area to create a dynamic blur effect that matches the global motion information.

[0049] Step 104 : superimpose the light spot area and the smear area on the highlight area in the video frame to obtain a target video.

[0050] In this embodiment, after obtaining the spot area and smear area corresponding to the highlight area, the spot area and smear area can be superimposed on the highlight area in the video frame to obtain a processed video frame. A target video is obtained based on all processed video frames corresponding to the video to be processed, so that the target video can present the glossy effect formed by light shining on a smooth surface, and this glossy effect can match the motion of the main content in the video to be processed.

[0051] Optionally, based on any of the above embodiments, the method further includes:

[0052] Determine a noise map corresponding to the highlight area.

[0053] The noise map is superimposed on the highlight area to obtain a halo area corresponding to the highlight area.

[0054] In this embodiment, after the highlight region is extracted, a time-varying noise may be applied to the highlight region in order to make the highlight region present a flowing display effect.

[0055] Optionally, a noise map corresponding to the highlight area may be determined. The noise map may be a Perlin noise map. Alternatively, the noise map may be any other type of noise map, which is not limited in the present disclosure.

[0056] Furthermore, a noise map can be superimposed on the highlight area to obtain the halo area corresponding to the highlight area. Since the highlight area in each video frame is different, superimposing the noise map corresponding to the highlight area on each video frame can make each video frame appear to have a flowing highlight point.

[0057] The video processing method provided in this embodiment can extract the highlight area in the video frame for each video frame in the video to be processed after obtaining the video to be processed. The global motion information corresponding to the video to be processed is determined, and the highlight area is blurred based on the global motion information, so that the light spot area and the trailing shadow area that match the global motion information can be obtained. The light spot area and the trailing shadow area are superimposed on the highlight area in the video frame, so that the processed video frame can present a gloss effect such as metallic gloss and glass gloss formed by light reaching the surface of a smooth object. In addition, by constructing the trailing shadow area based on the global motion information and the highlight area, the light spot area can also move with the movement of the content body in the video frame to produce a trailing effect, thereby further improving the authenticity of the gloss effect.

[0058] FIG2 is a flow chart of a video processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG2 , step 102 includes:

[0059] Step 201: Determine adjacent video frames corresponding to the video frame.

[0060] Step 202: Determine an optical flow map corresponding to the video frame based on the video frame and the adjacent video frames.

[0061] Step 203: Determine the horizontal motion average value and the vertical motion average value corresponding to the optical flow map according to the pixels in the optical flow map.

[0062] Step 204: Determine the average value of the horizontal motion and the average value of the vertical motion as the global motion information.

[0063] In this embodiment, in order to determine the global motion information corresponding to the video frame, an optical flow map corresponding to the video frame may be calculated based on the video frame and its adjacent video frames.

[0064] Optionally, an adjacent video frame corresponding to a video frame may be determined, wherein the adjacent video frame may be a previous video frame or a next video frame of the current video frame, which is not limited in the present disclosure.

[0065] An optical flow map corresponding to a video frame is determined based on the video frame and adjacent video frames. The optical flow calculation between adjacent sequence frames can be implemented using a DIS optical flow method. Alternatively, any other optical flow calculation method can be used to determine an optical flow map corresponding to a video frame based on the video frame and adjacent video frames, and this disclosure does not limit this.

[0066] In the optical flow map, each pixel represents the position uv on the x-axis and y-axis. Therefore, after obtaining the optical flow map, we can calculate the horizontal motion average u and vertical motion average v of the optical flow map. The horizontal motion average and vertical motion average are determined as global motion information.

[0067] The video processing method provided in this embodiment determines the optical flow map corresponding to the video frame based on the video frame and adjacent video frames. Since the optical flow map can represent the motion trend of pixels in the video frame, the global motion information corresponding to the video frame can be accurately determined based on the optical flow map.

[0068] Further, based on any of the above embodiments, step 202 includes:

[0069] The video frame and the adjacent video frames are resized according to preset display parameters to obtain an adjusted video frame and adjacent video frames of the adjusted video frame, wherein the display parameters include a preset resolution and a preset display ratio.

[0070] An optical flow map corresponding to the video frame is determined based on the adjusted video frame and video frames adjacent to the adjusted video frame.

[0071] In this embodiment, during the calculation of the optical flow map, the optical flow between adjacent sequence frames can be calculated based on the DIS optical flow method. Since the overall motion information of the picture needs to be obtained during video processing, the optical flow information can be statistically analyzed at a smaller resolution to reduce the amount of calculation during the optical flow map processing.

[0072] To adjust the video frame, display parameters can be pre-set, including a preset resolution and a preset display ratio. The preset resolution can be smaller than the video frame resolution. By adjusting the preset display ratio, targeted horizontal or vertical motion information can be obtained. For example, the preset display ratio can be 2:1, thereby enabling more targeted horizontal motion information to be obtained.

[0073] Furthermore, the video frame and the adjacent video frames can be resized according to preset display parameters to obtain an adjusted video frame and the adjacent video frames of the adjusted video frame, and an optical flow map corresponding to the video frame can be determined based on the adjusted video frame and the adjacent video frames of the adjusted video frame.

[0074] The video processing method provided in this embodiment pre-sets display parameters, so that the video frame and the adjacent video frames can be resized based on the display parameters to obtain the adjusted video frame and the adjacent video frames of the adjusted video frame. When the optical flow map is performed based on the adjusted video frame and the adjacent video frames of the adjusted video frame, since the resolution of the adjusted video frame and the adjacent video frames of the adjusted video frame is relatively low, the computing power can be effectively saved during the calculation of the optical flow map, thereby improving the video processing efficiency. In addition, by setting a preset display ratio in the preset display parameters, the horizontal or vertical motion information can be more accurately obtained based on the preset display ratio, so that the spot area and the trailing shadow area generated based on the global motion information are more in line with the user's personalized needs.

[0075] Optionally, based on any of the above embodiments, step 103 includes:

[0076] Gaussian blur processing is performed on the highlight area based on the global motion information to obtain a light spot area corresponding to the highlight area.

[0077] A radial blur process is performed on the highlight area based on the global motion information to obtain a smear area corresponding to the highlight area.

[0078] In this embodiment, in order to obtain the spot area and the smear area based on the highlight area, two blur operations may be performed on the highlight area.

[0079] Optionally, Gaussian blur processing can be performed on the highlight area based on global motion information to obtain a spot area corresponding to the highlight area. Radial blur processing can be performed on the highlight area based on global motion information to obtain a smear area corresponding to the highlight area.

[0080] The video processing method provided in this embodiment performs Gaussian blur processing and radial blur processing on the highlight area based on global motion information, thereby obtaining the light spot area and the trailing shadow area corresponding to the highlight area. In addition, the display effects of the light spot area and the trailing shadow area can be matched with the global motion information corresponding to the video frame, thereby improving the realism of the gloss effect.

[0081] FIG3 is a flow chart of a video processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG3 , performing Gaussian blur processing on the highlight area based on the global motion information to obtain a spot area corresponding to the highlight area includes:

[0082] Step 301: Adjust the sampling range corresponding to the Gaussian blur processing according to the global motion information to obtain an adjusted target sampling range.

[0083] Step 302: Perform Gaussian blur processing on the highlight area within the target sampling range to obtain a light spot area corresponding to the highlight area.

[0084] In this embodiment, the global motion information may include a horizontal motion average value U and a vertical motion average value V. After determining the global motion information, the sampling range corresponding to the Gaussian blur process may be adjusted based on the global motion information to obtain an adjusted target sampling range. For example, the X-axis corresponding to the Gaussian blur process may be offset based on the horizontal motion average value U in the global motion information, and the Y-axis corresponding to the Gaussian blur process may be offset based on the vertical motion average value V to obtain the adjusted target sampling range.

[0085] After obtaining the target sampling range, Gaussian blur is applied to the highlight area within the target sampling range to obtain the corresponding spot area. By adjusting the Gaussian blur sampling range based on global motion information, the blurred area can be integrated with the highlight point at a certain angle, improving the authenticity of the spot area.

[0086] The video processing method provided in this embodiment adjusts the sampling range corresponding to the Gaussian blur processing according to the global motion information, performs Gaussian blur processing on the highlight area within the target sampling range, and obtains the light spot area corresponding to the highlight area, thereby being able to blur the highlight image at a dynamic angle, so that the blurred light spot area is merged with the highlight point at a certain angle, creating a stretching effect and improving the authenticity of the light spot.

[0087] Furthermore, based on any of the above embodiments, after step 302, the following steps may be further included:

[0088] The color channel of the light spot area is stretched according to preset adjustment parameters.

[0089] In this embodiment, after the light spot area is obtained based on the highlight area, in order to increase the authenticity of the light spot area, a natural dispersion effect may be presented around the light spot area.

[0090] Optionally, the adjustment parameter may be preset, for example, the adjustment parameter may be [2, 3, 4], or the adjustment parameter may be set by the user according to actual needs, which is not limited in the present disclosure. The RGB color channels of the light spot area are stretched according to the preset adjustment parameters.

[0091] The video processing method provided in this embodiment stretches the color channels of the light spot area according to preset adjustment parameters, thereby being able to stretch the color channels to different degrees so that the processed light spot area presents a natural dispersion effect.

[0092] FIG4 is a flow chart of a video processing method provided by another embodiment of the present disclosure. Based on any of the above embodiments, as shown in FIG4 , radial blurring is performed on the highlight area based on the global motion information to obtain a smear area corresponding to the highlight area, including:

[0093] Step 401: Adjust the sampling range corresponding to the radial blur processing according to the global motion information to obtain an adjusted target sampling range.

[0094] Step 402: Determine the motion angle information and motion amplitude information of the smear area based on the global motion information.

[0095] Step 403: Perform radial blur processing on the highlight area according to the target sampling range, the motion angle information, and the motion amplitude information to obtain the smear area.

[0096] In this embodiment, the global motion information may include a lateral motion average value U and a longitudinal motion average value V. After determining the global motion information, the sampling range corresponding to the radial blur processing may be adjusted based on the global motion information to obtain an adjusted target sampling range. For example, the X-axis corresponding to the radial blur processing may be offset based on the lateral motion average value U in the global motion information, and the Y-axis corresponding to the radial blur processing may be offset based on the longitudinal motion average value V to obtain the adjusted target sampling range.

[0097] Furthermore, the motion angle and amplitude information of the smear region can be determined based on the global motion information. The motion angle of the smear region can be determined based on the ratio of the horizontal motion average value U to the vertical motion average value V on the UV coordinate axis. The motion amplitude information can be determined based on the sum of the horizontal motion average value U and the vertical motion average value V.

[0098] After respectively determining the target sampling range, motion angle information, and motion amplitude information, radial blur processing can be performed on the highlight area based on the above parameters to obtain a smear area.

[0099] The video processing method provided in this embodiment adjusts the sampling range corresponding to the radial blur processing according to the global motion information to obtain the adjusted target sampling range, and determines the motion angle information and motion amplitude information of the trailing shadow area based on the global motion information, so that the highlight area can be radially blurred based on the target sampling range, motion angle information and motion amplitude information to accurately obtain the dynamic trailing shadow area.

[0100] Furthermore, based on any of the above embodiments, after step 402, the following steps may be further included:

[0101] A historical smear angle corresponding to a previous adjacent video frame associated with the video frame is determined.

[0102] A current smear angle corresponding to the video frame is determined based on the historical smear angles, preset parameters, the angle information, and a preset stabilization algorithm.

[0103] In this embodiment, when generating an optical flow map based on the current video frame and migrating adjacent video frames, errors may occur, resulting in timing discontinuities. This may cause the angle of the smear area to jump, affecting the display quality of the smear area. Therefore, to improve the stability of the smear area, a stabilization algorithm and preset parameters can be pre-set.

[0104] Optionally, a historical smear angle corresponding to a previous adjacent video frame associated with the video frame may be determined, and a current smear angle corresponding to the video frame may be determined based on the historical smear angle, preset parameters, angle information, and a preset stabilization algorithm.

[0105] Here, a first product of the historical smear angle and a preset parameter, and a second product of the current smear, a preset value, and a difference between the preset parameters can be determined, and the sum of the first product and the second product is used as the current smear angle.

[0106] The video processing method provided in this embodiment pre-sets a stabilization algorithm and preset parameters, so that the current drag angle corresponding to the video frame can be determined based on the historical drag angle, preset parameters, angle information and the preset stabilization algorithm, effectively avoiding the problems of timing discontinuity and drag angle jumps caused by errors in the generation of the optical flow map, thereby further improving the accuracy and stability of video processing.

[0107] Figure 5 is a structural diagram of a video processing device provided by an embodiment of the present disclosure. As shown in Figure 5, the device includes: an acquisition module 51, a determination module 52, a processing module 53 and a synthesis module 54. The acquisition module 51 is used to acquire the video to be processed. The determination module 52 is used to extract the highlight area in the video frame to be processed, and determine the global motion information corresponding to the video frame, wherein the global motion information includes the motion information corresponding to the pixel points in the video frame. The processing module 53 is used to blur the highlight area based on the global motion information to obtain the light spot area and the smear area corresponding to the highlight area. The synthesis module 54 is used to superimpose the light spot area and the smear area on the highlight area in the video frame to obtain the target video.

[0108] Furthermore, based on any of the above embodiments, the determination module is configured to: determine adjacent video frames corresponding to the video frame; determine an optical flow map corresponding to the video frame based on the video frame and the adjacent video frames; determine a horizontal motion average and a vertical motion average corresponding to the optical flow map based on pixels in the optical flow map; and determine the horizontal motion average and the vertical motion average as the global motion information.

[0109] Further, based on any of the above embodiments, the determining module is configured to: resize the video frame and the adjacent video frames according to preset display parameters to obtain an adjusted video frame and adjacent video frames of the adjusted video frame, wherein the display parameters include a preset resolution and a preset display ratio; and determine an optical flow map corresponding to the video frame based on the adjusted video frame and the adjacent video frames of the adjusted video frame.

[0110] Furthermore, based on any of the above embodiments, the processing module is configured to: perform Gaussian blur processing on the highlight area based on the global motion information to obtain a spot area corresponding to the highlight area; and perform radial blur processing on the highlight area based on the global motion information to obtain a smear area corresponding to the highlight area.

[0111] Furthermore, based on any of the above embodiments, the processing module is configured to adjust a sampling range corresponding to the Gaussian blur processing based on the global motion information to obtain an adjusted target sampling range, and perform Gaussian blur processing on the highlight area within the target sampling range to obtain a light spot area corresponding to the highlight area.

[0112] Furthermore, based on any of the above embodiments, the processing module is configured to perform stretching processing on the color channel of the light spot area according to preset adjustment parameters.

[0113] Furthermore, based on any of the above embodiments, the processing module is configured to: adjust a sampling range corresponding to the radial blur processing based on the global motion information to obtain an adjusted target sampling range; determine motion angle information and motion amplitude information of the smear region based on the global motion information; and perform radial blur processing on the highlight region based on the target sampling range, the motion angle information, and the motion amplitude information to obtain the smear region.

[0114] Furthermore, based on any of the above embodiments, the processing module is configured to determine a historical smear angle corresponding to a previous adjacent video frame associated with the video frame, and determine a current smear angle corresponding to the video frame based on the historical smear angle, preset parameters, the angle information, and a preset stabilization algorithm.

[0115] Furthermore, based on any of the above embodiments, the apparatus further comprises: a determination module configured to determine a noise map corresponding to the highlight region; and an overlay module configured to overlay the noise map on the highlight region to obtain a halo region corresponding to the highlight region.

[0116] The device provided in this embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0117] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the video processing method described in any of the above embodiments is implemented.

[0118] In order to implement the above embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the video processing method as described in any of the above embodiments when executed by a processor.

[0119] In order to implement the above embodiment, the present disclosure further provides an electronic device, including: a processor and a memory;

[0120] The memory stores computer-executable instructions;

[0121] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the video processing method as described in any of the above embodiments.

[0122] FIG6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. The electronic device 600 may be a terminal device or a server. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (e.g., vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG6 is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.

[0123] As shown in Figure 6, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0124] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 shows an electronic device 600 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0125] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0126] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0127] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0128] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0129] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0132] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0133] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0134] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0135] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0136] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A video processing method, comprising: Obtaining a video to be processed; For a video frame in the video to be processed, extracting a highlight area in the video frame and determining global motion information corresponding to the video frame, where the global motion information includes motion information corresponding to pixel points in the video frame; Performing blurring processing on the highlight area based on the global motion information to obtain a light spot area and a smear area corresponding to the highlight area; Overlaying the light spot area and the smear area on the highlight area in the video frame to obtain a target video.

2. The video processing method according to claim 1, wherein, The determining the global motion information corresponding to the video frame includes: Determining an adjacent video frame corresponding to the video frame; Determining an optical flow map corresponding to the video frame based on the video frame and the adjacent video frame; Determining a horizontal motion average value and a vertical motion average value corresponding to the optical flow map according to pixels in the optical flow map; Determining the horizontal motion average value and the vertical motion average value as the global motion information.

3. The video processing method according to claim 2, wherein, The determining the optical flow map corresponding to the video frame based on the video frame and the adjacent video frame includes: Performing a size adjustment operation on the video frame and the adjacent video frame according to preset display parameters to obtain an adjusted video frame and an adjusted adjacent video frame of the video frame, where the display parameters include a preset resolution and a preset display ratio; Determining an optical flow map corresponding to the video frame based on the adjusted video frame and the adjusted adjacent video frame of the video frame.

4. The video processing method according to any one of claims 1-3, wherein, The performing blurring processing on the highlight area based on the global motion information to obtain a light spot area and a smear area corresponding to the highlight area includes: Performing Gaussian blurring processing on the highlight area based on the global motion information to obtain a light spot area corresponding to the highlight area; Performing radial blurring processing on the highlight area based on the global motion information to obtain a smear area corresponding to the highlight area.

5. The video processing method according to claim 4, wherein, The performing Gaussian blurring processing on the highlight area based on the global motion information to obtain a light spot area corresponding to the highlight area includes: Adjusting a sampling range corresponding to the Gaussian blurring processing according to the global motion information to obtain an adjusted target sampling range; Performing Gaussian blurring processing on the highlight area within the target sampling range to obtain a light spot area corresponding to the highlight area.

6. The video processing method according to claim 5, wherein, After performing Gaussian blurring processing on the processed highlight area within the target sampling range to obtain a light spot area corresponding to the highlight area, further comprising: Stretching a color channel of the light spot area according to preset adjustment parameters.

7. The video processing method according to claim 4, wherein, The performing radial blurring processing on the highlight area based on the global motion information to obtain a smear area corresponding to the highlight area includes: Adjusting a sampling range corresponding to the radial blurring processing according to the global motion information to obtain an adjusted target sampling range; Determining motion angle information and motion amplitude information of the smear area based on the global motion information; Performing radial blurring processing on the highlight area according to the target sampling range, the motion angle information, and the motion amplitude information to obtain the smear area.

8. The video processing method according to claim 7, wherein, After determining the angular information and amplitude information of the smear area based on the global motion information, the following steps are further included: Determine the historical smear angle corresponding to the previous adjacent video frame associated with the video frame; Based on the historical smear angle, preset parameters, the angular information, and a preset stabilization algorithm, determine the current smear angle corresponding to the video frame.

9. The video processing method according to any one of claims 1-8, further comprising: Determine the noise map corresponding to the highlight area; Overlay the noise map on the highlight area to obtain the halo area corresponding to the highlight area.

10. A video processing device, comprising: An acquisition module configured to acquire a video to be processed; A determination module configured to, for a video frame in the video to be processed, extract the highlight area in the video frame and determine the global motion information corresponding to the video frame, where the global motion information includes the motion information corresponding to the pixel points in the video frame; A processing module configured to perform blurring processing on the highlight area based on the global motion information to obtain a light spot area and a smear area corresponding to the highlight area; A synthesis module configured to overlay the light spot area and the smear area on the highlight area in the video frame to obtain a target video.

11. An electronic device, comprising: A processor and a memory; wherein, The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, such that the processor executes the video processing method according to any one of claims 1 to 9.

12. A computer-readable storage medium, wherein, Computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the video processing method according to any one of claims 1 to 9 is implemented.

13. A computer program product, comprising a computer program, wherein, When the computer program is executed by the processor, the video processing method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Image light spot adding method and device

    CN112561777A

  • Image processing method, computer program product, electronic device and storage medium

    CN114827706A

  • Image forming system and information storage medium

    JP2004005563A

  • Image processing device and image processing method

    JP2023039331A

  • Method for enhancing brightness of a multimedia content, corresponding computer program product and device

    WO2018077871A1