Video processing method, device, electronic device and computer storage medium

By determining the processing weight according to the target object consistency information of the video frame image and the video clip during video processing, and performing image enhancement adjustment processing, the problem of spatiotemporal consistency between video frames is solved and the visual effect of the video is improved.

CN113298723BActive Publication Date: 2024-10-15YOUKU CULTURE TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010654037.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-08
Publication Date
2024-10-15
Estimated Expiration
2040-07-08

AI Technical Summary

Technical Problem

Existing video processing methods process single-frame images during image enhancement, resulting in spatio-temporal consistency problems between video frames, resulting in flickering of brightness or color, affecting visual effects.

Method used

By determining the first processing weight based on the consistency information of the target object in the video frame image to be processed and the target object in the video clip, and determining the second processing weight based on the correlation between the first processing weight and other video frame images, the The video frame image is subjected to image enhancement and adjustment processing to ensure the gradient and smoothness of the processing result.

Benefits of technology

It effectively reduces the visual flicker between video frames and improves the spatiotemporal consistency and visual effects of the video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113298723B_ABST
    Figure CN113298723B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a video processing method, device, electronic device and computer storage medium, wherein the video processing method includes: determining a first processing weight for the video frame image to be processed based on consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has undergone image enhancement preprocessing; determining a second processing weight for other video frame images in the video segment except the video frame image to be processed based on the first processing weight; and performing image enhancement adjustment processing on the video frame image to be processed based on the first processing weight and the second processing weight. Through the embodiment of the present invention, the spatiotemporal consistency of video processing is enhanced, and the visual effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a video processing method, device, electronic device and computer storage medium. Background Art

[0002] With the development of multimedia technology, various multimedia contents have penetrated into people's work and life, and video is a multimedia form widely used by people.

[0003] In order to improve the display effect of the video, some image enhancement methods are usually applied to process the video and improve the video quality. A common method is to enhance the image by adjusting the histogram of each frame in the video. However, most of these image enhancement methods are for processing single-frame images. Since human vision is very sensitive to the spatiotemporal consistency of the video, these methods will cause serious spatiotemporal consistency problems when directly applied to video processing, that is, the flickering of brightness or color between consecutive frames will cause visual discomfort.

[0004] Therefore, how to improve this problem, ensure the visual consistency of video frames in time and space, and avoid or reduce visual flickering of brightness or color has become an issue that needs to be solved urgently. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a video processing solution to at least partially solve the above problems.

[0006] According to a first aspect of an embodiment of the present invention, a video processing method is provided, comprising: determining a first processing weight for the video frame image to be processed based on consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has undergone image enhancement preprocessing; determining a second processing weight for other video frame images in the video segment except the video frame image to be processed based on the first processing weight; and performing image enhancement adjustment processing on the video frame image to be processed based on the first processing weight and the second processing weight.

[0007] According to a second aspect of an embodiment of the present invention, a video processing device is provided, comprising: a first determination module, used to determine a first processing weight for the video frame image to be processed based on consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has undergone image enhancement preprocessing; a second determination module, used to determine a second processing weight for other video frame images in the video segment except the video frame image to be processed based on the first processing weight; and a processing module, used to perform image enhancement adjustment processing on the video frame image to be processed based on the first processing weight and the second processing weight.

[0008] According to a third aspect of an embodiment of the present invention, an electronic device is provided, comprising: a processor, for determining a first processing weight for the video frame image to be processed based on consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has undergone image enhancement preprocessing; determining a second processing weight for other video frame images in the video segment except the video frame image to be processed according to the first processing weight; performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight; and a display, for displaying the video frame image after the image enhancement adjustment processing.

[0009] According to a fourth aspect of an embodiment of the present invention, there is provided a computer storage medium on which a computer program is stored. When the program is executed by a processor, the video processing method as described in the first aspect is implemented.

[0010] According to the video processing scheme provided by the embodiment of the present invention, for a frame image in a video clip that has undergone image enhancement preprocessing, that is, the video frame image to be processed, since the preprocessing only focuses on the single frame image itself, a spatiotemporal consistency problem will arise. To solve this problem, in the video processing scheme of the embodiment of the present invention, on the one hand, a first processing weight will be determined for the video frame image to be processed based on the consistency information of the target object in the video frame image to be processed and the target object in the video clip to which the video frame image belongs, such as whether they both contain the same target object, so as to use the first processing weight as a consideration factor for the subsequent processing degree of the video frame image to be processed; on the other hand, since the video frame image to be processed and the other video frame images belong to the same video clip, that is, the other video frame images may be the previous and next frame images of the video frame image to be processed, it can be seen that there is a strong correlation between the video frame image to be processed and the other video frame images. Taking the first processing weight corresponding to the video frame image to be processed as a benchmark, the corresponding second processing weight is determined for other video frame images, and the correlation between the temporally adjacent previous and next video frame image sequences is fully considered, so that the setting of the second processing weight is more reasonable. Furthermore, the video frame image to be processed is subjected to image enhancement adjustment processing based on the first processing weight and the second processing weight, so that the image enhancement of the adjusted video frame image to be processed fully considers the effect of the image enhancement preprocessing of the previous and next video frame images, so that the image enhancement effect of the video frame image to be processed obtained after the adjustment is gradual and smooth, which reduces the visual flicker of continuous video frame images, enhances the temporal and spatial consistency of video processing, and improves the visual effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0012] Figure 1A is a flowchart of a video processing method according to Embodiment 1 of the present invention;

[0013] Figure 1B for Figure 1A A schematic diagram of an example scenario in the illustrated embodiment;

[0014] Figure 2A is a flowchart of a video processing method according to Embodiment 2 of the present invention;

[0015] Figure 2B for Figure 2AA schematic diagram of an example scenario in the illustrated embodiment;

[0016] Figure 3 is a structural block diagram of a video processing device according to Embodiment 3 of the present invention;

[0017] Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device according to Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0018] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in the field based on the embodiments in the embodiments of the present invention should fall within the scope of protection of the embodiments of the present invention.

[0019] Image enhancement is a technology that enhances the useful information in an image to improve the visual effect of the image. When image enhancement is applied to a video, it can also improve the visual effect of the video frame image in the video. However, the current image enhancement processing performed on the video is a separate processing for each video frame image, that is, the image enhancement processing is performed only based on the image information of the current video frame image. However, a video is usually a continuous sequence of video frame images, and it needs to maintain strong spatiotemporal consistency in visual presentation, that is, temporal domain consistency and spatial domain consistency, to ensure the continuity and coherence of the visual presentation of the video. Because each video frame image is different, the effect after image enhancement processing is also different, which inevitably leads to flickering such as brightness or color when the video is played, causing visual discomfort to the user. To this end, an embodiment of the present invention provides a video processing solution to solve this problem.

[0020] The specific implementation of the embodiment of the present invention is further described below in conjunction with the embodiment of the present invention and the accompanying drawings.

[0021] Embodiment 1

[0022] Reference Figure 1A , shows a step flow chart of a video processing method according to embodiment 1 of the present invention.

[0023] The video processing method of this embodiment includes the following steps:

[0024] Step S102: determining a first processing weight for the video frame image to be processed according to consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs.

[0025] The video frame image in the video clip is an image that has been preprocessed with image enhancement. Since the video frame image to be processed is also a frame image in the video clip, the video frame image to be processed is also an image that has been preprocessed with image enhancement.

[0026] In the embodiment of the present invention, image enhancement preprocessing means that the image has been subjected to image enhancement processing, but the result of the image enhancement processing is not the final result and needs to be adjusted later. Therefore, the image enhancement processing is called image enhancement preprocessing. The specific implementation method of the image enhancement preprocessing can be implemented by those skilled in the art in any appropriate manner according to actual needs, and the embodiment of the present invention does not limit this. For example, histogram enhancement algorithm, denoising algorithm, etc.

[0027] The consistency information of the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs is used to indicate whether the two contain the same target object. For example, if the video frame image to be processed contains a certain target object and the video segment to which the video frame image belongs also contains the target object, the consistency information of the target object will indicate that the target objects are consistent; otherwise, it will indicate that the target objects are inconsistent. The judgment of whether the video segment contains the target object can be implemented in an appropriate manner. For example, if most of the video frame images in the video segment contain the target object, the video segment is considered to contain the target object; otherwise, the video segment is considered not to contain the target object, and so on.

[0028] Furthermore, the first processing weight corresponding to the video frame image to be processed can be determined based on the consistency information of the target object, wherein the first processing weight is used to indicate the degree of importance of the video frame image in the subsequent image enhancement adjustment process. For each video frame image in the video clip, there is a current processing weight. Initially, the current processing weight is a preset initial processing weight. If the consistency information of the target object indicates that the target object is consistent, the current processing weight increases; if the consistency information of the target object indicates that the target object is inconsistent, the current processing weight decreases. Thus, the first processing weight of the video frame image to be processed is formed.

[0029] Step S104: determining second processing weights of other video frame images in the video segment except the video frame image to be processed according to the first processing weight.

[0030] The sum of the processing weights of all the video frame images in the video clip is a set threshold value, such as 1. Based on this, after the first processing weight is determined, the processing weight determination process can be performed on other video frame images except the video frame image to be processed.

[0031] It should be noted that, in the embodiments of the present invention, "first", "second", etc. are used to distinguish different data or objects, and do not indicate a time sequence or size relationship. In addition, in the embodiments of the present invention, each of the other video frame images has a processing weight, collectively referred to as a second processing weight. The second processing weights of different video frame images may be the same, or different, or may be partially the same and partially different.

[0032] The other video frame images and the video frame images to be processed all belong to the same video segment, and they are the previous frame, or the next frame, or the previous and next frames of the video frame images to be processed, that is, they have a temporal relationship, and because they belong to the same video segment, they also have a strong content relevance. Based on this, when specifically determining the second processing weight, the second processing weight can be determined in any appropriate manner based on the temporal relationship and / or content relevance between the other video frame images and the video frame images to be processed. For example, the closer the temporal sequence, the greater the processing weight, and / or the stronger the content relevance, the greater the processing weight, and so on. It can be seen that the second processing weight is a weight determined after fully considering the relationship between each image in the other video frame images and the video frame images to be processed.

[0033] Step S106: performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight.

[0034] After determining the first processing weight and the second processing weight, the video frame image to be processed can be subjected to image enhancement adjustment processing. Since the second processing weight can reflect the relationship between the other video frame images and the video frame image to be processed, the adjustment processing of the video frame image to be processed can fully consider the overall situation of the video clip and the relationship with each other video frame image, so that the transition between the video frame image to be processed and other video frame images after the enhanced adjustment processing is smoother and more natural, effectively ensuring the visual consistency of the video frame in time and space, and avoiding or reducing the visual flicker of brightness or color.

[0035] The following is an example of a specific scenario to illustrate the above process. Figure 1B shown.

[0036] In this example, it is assumed that video segment A contains five video frame images, namely A1, A2, A3, A4 and A5. The video frame image to be processed is set to be A3, which contains the target object X (shown as a tree pattern in the figure), the initial processing weight is 0.3, and the effect data after image enhancement preprocessing, such as image histogram statistics, is Y3. If A2 and A4 also contain the target object X, that is, three of the five frames contain the target object X, then the video segment A contains the target object X. Then set the initial processing weights of A1, A2, A4 and A5 to 0.2, 0.2, 0.2, 0.1 respectively, the sum of the processing weights of all video frame images of video segment A is 1, and the effect data after image enhancement preprocessing, such as image histogram statistics, are Y1, Y2, Y4 and Y5 respectively.

[0037] Based on the above settings, first, obtain the information that A3 contains the target object X, and the information that the video clip A contains the target object X; compare the two and judge that they are consistent; then adjust the initial processing weight of A3 according to appropriate rules or step sizes (set by technicians in this field according to actual needs), such as increasing from 0.3 to 0.5. At this time, it is necessary to adjust the processing weights of other video frame images except A3, namely A1, A2, A4 and A5, and the total processing weight of A1, A2, A4 and A5 is 1-0.5=0.5 at this time. In this example, it is assumed that the adjustment is made according to the temporal relationship with A3. The farther the temporal distance from A3, the smaller the weight. Then, it is feasible that the adjusted processing weights of A1, A2, A4 and A5 are adjusted to 0.1, 0.2, 0.1, 0.1 respectively. Based on this, the value of (0.1*Y1+0.2*Y2+0.5*Y3+0.1*Y4+0.1*Y5) / 5 can be calculated, and the Y3 value corresponding to A3 is adjusted to the calculated value to achieve the final image enhancement processing of A3. It can be seen that the calculated value takes into account the situation of all video frame images in video segment A that are associated with A3, and the determination process of the processing weight 0.5 corresponding to A3 also fully considers the consistency relationship between A3 and video segment A, that is, whether both contain the target object X, instead of only performing image enhancement based on the image data of A3 itself, so that the final image enhancement processing effect of A3 can effectively take into account image enhancement and video spatiotemporal consistency, and the transition between video frame images is smooth and natural, which improves the user viewing experience.

[0038] Through this embodiment, for a frame image in a video clip that has undergone image enhancement preprocessing, that is, the video frame image to be processed, since the preprocessing only focuses on the single frame image itself, a spatiotemporal consistency problem will arise. To solve this problem, in the video processing method of this embodiment, on the one hand, a first processing weight will be determined for the video frame image to be processed based on the consistency information of the target object in the video frame image to be processed and the target object in the video clip to which the video frame image belongs, such as whether they both contain the same target object, so as to use the first processing weight as a consideration factor for the subsequent processing degree of the video frame image to be processed; on the other hand, since the video frame image to be processed and the other video frame images belong to the same video clip, that is, the other video frame images may be the previous and next frame images of the video frame image to be processed, it can be seen that there is a strong correlation between the video frame image to be processed and the other video frame images. Taking the first processing weight corresponding to the video frame image to be processed as a benchmark, the corresponding second processing weight is determined for other video frame images, and the correlation between the temporally adjacent previous and next video frame image sequences is fully considered, so that the setting of the second processing weight is more reasonable. Furthermore, the video frame image to be processed is subjected to image enhancement adjustment processing based on the first processing weight and the second processing weight, so that the image enhancement of the adjusted video frame image to be processed fully considers the effect of the image enhancement preprocessing of the previous and next video frame images, so that the image enhancement effect of the video frame image to be processed obtained after the adjustment is gradual and smooth, which reduces the visual flicker of continuous video frame images, enhances the temporal and spatial consistency of video processing, and improves the visual effect.

[0039] The video processing method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: a server, a mobile terminal (such as a mobile phone, a PAD, etc.) and a PC, etc.

[0040] Embodiment 2

[0041] Reference Figure 2A , shows a step flow chart of a video processing method according to embodiment 2 of the present invention.

[0042] The video processing method of this embodiment includes the following steps:

[0043] Step S202: Determine the video frame images and video segments to be processed.

[0044] When performing video processing according to the embodiment of the present invention, scene detection may be performed on the video first. Through scene detection, different scene segments in the video may be obtained. The video frame images in each scene segment reflect the scene content of the same scene. The scene segments obtained by scene detection provide a basis for obtaining subsequent video segments. The scene detection method may be appropriately set by those skilled in the art according to actual conditions. For example, a pixel-based scene detection method may be used, or a scene detection method using a deep learning neural network model based on semantics or image understanding may be used, etc. The embodiment of the present invention does not limit this.

[0045] Based on the obtained scene segments, in a feasible method, a scene segment to be processed can be determined from at least one scene segment obtained by performing scene detection on a target video; the scene segment to be processed can be divided into at least one video segment using a sliding window of a preset size; image enhancement preprocessing is performed on the video frame image in at least one video segment; the video segment to be processed is determined from at least one video segment that has undergone image enhancement preprocessing; and the video frame image to be processed is determined from the video segment to be processed.

[0046] The preset size of the sliding window can be appropriately set by those skilled in the art according to actual conditions, and in one feasible manner, can be set to 5-10, and optionally, can be 11. The specific implementation means of the image enhancement preprocessing can also be appropriately selected by those skilled in the art according to actual conditions, and the embodiment of the present invention does not limit this.

[0047] By dividing the video clips through sliding windows, the inter-frame connection of the video frame images in the video clips is established, so that the image enhancement adjustment processing of the video frame images to be processed subsequently can fully consider the overall information of the video clip to which it is located, as well as the information of other video frame images associated with it, providing an accurate information reference range for the adjustment processing.

[0048] The video processing solution provided in the embodiment of the present invention can be applied to terminal devices and cloud devices. Therefore, in one feasible manner, when the video processing solution is deployed in the cloud, the cloud can receive the video uploaded to the cloud by the user, and determine the video frame image to be processed and the video segment to which the video frame image belongs from the video. For example, according to the aforementioned method, the video frame image to be processed and the video segment to which the video frame image belongs are obtained from the video uploaded to the cloud by the user. Deploying the video processing solution in the cloud can not only enable the video processing solution to be shared by multiple terminal devices, thereby improving the use efficiency of the video processing solution, but also reduce the performance requirements for the terminal devices and reduce the cost of the terminal devices.

[0049] In another feasible manner, when the video processing solution is deployed in a terminal device, the terminal device can receive the game video stream sent from the cloud, and determine the video frame image to be processed and the video segment to which the video frame image belongs from the game video stream. For example, according to the aforementioned method, the video frame image to be processed and the video segment to which the video frame image belongs are obtained from the game video stream. In this way, the game video stream can be processed to improve the gaming experience.

[0050] Step S204: obtaining target object information of the video frame image to be processed and target object information of the video clip.

[0051] For example, target object detection is performed on a plurality of video frame images included in the video clip, wherein the plurality of video frame images include the video frame image to be processed; and according to the detection result, the first target object information corresponding to the video frame image to be processed and the second target object information corresponding to the video clip are respectively determined. The first target object information and the second target object information are both used to indicate whether a target object exists. When the video clips are different, the target objects corresponding to them may also be different. For a video clip, the target object may be one or more (two or more). Generally speaking, the content relevance of the video frame images in a video clip is stronger. If the video clip is mainly related to a certain target object, then part or all of its video frame images may contain the information of the target object; on the contrary, if it is not related to the target object, then only a few video frame images may contain the information of the target object. Through the target object information, the consistency between the video frame image to be processed and the overall content of the video clip can be determined as a whole.

[0052] Among them, optionally, when determining the second target object information corresponding to the video clip according to the detection result, the number of video frame images containing the target object in the video clip can be determined according to the detection result; the second target object information corresponding to the video clip is determined according to the proportional relationship between the number of video frame images containing the target object and the number of multiple video frame images in the video clip. For example, if a video clip contains five video frame images, three or more of which contain the same target object, taking three as an example, 3 / 5>0.5, that is, the video frame images containing the target object occupy the majority, then it can be considered that the video clip contains the target object, and accordingly, the second target object information can be implemented as information indicating that the video clip contains the target object. For example, the video clip contains the target object by using a Boolean value or setting symbols, letters, numbers, etc. In this way, it can be effectively characterized whether the video clip is mainly related to the target object, and the second target object information can be determined with high efficiency, simple implementation, and low implementation cost.

[0053] In an optional manner, before this step S204, the information of at least one candidate object in the video clip may also be displayed; a selection operation on the information of the at least one candidate object is received, and the target object is determined based on the information of the candidate object operated by the selection operation. There may be one or more candidate objects in the video clip, and the information of the one candidate object may be displayed, or the information of some or all of the multiple candidate objects may be displayed. The information of the candidate object may be displayed in any appropriate manner, including but not limited to text information, image, or icon, etc. The user may select the information of the displayed candidate objects, and the selected one or more candidate objects are the target objects. In this way, the user's participation is improved, and the result of video processing is more in line with the actual needs of the user, thereby improving the user experience.

[0054] Step S206: performing image enhancement preprocessing on the video frame images in the video clip.

[0055] First, it should be noted that in practical applications, step S206 and step S204 may be executed in any appropriate order or in parallel.

[0056] In this step, since the video frame image to be processed also belongs to the video segment, performing image enhancement preprocessing on the video frame image in the video segment also includes image enhancement preprocessing on the video frame image to be processed. As mentioned above, those skilled in the art can implement the image enhancement preprocessing of this step in any appropriate manner.

[0057] In addition, since the image enhancement preprocessing in this step is for single-frame image preprocessing, the preprocessing is performed only based on the information of the current image, without considering the information of other video frame images in the same video clip. For example, the contrast and color of each video frame image in the video clip can be adjusted to improve the image quality.

[0058] However, as mentioned above, the preprocessing is based on single-frame image information and cannot combine the temporal and spatial information of the previous and next frame image sequences in the video, which can easily lead to the problem of temporal and spatial inconsistency. In addition, if the target object is missed or misdetected in step S204, the preprocessing cannot visually compensate or adjust it, so that a good video frame image enhancement effect cannot be achieved. For this reason, it is necessary to further perform the following steps in this embodiment.

[0059] Step S208: determining a first processing weight for the video frame image to be processed according to consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs.

[0060] The video frame images in the video clips are all images that have undergone image enhancement preprocessing.

[0061] In one feasible method, this step can be implemented as follows: obtaining the first target object information corresponding to the video frame image to be processed, and the second target object information corresponding to the video segment to which the video frame image to be processed belongs; determining whether the first target object information and the second target object information are consistent; if they are consistent, performing a weight increase process based on the current processing weight of the video frame image to be processed; if they are inconsistent, performing a weight reduction process based on the current processing weight of the video frame image to be processed.

[0062] As mentioned above, both the first target object information and the second target object information are used to indicate whether there is a target object. In this step, the target object information of the video frame image to be processed obtained in step S204 can be directly used as the first target object information, and the target object information of the video clip obtained in step S204 is the second target object information. Then, compare whether the two are consistent. If they are consistent, it means that the content of the video frame image to be processed is relatively consistent with the overall content of the video clip, and the correlation is strong. Then, the weight increase processing can be performed based on the current processing weight of the video frame image to be processed; otherwise, if they are inconsistent, the weight reduction processing is performed based on the current processing weight of the video frame image to be processed. The current processing weight is the set initial processing weight at the beginning, and the specific weight value can be appropriately set by those skilled in the art according to the actual situation. Optionally, the sum of the processing weights of the video frame images in a video clip can be 1.

[0063] For example, the second target object information of the video clip is set to alpha, which is used to characterize whether there is a target object such as a face in the video clip. Alpha is the ratio of the number of video frame images in which the target object is detected in the video clip to the number of all video frame images in the video clip. The weight enhancement coefficient (also called weight increase coefficient) is set as follows: r1 = 1 + |alpha-(1-alpha)| = 1 + |2*alpha-1|; the weight attenuation coefficient (also called weight reduction coefficient) is set as follows: r2 = 1-0.5*|2*alpha-1|. Then, if the first target object information is consistent with the second target object information, the weight of the video frame image to be processed can be increased using the formula c_w = C*r1; if they are inconsistent, the weight of the video frame image to be processed can be reduced using the formula c_w = C*r2. Wherein, C is a set value, such as a preset empirical value. Optionally, C is a value between [0.2, 0.4].

[0064] Through this step, based on the relationship between the video frame image to be processed and the target object information of the entire video segment, an appropriate processing weight, ie, the first processing weight, is determined for the video frame image to be processed.

[0065] In addition, in order to improve the efficiency of video processing, in a feasible manner, the video frame image to be processed can also be a key video frame image in the video clip, that is, an I frame image. The key video frame image has key and complete image information that affects the video presentation. The processing of the key video frame image can also affect the non-key frame video images associated with it, such as B frame or P frame video frame images, which can not only achieve the video processing effect of the embodiment of the present invention, but also reduce the video frame images that need to be processed, thereby improving the speed and efficiency of video processing.

[0066] For a video clip, each video frame image in it needs to be processed by the video processing of the embodiment of the present invention, that is, in the video processing process of a video clip, the video frame image to be processed is changing. Generally speaking, the current video frame image is the video frame image to be processed, but after the video processing of the current video frame image is completed, the next video frame image of the current video frame image becomes the video frame image to be processed and also becomes the new current video frame image. It can also be seen that if video processing is only performed on the key video frame images in the video clip, the video processing speed and efficiency can be improved.

[0067] Step S210: determining, according to the first processing weight, second processing weights of other video frame images in the video segment except the video frame image to be processed.

[0068] As mentioned above, a video frame image in a video clip corresponds to a sum of processing weights. After determining the first processing weight, a second processing weight can be determined for the other video frame images, and each image in the other video frame images has a second processing weight. That is, the other video frame images include multiple, and the corresponding second processing weights also include multiple, and the multiple second processing weights may be the same, different, or partly the same and partly different.

[0069] In a feasible manner, this step can be implemented as follows: according to the first processing weight, the total processing weight is assigned to the other video frame images in the video clip except the video frame image to be processed; according to the target object information in the other video frame images and / or the position distance with the video frame image to be processed, and the total processing weight, the second processing weight is assigned to the multiple images included in the other video frame images. In this way, the relationship between the other video frame images and the entire video clip and the relationship with the video frame image to be processed are fully considered, so that the rationality of the second processing weight determined for them and the smooth transition with the video frame image to be processed can be guaranteed.

[0070] For example, the first processing weight of the video frame image to be processed is c_w, the sum of the processing weights of the subsequent video frame images (one or more) of the video frame image to be processed is n_w=0.5*(1-c_w)*MIN(1,N2 / N1), and the sum of the processing weights of the preceding video frame images (one or more) is p_w=1-c_w-n_w. Wherein, N1 represents the number of preceding video frame images of the video frame image to be processed, and N2 represents the number of subsequent video frame images of the video frame image to be processed. The preceding video frame image and the subsequent video frame image are the other video frame images in the video clip except the video frame image to be processed.

[0071] Furthermore, for a certain frame in the preceding video frame image or the succeeding video frame image, calculate its distance D from the video frame image to be processed: 1~N (N is N1-when the frame is the preceding video frame image, or N2-when the frame is the succeeding video frame image); if the target object information of the frame is consistent with the target object information of the video clip, then assign its coefficient: s=(N+1-D) / N*r1; otherwise, s=(N+1-D) / N. To ensure the rationality of the total weight, optionally, the above coefficient s can be normalized to obtain the corresponding coefficient s', and then calculate the second processing weight of each frame image in the preceding video frame image or the succeeding video frame image, such as s_w=s'*w, where s_w represents the second processing weight; s' is the normalized coefficient; if the current video frame image is the preceding video frame image, then w=p_w; if the current video frame image is the succeeding video frame image, then w=n_w. As described in step S208, r1=1+|alpha-(1-alpha)|=1+|2*alpha-1|.

[0072] Step S212: performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight.

[0073] In a feasible manner, this step can be implemented as follows: weighted averaging the first processing weight and a plurality of second processing weights corresponding to the other video frame images; and performing image enhancement adjustment processing on the video frame image to be processed according to the weighted averaging result. This ensures that the visual effects of the video frame image to be processed and other video frame images are smoothly transitioned after image enhancement adjustment processing, and achieves visual consistency in time and space between video frames.

[0074] However, it is not limited to this. In a feasible manner, before the image enhancement adjustment processing is performed on the video frame image to be processed according to the first processing weight and the second processing weight, the first processing weight and the second processing weight can also be displayed, and the weight adjustment operation of at least one of the displayed first processing weight and the second processing weight can be received; then, according to the first processing weight and the second processing weight after the weight adjustment operation, the video frame image to be processed is subjected to image enhancement adjustment processing. In this manner, part or all of the first processing weight and the second processing weight can be displayed to the user through an appropriate display interface, and the user's adjustment operation on the displayed processing weight can be received; then, according to the adjusted processing weight (which may be the adjusted first processing weight and the original second processing weight, or, it may be the original first processing weight and the adjusted second processing weight, or, it may be the adjusted first processing weight and the adjusted second processing weight), the video frame image to be processed is subjected to image enhancement adjustment processing. In this way, the user can participate in the process of image enhancement adjustment processing, so as to adjust or correct the machine processing results manually, so that the spatiotemporal consistency of the video frame image after the image enhancement adjustment processing is better and more in line with user needs.

[0075] The above process is illustrated below with an actual example. Figure 2B shown.

[0076] In this example, the target object is a human face. The process includes:

[0077] First, perform scene detection on the target video to obtain multiple scene clips. In this example, five scene clips are set. Scene detection is to distinguish different scenes in the target video. The video frame images in each scene clip have a high degree of similarity, and strong temporal and spatial consistency needs to be maintained in visual presentation. The scene clips obtained by scene detection prepare for subsequent video processing.

[0078] Then, based on the scene segments obtained above, a sliding window is used to divide each scene segment into a series of continuous (interlaced) frame segments (i.e., video segments). Among them, the sliding window size is M, and the specific value can be appropriately set by technicians in this field according to actual conditions, such as 11, so that the video frame images in the video segment have a strong content relevance. The video frame image to be processed is called the focus frame of the Segment in this example, and together with the first N1 frames and the last N2 frames of the focus frame, the Segment is composed (M=N1+N2+1, N1 / N2 can also be appropriately set by technicians in this field according to actual conditions, such as when M is 11, N1 and N2 can both be 5). In order to simplify the explanation, in this example, the sliding window size of 5 and N1 and N2 are both 2 are taken as an example, as shown in the figure.

[0079] Next, face detection is performed on each video frame image in each Segment to obtain information on whether there is a preset face in the video frame image.

[0080] Next, based on the results of face detection, any appropriate face-based image enhancement algorithm is used to perform refined single-frame image contrast adjustment and color adjustment on each video frame image in each Segment to improve image quality and implement image enhancement preprocessing for each video frame image. The output of the image enhancement preprocessing can be statistical data such as the enhanced image histogram, or specific adjustment parameters for image enhancement (such as the shape and amplitude parameters of the histogram adjustment S curve, a histogram mapping relationship curve used to characterize the mapping relationship between the original image and the enhanced image, etc.). In this example, image histogram statistical data is used.

[0081] Then, the focus frame is processed for spatiotemporal consistency, and the information of the N1 frames before and the N2 frames after the focus frame are simultaneously considered for fusion, including:

[0082] 1. For each Segment: Determine whether there is a preset face in each video frame image in the Segment based on the face detection result, so as to determine the target object information of the video frame image (also called face attributes in this example). Then, determine the ratio of the number of video frame images with preset faces in the Segment to the number of all video frame images in the Segment, that is, alpha; then determine whether there is a preset face in the Segment based on alpha, so as to determine the target object information of the Segment (also called face attributes in this example). When implementing this step, the aforementioned detection result, that is, the result of face detection, can be used directly without performing face detection again.

[0083] 2. Determine the first processing weight corresponding to the focus frame: Determine the first processing weight of the focus frame based on whether the target object information of the focus frame is consistent with the target object information of the Segment to which it belongs.

[0084] For example, if they are consistent, the weight of the focus frame is increased according to the alpha ratio; otherwise, the weight of the focus frame is reduced according to the alpha ratio to ensure that the change is smooth rather than abrupt. For example, the weight enhancement coefficient (also called weight increase coefficient) can be set: r1 = 1 + |alpha-(1-alpha)| = 1 + |2*alpha-1|; weight attenuation coefficient (also called weight reduction coefficient): r2 = 1-0.5*|2*alpha-1|. Then, if the target object information is consistent, the focus frame can be weighted using the formula c_w = C*r1; if it is inconsistent, the focus frame can be weighted using the formula c_w = C*r2. Among them, C is a set value, such as a preset empirical value. Optionally, C is a value between [0.2, 0.4]. It can be seen that the final obtained c_w is the first processing weight.

[0085] 3. Determine the weight of the frame sequence before and after the focus frame: allocate the total processing weight of the frame sequence before and after according to the number of N1 and N2. Among them, the weight of each frame in the frame sequence before and after can be adjusted according to the following factors: target object information, distance from the focus frame, and normalized respectively.

[0086] For example, the sum of the processing weights of the subsequent frame sequence of the focus frame is n_w = 0.5*(1-c_w)*MIN(1,N2 / N1), and the sum of the processing weights of the previous frame sequence is p_w = 1-c_w-n_w. For a frame in the previous frame sequence or the subsequent frame sequence, calculate its distance D from the focus frame: 1 to N (N is N1-when the frame is a frame in the previous frame sequence, or N2-when the frame is a frame in the subsequent frame sequence); if the target object information of the frame is consistent with the target object information of the segment, the coefficient assigned is: (N+1-D) / N*r1; otherwise, it is (N+1-D) / N. For each frame in the previous frame sequence or the subsequent frame sequence, the above coefficients can be normalized first, and then the corresponding processing weight, that is, the second processing weight, is determined for the frame based on the coefficients after the above normalization and the sum of the processing weights of the previous frame sequence or the subsequent frame sequence to which the frame belongs, which is indicated as s_w in the figure.

[0087] 4. Perform image enhancement and adjustment processing on the focus frame: According to the processing weight of each frame in the Segment to which the focus frame belongs, based on the results of its image enhancement preprocessing, such as histogram data or enhancement adjustment parameters, a weighted average value is calculated for the focus frame, and image enhancement and adjustment processing is performed on the focus frame according to the weighted average value.

[0088] According to this embodiment, a connection between video frame images is established through a sliding window, and then the target object information of the frame sequence (Segment) that the sliding window slides over each time is determined in combination with the target object detection; then within each Segment, the image enhancement of the focus frame is fused according to its target object information and frame sequence information, that is, the information of the previous and next frame sequences in time sequence is considered, and the focus frame is enhanced and fused in the spatial domain, so as to ensure that the image features of a single frame are guaranteed while also ensuring that the enhancement effects of the previous and next frames are gradual and smooth, thereby reducing the visual flicker of consecutive frames, enhancing the temporal and spatial consistency of video processing, and improving the visual effect.

[0089] The video processing method of this embodiment can be executed by any appropriate electronic device with data processing capability, including but not limited to: a server, a mobile terminal (such as a mobile phone, a PAD, etc.) and a PC, etc.

[0090] Embodiment 3

[0091] Reference Figure 3 , shows a structural block diagram of a video processing device according to Embodiment 3 of the present invention.

[0092] The video processing device of this embodiment includes: a first determination module 302, used to determine a first processing weight for the video frame image to be processed based on consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has undergone image enhancement preprocessing; a second determination module 304, used to determine a second processing weight for other video frame images in the video segment except the video frame image to be processed based on the first processing weight; and a processing module 306, used to perform image enhancement adjustment processing on the video frame image to be processed based on the first processing weight and the second processing weight.

[0093] Optionally, the first determination module 302 is used to obtain first target object information corresponding to the video frame image to be processed, and second target object information corresponding to the video clip, wherein the first target object information and the second target object information are both used to indicate whether a target object exists; determine whether the first target object information and the second target object information are consistent; if they are consistent, perform weight increase processing based on the current processing weight of the video frame image to be processed; if they are inconsistent, perform weight reduction processing based on the current processing weight of the video frame image to be processed.

[0094] Optionally, the device also includes: a pre-processing module 308, which is used to perform target object detection on multiple video frame images included in the video segment before the first determination module 302 determines the first processing weight for the video frame image to be processed based on consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs, wherein the multiple video frame images include the video frame image to be processed; and determine, based on the detection results, first target object information corresponding to the video frame image to be processed and second target object information corresponding to the video segment.

[0095] Optionally, when the pre-processing module 308 determines the second target object information corresponding to the video clip based on the detection result: determines the number of video frame images containing the target object based on the detection result; and determines the second target object information corresponding to the video clip based on the proportional relationship between the number of video frame images containing the target object and the number of the multiple video frame images.

[0096] Optionally, the second determination module 304 is used to assign a total processing weight to the other video frame images according to the first processing weight; and to assign a second processing weight to each of the multiple images included in the other video frame images according to the target object information in the other video frame images and / or the position distance from the video frame image to be processed, and the total processing weight.

[0097] Optionally, the processing module 306 is used to perform weighted averaging on the first processing weight and multiple second processing weights corresponding to the other video frame images respectively; and perform image enhancement adjustment processing on the video frame image to be processed according to the weighted averaging result.

[0098] Optionally, the pre-processing module 308 is also used to determine a scene segment to be processed from at least one scene segment obtained by performing scene detection on the target video, before the first determination module 302 determines the first processing weight for the video frame image to be processed based on consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs; divide the scene segment to be processed into at least one video segment using a sliding window of a preset size; perform image enhancement preprocessing on the video frame images in the at least one video segment; determine the video segment to be processed from at least one video segment that has undergone image enhancement preprocessing; and determine the video frame image to be processed from the video segment to be processed.

[0099] Optionally, the video frame image to be processed is a key video frame image in the video clip.

[0100] Optionally, the video processing device of this embodiment also includes: a first display interaction module 310, which is used to display information of at least one candidate object in the video segment before the first determination module 302 determines the first processing weight for the video frame image to be processed based on consistency information of the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs; receive a selection operation on the information of the at least one candidate object, and determine the target object based on the information of the candidate object operated by the selection operation.

[0101] Optionally, the video processing device of this embodiment also includes: a second display interaction module 312, which is used to display the first processing weight and the second processing weight before the processing module 306 performs image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight, and receive a weight adjustment operation on at least one of the displayed first processing weight and the second processing weight; the processing module 306 is used to perform image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight after the weight adjustment operation.

[0102] Optionally, when the video processing device of this embodiment is deployed in the cloud, the pre-processing module 308 is also used to receive the video uploaded by the user to the cloud, and determine the video frame image to be processed and the video segment to which the video frame image belongs from the video.

[0103] Optionally, when the video processing device of this embodiment is deployed on a terminal, the pre-processing module 308 is also used to receive a game video stream sent from the cloud, and determine the video frame image to be processed and the video segment to which the video frame image belongs from the game video stream.

[0104] The video processing device of this embodiment is used to implement the corresponding video processing methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here. In addition, the functional implementation of each module in the video processing device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be described in detail here.

[0105] Embodiment 4

[0106] Reference Figure 4 , shows a schematic diagram of the structure of an electronic device according to Embodiment 4 of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0107] like Figure 4As shown, the electronic device may include: a display 400 , a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0108] in:

[0109] The display 400 , the processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .

[0110] The communication interface 404 is used to communicate with other electronic devices or servers.

[0111] Processor 402 is used to execute program 410, and specifically can execute relevant steps in the above-mentioned video processing method embodiment. For example, the following operations are performed: according to the consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs, a first processing weight is determined for the video frame image to be processed, wherein the video frame image in the video segment is an image that has been preprocessed for image enhancement; according to the first processing weight, a second processing weight is determined for other video frame images in the video segment except the video frame image to be processed; according to the first processing weight and the second processing weight, image enhancement adjustment processing is performed on the video frame image to be processed.

[0112] The display 400 is used to display the video frame image after the image enhancement adjustment processing by the processor 402.

[0113] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0114] The processor 402 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0115] The memory 406 is used to store at least the video clip, the target object information of the video frame image in the video clip, and the video frame image after the image enhancement adjustment process; wherein the target object information is used to indicate whether there is a preset target object in the video frame image, and the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.

[0116] In an optional embodiment, the program 410 is also used to enable the processor 402 to: obtain first target object information corresponding to the video frame image to be processed, and second target object information corresponding to the video segment, when determining the first processing weight for the video frame image to be processed based on consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs: the first target object information corresponding to the video frame image to be processed, and the second target object information corresponding to the video segment, wherein the first target object information and the second target object information are both used to indicate whether there is a target object; determine whether the first target object information and the second target object information are consistent; if they are consistent, perform weight increase processing based on the current processing weight of the video frame image to be processed; if they are inconsistent, perform weight reduction processing based on the current processing weight of the video frame image to be processed.

[0117] In an optional embodiment, the program 410 is also used to enable the processor 402 to perform target object detection on multiple video frame images included in the video segment before determining the first processing weight for the video frame image to be processed based on consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs, wherein the multiple video frame images include the video frame image to be processed; and determine the first target object information corresponding to the video frame image to be processed and the second target object information corresponding to the video segment respectively according to the detection results.

[0118] In an optional embodiment, the program 410 is also used to enable the processor 402 to: determine the number of video frame images containing the target object based on the detection result; and determine the second target object information corresponding to the video clip based on a proportional relationship between the number of video frame images containing the target object and the number of the multiple video frame images.

[0119] In an optional embodiment, the program 410 is also used to enable the processor 402 to: assign a total processing weight to the other video frame images according to the first processing weight; and assign second processing weights to each of the multiple images included in the other video frame images according to the target object information in the other video frame images and / or the position distance from the video frame image to be processed, and the total processing weight, when determining the second processing weights of other video frame images in the video clip except the video frame image to be processed according to the first processing weight.

[0120] In an optional embodiment, the program 410 is also used to enable the processor 402 to: perform weighted averaging of the first processing weight and multiple second processing weights corresponding to the other video frame images when performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight; and perform image enhancement adjustment processing on the video frame image to be processed according to the weighted averaging result.

[0121] In an optional embodiment, the program 410 is also used to enable the processor 402 to determine a scene segment to be processed from at least one scene segment obtained by performing scene detection on the target video before determining the first processing weight for the video frame image to be processed based on consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs; divide the scene segment to be processed into at least one video segment using a sliding window of a preset size; perform image enhancement preprocessing on the video frame image in the at least one video segment; determine the video segment to be processed from at least one video segment that has undergone image enhancement preprocessing; and determine the video frame image to be processed from the video segment to be processed.

[0122] In an optional implementation, the video frame image to be processed is a key video frame image in the video clip.

[0123] In an optional embodiment, the program 410 is also used to enable the processor 402 to display information of at least one candidate object in the video segment before determining a first processing weight for the video frame image to be processed based on consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs; receive a selection operation on the information of the at least one candidate object, and determine the target object based on the information of the candidate object operated by the selection operation.

[0124] In an optional embodiment, the program 410 is also used to enable the processor 402 to display the first processing weight and the second processing weight before performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight, and receive a weight adjustment operation on at least one of the displayed first processing weight and the second processing weight; the program 410 is also used to enable the processor 402 to perform image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight: perform image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight after the weight adjustment operation.

[0125] In an optional implementation, the program 410 is further configured to enable the processor 402 to receive a video uploaded by a user to the cloud, and to determine from the video the video frame image to be processed and the video segment to which the video frame image belongs.

[0126] In an optional implementation, the program 410 is further configured to enable the processor 402 to receive a game video stream sent from the cloud, and to determine the video frame image to be processed and the video segment to which the video frame image belongs from the game video stream.

[0127] The specific implementation of each step in program 410 can refer to the corresponding description of the corresponding steps and units in the above-mentioned video processing method embodiment, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above-mentioned method embodiment, which will not be repeated here.

[0128] Through the electronic device of this embodiment, for a frame image in a video clip that has undergone image enhancement preprocessing, that is, the video frame image to be processed, since the preprocessing only focuses on the single frame image itself, a spatiotemporal consistency problem will arise. To solve this problem, in the video processing scheme of the embodiment of the present invention, on the one hand, a first processing weight will be determined for the video frame image to be processed based on the consistency information of the target object in the video frame image to be processed and the target object in the video clip to which the video frame image belongs, such as whether they both contain the same target object, so as to use the first processing weight as a consideration factor for the subsequent processing degree of the video frame image to be processed; on the other hand, since the video frame image to be processed and the other video frame images belong to the same video clip, that is, the other video frame images may be the previous and next frame images of the video frame image to be processed, it can be seen that there is a strong correlation between the video frame image to be processed and the other video frame images. , taking the first processing weight corresponding to the video frame image to be processed as a reference, determining the corresponding second processing weight for other video frame images, fully considering the association between the temporally adjacent previous and next video frame image sequences, making the setting of the second processing weight more reasonable, and then, performing image enhancement adjustment processing on the video frame image to be processed based on the first processing weight and the second processing weight, so that the image enhancement of the adjusted video frame image to be processed fully considers the effect of the image enhancement preprocessing of the previous and next video frame images, so that the image enhancement effect of the video frame image to be processed obtained after the adjustment is gradual and smooth, reducing the visual flicker of continuous video frame images, enhancing the temporal and spatial consistency of video processing, and improving the visual effect.

[0129] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.

[0130] The method according to the embodiment of the present invention described above may be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor, or hardware, the video processing method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the video processing method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the video processing method shown herein.

[0131] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.

[0132] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not limitations of the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present invention. The patent protection scope of the embodiments of the present invention should be defined by the claims.

Claims

1. A video processing method, comprising: Determining a first processing weight for the video frame image to be processed according to consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has been preprocessed for image enhancement, and the first processing weight is used to indicate the importance of the video frame image to be processed in adjustment; Determining, according to the first processing weight, a second processing weight of other video frame images in the video segment except the video frame image to be processed based on a temporal relationship and / or content relevance between other video frame images in the video segment except the video frame image to be processed and the video frame image to be processed; According to the first processing weight and the second processing weight, image enhancement adjustment processing is performed on the video frame image to be processed.

2. The method according to claim 1, wherein: The step of determining a first processing weight for the video frame image to be processed according to consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs includes: Acquire first target object information corresponding to the video frame image to be processed, and second target object information corresponding to the video clip, wherein the first target object information and the second target object information are both used to indicate whether a target object exists; Determining whether the first target object information and the second target object information are consistent; If they are consistent, a weight increase process is performed based on the current processing weight of the video frame image to be processed; if they are inconsistent, a weight reduction process is performed based on the current processing weight of the video frame image to be processed.

3. The method according to claim 2, wherein: Before determining the first processing weight for the video frame image to be processed according to consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs, the method further includes: Performing target object detection on a plurality of video frame images included in the video clip, wherein the plurality of video frame images include the video frame image to be processed; According to the detection result, the first target object information corresponding to the video frame image to be processed and the second target object information corresponding to the video segment are determined respectively.

4. The method according to claim 3, wherein: The determining, according to the detection result, the second target object information corresponding to the video clip includes: According to the detection result, the number of video frame images containing the target object is determined; The second target object information corresponding to the video clip is determined according to a proportional relationship between the number of video frame images containing the target object and the number of the plurality of video frame images.

5. The method according to claim 1, wherein: The determining, according to the first processing weight, second processing weights of other video frame images in the video segment except the video frame image to be processed based on a temporal relationship and / or content relevance between other video frame images in the video segment except the video frame image to be processed and the video frame image to be processed, comprises: Allocating a total processing weight to the other video frame images according to the first processing weight; According to the target object information in the other video frame images and / or the position distance from the video frame images to be processed, and the total processing weight, second processing weights are respectively assigned to the multiple images included in the other video frame images.

6. The method according to claim 5, wherein: The step of performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight includes: Performing a weighted average on the first processing weight and a plurality of second processing weights respectively corresponding to the other video frame images; According to the weighted average result, image enhancement and adjustment processing is performed on the video frame image to be processed.

7. The method according to any one of claims 1 to 6, wherein: Before determining the first processing weight for the video frame image to be processed according to consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs, the method further includes: Determining a scene segment to be processed from at least one scene segment obtained by performing scene detection on the target video; Using a sliding window of a preset size to divide the scene segment to be processed into at least one video segment; Performing image enhancement preprocessing on the video frame images in the at least one video clip; Determining a video segment to be processed from at least one video segment that has undergone image enhancement preprocessing; The video frame image to be processed is determined from the video segment to be processed.

8. The method according to any one of claims 1 to 6, wherein: The video frame images to be processed are key video frame images in the video clip.

9. The method according to any one of claims 1 to 6, wherein: Before determining the first processing weight for the video frame image to be processed according to consistency information between the target object in the video frame image to be processed and the target object in the video segment to which the video frame image belongs, the method further includes: Displaying information of at least one candidate object in the video clip; A selection operation on the information of the at least one candidate object is received, and the target object is determined according to the information of the candidate object operated by the selection operation.

10. The method according to any one of claims 1 to 6, wherein: Before performing image enhancement adjustment processing on the to-be-processed video frame image according to the first processing weight and the second processing weight, the method further comprises: displaying the first processing weight and the second processing weight, and receiving a weight adjustment operation on at least one of the displayed first processing weight and the second processing weight; The performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight includes: performing image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight after the weight adjustment operation.

11. The method according to any one of claims 1 to 6, wherein: The method further comprises: A video uploaded by a user to the cloud is received, and the video frame image to be processed and the video segment to which the video frame image belongs are determined from the video.

12. The method according to any one of claims 1 to 6, wherein: The method further comprises: A game video stream sent from the cloud is received, and the video frame image to be processed and the video segment to which the video frame image belongs are determined from the game video stream.

13. A video processing device, comprising: A first determination module is used to determine a first processing weight for the video frame image to be processed according to consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has been preprocessed for image enhancement, and the first processing weight is used to indicate the importance of the video frame image to be processed in adjustment; A second determining module is used to determine, according to the first processing weight, a second processing weight of other video frame images in the video segment except the video frame image to be processed based on a temporal relationship and / or content relevance between other video frame images in the video segment except the video frame image to be processed and the video frame image to be processed; A processing module is used to perform image enhancement adjustment processing on the video frame image to be processed according to the first processing weight and the second processing weight.

14. An electronic device comprising: A processor, configured to determine a first processing weight for the video frame image to be processed based on consistency information between a target object in the video frame image to be processed and a target object in a video segment to which the video frame image belongs, wherein the video frame image in the video segment is an image that has been preprocessed for image enhancement, and the first processing weight is used to indicate the degree of importance of the video frame image to be processed in adjustment; according to the first processing weight, based on the temporal relationship and / or content relevance between the other video frame images in the video segment except the video frame image to be processed and the video frame image to be processed, determine a second processing weight for the other video frame images in the video segment except the video frame image to be processed; according to the first processing weight and the second processing weight, perform image enhancement adjustment processing on the video frame image to be processed; The display is used to display the video frame image after the image enhancement adjustment processing.

15. The electronic device according to claim 14, wherein: Also includes memory; The memory is used to store at least the video clip, the target object information of the video frame image in the video clip, and the video frame image after the image enhancement adjustment processing; wherein the target object information is used to indicate whether there is a preset target object in the video frame image.

16. A computer storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the video processing method according to any one of claims 1 to 12 is implemented.