Image enhancement method and device

By enlarging and refining low-resolution images, combined with brightness and color value adjustments, the problem of low conversion efficiency when converting low-resolution images to high-resolution images is solved, achieving a fast and clear image enhancement effect.

CN113689333BActive Publication Date: 2025-02-07WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110969933.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-23
Publication Date
2025-02-07
Estimated Expiration
2041-08-23

AI Technical Summary

Technical Problem

Existing technologies have low conversion efficiency when converting low-resolution images to high-resolution images, resulting in slow processing speeds and failing to meet real-time requirements.

Method used

By magnifying the low-resolution image, the high-frequency residual image with the finest residual line is found and refined. Combined with brightness and color value adjustments, a clear high-resolution image is obtained.

Benefits of technology

It achieves fast image enhancement processing, improves the speed of super-resolution computing, and obtains higher resolution images with greater clarity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113689333B_ABST
    Figure CN113689333B_ABST
Patent Text Reader

Abstract

The present invention discloses an image enhancement method and device, which comprises the following steps: amplifying a frame image to be processed to obtain an amplified frame image; determining a grayscale frame image corresponding to the amplified frame image; performing fine processing on the grayscale frame image to obtain a first processed image, new brightness values ​​of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel; screening a first comparison pixel group at the same position as any first reference pixel group and a first pixel to be processed at the same position as the corresponding first pixel from the amplified frame image; performing brightness adjustment processing on the color value of the first pixel to be processed based on the color value corresponding to the first comparison pixel group to obtain the first color value of the first pixel to be processed; and obtaining a first enhanced image corresponding to the frame image to be processed based on the first color value of each first pixel to be processed.
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 financial technology (Fintech), and in particular to a method and device for image enhancement. Background Art

[0002] With the development of computer technology, more and more technologies are being applied in the financial field. Traditional finance is gradually transforming into financial technology. However, due to the security and real-time requirements of the financial industry, higher requirements are also placed on technology.

[0003] At present, when displaying financial products, if a low-resolution image appears, it is generally necessary to convert the low-resolution image to obtain a high-resolution image. In the related art, in response to the above-mentioned need to convert a low-resolution image into a high-resolution image, a method is generally adopted to train a corresponding conversion model based on a convolutional neural network, and then process the image based on the trained conversion model.

[0004] However, the aforementioned method of converting low-resolution images into high-resolution images requires a large number of samples to be counted in advance for training before processing can be performed based on the model obtained through training, which results in a slow overall processing speed and low conversion efficiency for converting low-resolution images into high-resolution images. Summary of the invention

[0005] The present invention provides an image enhancement method and device, which are used to solve the problem of low conversion efficiency when converting a low-resolution image into a high-resolution image in the prior art.

[0006] In a first aspect, the present invention provides a method for image enhancement, comprising: amplifying a frame image to be processed to obtain an amplified frame image; and determining a grayscale frame image corresponding to the amplified frame image; performing refinement processing on the grayscale frame image to obtain a first processed image, new brightness values ​​of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel; from the amplified frame image, screening a first comparison pixel group that is at the same position as any of the first reference pixel groups, and a first pixel to be processed that is at the same position as the corresponding first pixel; and, based on the color value corresponding to the first comparison pixel group, performing brightness adjustment processing on the color value of the first pixel to be processed to obtain the first color value of the first pixel to be processed; based on the first color value of each of the first pixels to be processed, obtaining a first enhanced image corresponding to the frame image to be processed.

[0007] In the above method, the computer device first performs a magnification process on the frame image to be processed to obtain an enlarged frame image, that is, an enlarged low-resolution image, and then performs a refinement process on the enlarged frame image to obtain a high-frequency residual image with good fine residual lines, that is, a first processed image, thereby obtaining a clear high-resolution image, that is, a first enhanced image, based on the enlarged low-resolution image and the high-frequency residual image with good fine residual lines. Obviously, the above method does not require prior knowledge and can quickly achieve image enhancement of the frame image to be processed.

[0008] Optionally, after obtaining the first enhanced image corresponding to the frame image to be processed, the method also includes: determining a feature extraction map corresponding to the first processed image, and performing the refinement processing on the feature extraction map to obtain a second processed image, new brightness values ​​of each second pixel in the second processed image, and each second reference pixel group used to determine the new brightness value of each second pixel; from the first enhanced image, screening a second comparison pixel group that is at the same position as any of the second reference pixel groups, and a second pixel to be processed that is at the same position as the corresponding second pixel; and, based on the color value corresponding to the second comparison pixel group, performing brightness adjustment processing on the color value of the second pixel to be processed to obtain a target color value of the second pixel to be processed; and obtaining a target enhanced image based on the target color value of each of the second pixels to be processed.

[0009] In the above method, the computer device further refines the high-frequency residual image of the thinnest residual line initially obtained, i.e., the first processed image, so as to obtain the high-frequency residual image of the thinnest residual line, i.e., the second processed image, and thereby obtains a target enhanced image with higher definition based on the first enhanced image (i.e., the enlarged low-resolution image) and the second processed image, that is, obtains a target enhanced image with better processing effect on the frame image to be processed. In other words, on the basis of ensuring rapid image enhancement processing, the definition of the target enhanced image can be further improved.

[0010] Optionally, the grayscale frame image is refined to obtain a first processed image, new brightness values ​​of each first pixel in the first processed image, and each first reference pixel group for determining the new brightness value of each first pixel, including: determining each brightness value corresponding to pixels in eight directions adjacent to one of the first pixels; determining a first new brightness value of the one of the first pixels and a first reference pixel group consisting of a plurality of pixels with the highest comprehensive brightness values ​​in the eight directions adjacent to the first pixel based on the brightness values ​​corresponding to the pixels in the eight adjacent directions and a preset strategy; obtaining the first new brightness value of each of the first pixels, a first processed image determined based on the first new brightness value of each of the first pixels, and each first reference pixel group for determining the new brightness value of each of the first pixels.

[0011] In the above method, since the brightness value of the first pixel is adjusted based on the first reference pixel group composed of multiple pixels with the highest comprehensive brightness values ​​in eight directions adjacent to the first pixel, the new brightness value corresponding to the first pixel is consistent with the brightness values ​​of its surrounding pixels.

[0012] Optionally, the method of determining a first new brightness value of the first pixel based on the brightness values ​​corresponding to the pixels in the eight adjacent directions and a preset strategy, and determining a first reference pixel group for determining a new brightness value of the first pixel, includes: dividing the pixels in the eight adjacent directions into a plurality of first comparison groups and a second comparison group corresponding to the first comparison group based on the preset strategy; wherein the brightness value of at least one pixel in the first comparison group is greater than the brightness values ​​of each pixel in the second comparison group; determining a sum value corresponding to the first comparison group to obtain a sum value set; wherein the sum value is used to characterize a comprehensive brightness value determined based on the brightness values ​​corresponding to each pixel in the first comparison group and the brightness value corresponding to the first pixel; determining a maximum value in the sum value set, determining the maximum value as the first new brightness value of the first pixel, and determining the pixel for determining the maximum value as the first reference pixel group for determining a new brightness value of the first pixel.

[0013] In the above method, a new brightness value is fitted for the first pixel without distortion to improve the brightness of the first pixel as much as possible. When the brightness values ​​of all first pixels are improved through fitting, the lines of the objects in the first image to be processed are also refined, achieving a refined processing effect.

[0014] Optionally, respectively determining a sum value corresponding to each of the first comparison groups includes: determining a first mean value of brightness values ​​corresponding to pixels in the first comparison group, and multiplying the first mean value by a first preset weight to obtain a first product value; determining a second product value of the brightness value of the first pixel multiplied by a second preset weight; wherein the sum of the first preset weight and the second preset weight is a fixed value; and adding the first product value and the second product value to determine a sum value corresponding to the first comparison group.

[0015] In the above method, based on the brightness values ​​of the pixels in the first comparison group and the brightness value of the first pixel, the sum value corresponding to the first comparison group, that is, the fitting brightness value corresponding to the first comparison group, is comprehensively determined, which can more accurately determine the fitting brightness value with a gradient change in brightness value in a certain direction.

[0016] Optionally, the color value of the first pixel to be processed is brightness adjusted based on the color value corresponding to the first comparison pixel group to obtain the first color value of the first pixel to be processed, including: determining the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group; performing weighted average processing on the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group to obtain the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed; concatenating the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed into a binary number of the target numerical type, and using the binary number as the first color value of the first pixel to be processed.

[0017] In the above method, for the first pixel to be processed that is at the same position as the first pixel in the enlarged frame image, the corresponding adjacent pixel group, namely the first comparison pixel group, is also found, and the color value of the first pixel to be processed is processed based on the first comparison pixel group. In addition, considering that the enlarged frame image is a color image, the information of each pixel is stored in an integer, so the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed are spliced ​​into a binary number of the target numerical type, thereby obtaining the first color value of the first pixel to be processed that conforms to the numerical type of the color image.

[0018] Optionally, the weighted mean processing is performed on the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group to obtain the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed, including: determining a fourth mean of the transparency value or red color value or green color value or blue color value corresponding to the first comparison pixel group, and determining a third product value of the fourth mean and a third preset weight; determining the first transparency value or the first green color value or the first blue color value or the first red color value of the first pixel to be processed, and determining a fourth product value of the first transparent value or the first green color value or the first blue color value or the first red color value and a fourth preset weight; based on the third product value and the fourth product value, determining the transparency adjustment value or the red color adjustment value or the green color adjustment value or the blue color adjustment value corresponding to the first pixel to be processed, so as to determine the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed.

[0019] In the above method, based on the fourth mean value corresponding to the transparency value or the red color value or the green color value or the blue color value corresponding to the first comparison pixel group, and the first transparency value or the first green color value or the first blue color value or the first red color value of the first pixel to be processed, the transparency adjustment value or the red color adjustment value or the green color adjustment value or the blue color adjustment value corresponding to the first pixel to be processed is comprehensively determined. In this way, the color value of the first pixel to be processed determined is adapted to the color value of its adjacent pixels, so that the color of the first enhanced image finally determined based on the first color value of each first pixel to be processed is fuller and the presentation effect is better.

[0020] In a second aspect, the present invention provides an image enhancement device, comprising: a determination unit, configured to amplify a frame image to be processed to obtain an amplified frame image; and, to determine a grayscale frame image corresponding to the amplified frame image; a first processing unit, configured to perform fine processing on the grayscale frame image to obtain a first processed image, new brightness values ​​of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel; a second processing unit, configured to screen, from the amplified frame image, a first comparison pixel group that is at the same position as any of the first reference pixel groups, and a first pixel to be processed that is at the same position as the corresponding first pixel; and, based on the color value corresponding to the first comparison pixel group, perform brightness adjustment processing on the color value of the first pixel to be processed to obtain the first color value of the first pixel to be processed; and an acquisition unit, configured to obtain a first enhanced image corresponding to the frame image to be processed based on the first color value of each of the first pixels to be processed.

[0021] Optional,

[0022] The first processing unit is further used to: determine a feature extraction map corresponding to the first processed image, and perform the refinement processing on the feature extraction map to obtain a second processed image, a new brightness value of each second pixel in the second processed image, and each second reference pixel group used to determine the new brightness value of each second pixel;

[0023] The second processing unit is further configured to: select, from the first enhanced image, a second comparison pixel group that is at the same position as any second reference pixel group, and a second pixel to be processed that is at the same position as the corresponding second pixel; and, based on the color value corresponding to the second comparison pixel group, perform brightness adjustment processing on the color value of the second pixel to be processed to obtain a target color value of the second pixel to be processed;

[0024] The obtaining unit is further used to obtain a target enhanced image based on the target color value of each of the second pixels to be processed.

[0025] Optionally, the first processing unit is specifically used to: determine each brightness value corresponding to pixels in eight directions adjacent to one of the first pixels; determine a first new brightness value of the one of the first pixels and a first reference pixel group consisting of multiple pixels with the highest comprehensive brightness values ​​in the eight directions adjacent to the first pixel based on the each brightness value corresponding to the pixels in the eight adjacent directions and a preset strategy; obtain the first new brightness value of each of the first pixels, a first processed image determined based on the first new brightness value of each of the first pixels, and each first reference pixel group used to determine the new brightness value of each of the first pixels.

[0026] Optionally, the first processing unit is specifically used to: divide the pixels in the eight adjacent directions into multiple first comparison groups and second comparison groups corresponding to the first comparison groups based on the preset strategy; wherein the brightness value of at least one pixel in the first comparison group is greater than the brightness value of each pixel in the second comparison group; determine a sum value corresponding to the first comparison group to obtain a sum value set; wherein the sum value is used to characterize a comprehensive brightness value determined based on the brightness values ​​corresponding to each pixel in the first comparison group and the brightness value corresponding to the one first pixel; determine a maximum value in the sum value set, determine the maximum value as the first new brightness value of the one first pixel, and determine the pixel that determines the maximum value as the first reference pixel group used to determine a new brightness value of the first pixel.

[0027] Optionally, the first processing unit is specifically used to: determine a first mean value of brightness values ​​corresponding to pixels in the first comparison group, and multiply the first mean value by a first preset weight to obtain a first product value; determine a second product value of the brightness value of the first pixel multiplied by a second preset weight; wherein the sum of the first preset weight and the second preset weight is a fixed value; add the first product value and the second product value to determine a sum value corresponding to the first comparison group.

[0028] Optionally, the second processing unit is specifically used to: determine the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group; perform weighted average processing on the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group to obtain the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed; concatenate the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed into a binary number of the target numerical type, and use the binary number as the first color value of the first pixel to be processed.

[0029] Optionally, the second processing unit is specifically used to: determine a fourth mean of the transparency value or the red color value or the green color value or the blue color value corresponding to the first comparison pixel group, and determine a third product value of the fourth mean and a third preset weight; determine the first transparency value or the first green color value or the first blue color value or the first red color value of the first pixel to be processed, and determine a fourth product value of the first transparency value or the first green color value or the first blue color value or the first red color value and a fourth preset weight; determine the transparency adjustment value or the red color adjustment value or the green color adjustment value or the blue color adjustment value corresponding to the first pixel to be processed based on the third product value and the fourth product value, so as to determine the transparency adjustment value, the red color adjustment value, the green color adjustment value and the blue color adjustment value corresponding to the first pixel to be processed.

[0030] The beneficial effects of the above-mentioned second aspect and each optional device of the second aspect can refer to the beneficial effects of the above-mentioned first aspect and each optional method of the first aspect, and will not be repeated here.

[0031] In a third aspect, the present invention provides a computer device, including a program or an instruction, which, when executed, is used to execute the above-mentioned first aspect and each optional method of the first aspect.

[0032] In a fourth aspect, the present invention provides a storage medium, comprising a program or an instruction, which, when executed, is used to execute the above-mentioned first aspect and each optional method of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below.

[0034] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of a step flow of an image enhancement method provided by an embodiment of the present invention;

[0036] Figure 3a A schematic diagram of a frame image to be processed provided by an embodiment of the present invention;

[0037] Figure 3b A schematic diagram of an enlarged frame image provided by an embodiment of the present invention;

[0038] Figure 4 A schematic diagram of a first pixel and its adjacent pixels provided by an embodiment of the present invention;

[0039] Figure 5 A schematic diagram of a process for determining a first reference pixel group provided by an embodiment of the present invention;

[0040] Figure 6 A schematic diagram of a first processed image provided by an embodiment of the present invention;

[0041] Figure 7 A schematic diagram of a first enhanced image provided by an embodiment of the present invention;

[0042] Figure 8 A schematic diagram of a process flow for determining a target enhanced image provided by an embodiment of the present invention;

[0043] Figure 9a A schematic diagram of a feature extraction graph provided by an embodiment of the present invention;

[0044] Figure 9b A schematic diagram of a second processed image provided by an embodiment of the present invention;

[0045] Fig.10 A schematic diagram of a target enhanced image provided by an embodiment of the present invention;

[0046] Fig.11 A schematic diagram of the structure of an image enhancement device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to better understand the above-mentioned technical scheme, the above-mentioned technical scheme will be described in detail below in conjunction with the accompanying drawings and specific implementation methods of the specification. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical scheme of the present invention, rather than limitations on the technical scheme of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.

[0048] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the images used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0049] To facilitate understanding of the technical solution provided by the embodiment of the present invention, some key terms used in the embodiment of the present invention are explained here:

[0050] 1. Super-resolution technology (SR): refers to reconstructing a corresponding high-resolution image from an observed low-resolution image.

[0051] 2. Bicubic Interpolation algorithm: It is the most commonly used image scaling method in digital image processing. In this method, the value of a pixel can be obtained by the weighted average of the sixteen nearest sampling points in a rectangular grid.

[0052] 3: Alpha Channel: It means that after image processing, only the transparency and translucency information of the image is retained.

[0053] 4. ARGB: represents the color space composed of Red, Green, Blue and Alpha (alpha channel).

[0054] 5. Image gradient: used to characterize the direction of directional changes in image intensity and color.

[0055] The design concept of the embodiment of the present invention is briefly introduced below:

[0056] At present, when performing image enhancement processing, the relevant technology first uses image scaling technology to enlarge the low-resolution image to the target size, then fits the nonlinear mapping through the convolutional neural network, and finally outputs the high-resolution image result. However, this processing method not only has a slow overall processing speed and cannot provide real-time analysis, but also the super-resolution presentation effect of the final image is not good.

[0057] In view of this, an embodiment of the present invention provides an image enhancement method. The method does not require prior knowledge and can find the high-frequency residual image of the finest residual line based on the enlarged low-resolution image. Thus, a clear high-resolution image can be obtained based on the enlarged low-resolution image and the high-frequency residual image of the finest residual line, thereby improving the super-resolution calculation processing speed and quickly realizing image enhancement processing.

[0058] After introducing the design concept of the embodiment of the present invention, the following briefly introduces the application scenarios to which the technical solution of image enhancement in the embodiment of the present invention is applicable. It should be noted that the application scenarios described in the embodiment of the present invention are for the purpose of more clearly illustrating the technical solution of the embodiment of the present invention, and do not constitute a limitation on the technical solution provided by the embodiment of the present invention. A person skilled in the art can know that with the emergence of new application scenarios, the technical solution provided by the embodiment of the present invention is also applicable to similar technical problems.

[0059] In the embodiments of the present invention, see Figure 1 The application scenario schematic diagram shown includes an electronic device 101 and a computer device 102, wherein the electronic device 101 may be an electronic device 101-1 ... electronic device 101-n, and the electronic device 101 may communicate with the computer device 102. For example, the connection may be directly or indirectly made through a wired or wireless communication network 103, which is not limited in the present invention.

[0060] In this scenario, the user can determine the video stream to be processed based on the electronic device 101, and the video stream to be processed can be an animation video, or a cartoon video, etc. Then the video stream to be processed is sent to the computer device 102, and then the computer device 102 can perform frame defragging processing on the video stream to be processed to obtain each frame image to be processed, and then the computer device 102 can enlarge any frame image to be processed to obtain the enlarged frame image; and determine the grayscale frame image corresponding to the enlarged frame image; further, the grayscale frame image is refined to obtain a first processed image, a new brightness value of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel; then from the enlarged frame image, a first comparison pixel group at the same position as any first reference pixel group and a first pixel to be processed at the same position as the corresponding first pixel are selected; and based on the color value corresponding to the first comparison pixel group, the color value of the first pixel to be processed is brightness adjusted to obtain the first color value of the first pixel to be processed; thereby, based on the first color value of each first pixel to be processed, a first enhanced image corresponding to the frame image to be processed can be obtained.

[0061] The computer device 102 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The electronic device 101 may be a smart phone, a tablet computer, a laptop, a desktop computer, a smart TV, a smart wearable device, etc., but is not limited thereto.

[0062] To further illustrate the scheme of the method for image enhancement provided by the embodiment of the present invention, the following is a detailed description of this in conjunction with the accompanying drawings and specific implementation methods. Although the embodiment of the present invention provides the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiment of the present invention. The method can be executed in the actual processing process or when the device is executed, it can be executed in the method sequence shown in the embodiment or drawings or in parallel (for example, in the application environment of a parallel processor or multi-threaded processing).

[0063] The following combination Figure 2The method flow chart shown illustrates the method for image enhancement in the embodiment of the present invention. The method flow of the embodiment of the present invention is introduced below.

[0064] Step 201: enlarging the frame image to be processed to obtain an enlarged frame image; and determining a grayscale frame image corresponding to the enlarged frame image.

[0065] In the embodiment of the present invention, before executing step 201, the computer device can read the received video frame by frame in real time, so as to convert the processing of the video into the processing of each frame image. The following text takes a frame image to be processed as an example to illustrate the image enhancement method provided by the embodiment of the present invention. For example, refer to Figure 3a , Figure 3a This is a schematic diagram of a frame image to be processed provided by an embodiment of the present invention. It should be noted that, in actual implementation, the frame image to be processed may be a color image.

[0066] Specifically, for a high resolution (HR) image, it can be decomposed into an upscaled low resolution (LR_U) image and a high frequency residual (r) image, which can be expressed as: HR = LR_U + r. Based on the above logical thinking, the process of converting a low resolution image into a high resolution image can be converted into searching for the high frequency residual image r of the thinnest residual line based on the upscaled low resolution image LR_U, so that a clear high resolution image can be obtained based on the upscaled low resolution image LR_U and the high frequency residual image r of the thinnest residual line.

[0067] A specific implementation method of enlarging the frame image to be processed and obtaining the enlarged frame image may include:

[0068] The frame image to be processed is enlarged based on the bicubic interpolation algorithm to obtain an enlarged frame image; or the frame image to be processed is enlarged based on the bilinear interpolation algorithm to obtain an enlarged frame image; or the frame image to be processed is enlarged based on the nearest neighbor algorithm to obtain an enlarged frame image; of course, the frame image to be processed can also be enlarged based on other algorithms to obtain an enlarged frame image, which is not limited in the embodiments of the present invention. For example, refer to Figure 3b , Figure 3b This is a schematic diagram of an amplified frame image provided by an embodiment of the present invention. It should be noted that, in actual implementation, the amplified frame image may be a color image.

[0069] Step 202: Perform refinement processing on the grayscale frame image to obtain a first processed image, new brightness values ​​of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel.

[0070] Specifically, the refinement process can be understood as finding the maximum grayscale value gradient direction formed by adjacent pixels for each pixel in the grayscale frame image, taking the average of the adjacent pixel group in the maximum gradient direction, making it form a pixel group with adjacent pixels, finding the direction with a gradient change of grayscale value in eight directions, and using the grayscale values ​​of adjacent pixels in this direction to weightedly fit the new grayscale value of the first pixel. It should be noted that in step 202, the new brightness value of the first pixel can be understood as the new grayscale value of the first pixel.

[0071] In the embodiment of the present invention, in order to better illustrate how to obtain the new brightness value of each first pixel in the grayscale frame image, the process of obtaining the new brightness value of a first pixel is taken as an example for explanation. Specifically, the new brightness value of the first pixel may be determined by but is not limited to the following steps:

[0072] Step a: Determine the brightness values ​​corresponding to pixels in eight directions adjacent to a first pixel.

[0073] For example, see Figure 4 , Figure 4 A schematic diagram of a first pixel and its adjacent pixels provided by an embodiment of the present invention, wherein: Figure 4 Pixels in eight directions adjacent to a first pixel are exemplarily shown, wherein the eight directions are directly above, upper left, upper right, left, right, directly below, lower left and lower right of the first pixel, respectively. Figure 4 L0 in the figure represents the first pixel, L1, L2 and L3 represent pixels located at the upper left, directly above and upper right of the first pixel respectively, L4 and L5 represent pixels located at the left and right of the first pixel respectively, and L6, L7 and L8 represent pixels located at the lower left, directly below and lower right of the first pixel respectively.

[0074] In the embodiment of the present invention, the computer device may determine pixels in eight directions adjacent to a first pixel, and then determine the brightness values ​​corresponding to the pixels in the eight directions, that is, the grayscale values ​​corresponding to the eight pixels.

[0075] Step b: Based on the brightness values ​​corresponding to the pixels in eight adjacent directions and a preset strategy, determine a first new brightness value of a first pixel and a first reference pixel group consisting of multiple pixels with the highest comprehensive brightness values ​​in the eight directions adjacent to the first pixel.

[0076] In an embodiment of the present invention, after the computer device determines the first pixel and the pixels in eight directions adjacent to the first pixel, it is necessary to find a first reference pixel group for the first pixel. The first reference pixel group can satisfy the condition that the grayscale value changes gradiently in a certain direction, and fit a new grayscale value for the first pixel without distortion, so as to increase the brightness of the first pixel as much as possible, so that the lines of the obtained first processed image are also refined, thereby achieving a refined processing effect.

[0077] In an embodiment of the present invention, pixels in eight adjacent directions can be divided into multiple first comparison groups and second comparison groups corresponding to the first comparison groups based on a preset strategy; wherein the brightness value of at least one pixel in the first comparison group is greater than the brightness value of each pixel in the second comparison group.

[0078] That is to say, the pixels in eight adjacent directions can be arranged and combined, specifically to satisfy the condition that the brightness value of at least one pixel in the first comparison group is greater than the brightness value of each pixel in the second comparison group, to obtain multiple first comparison groups and multiple second comparison groups.

[0079] For example, see Figure 5 As shown, Figure 5 A schematic diagram of a process of determining a first reference pixel group provided by an embodiment of the present invention, wherein a first comparison group including pixels D1, D2 and D0, a first pixel L0, and a second comparison group including pixels L1, L2 and L3 are shown. It should be noted that: Figure 6 In the schematic diagram shown in , if L0 and L3 overlap in the horizontal or vertical direction, only the first pixel L0 is shown.

[0080] In an embodiment of the present invention, after the computer device determines the first comparison group, it can determine a sum value corresponding to the first comparison group to obtain a sum value set; wherein the sum value is used to represent a comprehensive brightness value determined based on the brightness values ​​corresponding to each pixel in the first comparison group and the brightness value corresponding to a first pixel.

[0081] Specifically, the computer device can determine a first mean value of the brightness values ​​corresponding to pixels in a first comparison group, and multiply the first mean value by a first preset weight to obtain a first product value; then determine a second product value of the brightness value of a first pixel multiplied by a second preset weight; wherein the sum of the first preset weight and the second preset weight is a fixed value; finally, add the first product value and the second product value to determine a sum value corresponding to the first comparison group.

[0082] For example, assuming that the brightness values ​​corresponding to the pixels in the first comparison group are M1, M2 and M3 respectively, the brightness value of the first pixel is L0, the first preset weight is A1, and the second preset weight is 1-A1, then the first mean value can be determined to be: (M1+M2+M3), the first product value is: (M1+M2+M3)*A1, and the second product value is L0*(1-A1), so the sum value can be determined to be: (M1+M2+M3)*A1+L0*(1-A1).

[0083] In an embodiment of the present invention, after the computer device determines the sum value set, it can determine the maximum value in the sum value set, determine the maximum value as the first new brightness value of a first pixel, and determine the pixel that determines the maximum value as the first reference pixel group for determining a new brightness value of the first pixel.

[0084] For example, continue to see Figure 5 In the above image refinement process, if the gray value of the first pixel is L0, it is necessary to find the L0 adjacent pixel group to meet the condition that the gray value changes gradiently in a certain direction, and fit a new gray value for the first pixel without distortion to increase the brightness of the first pixel as much as possible. When the gray value of all pixels is improved through fitting, the lines of the overall image are also refined, achieving a refined processing effect.

[0085] D0, D1, and D2 are taken as the first comparison group, and L0, L1, L2, and L3 are taken as the second comparison group (L0 and L3 overlap in the horizontal or vertical direction). When a brighter gray value can be fitted through the gray value of the first comparison group, the current brighter gray value information is recorded, and the second comparison group is mainly used as a control group to ensure that there is an effective gray gradient change in the adjacent areas in this direction.

[0086] Step c: obtaining a first new brightness value of each first pixel, a first processed image determined based on the first new brightness value of each first pixel, and each first reference pixel group used to determine the new brightness value of each first pixel.

[0087] In an embodiment of the present invention, the aforementioned step b can be adopted to process all first pixels in the grayscale frame image to obtain new brightness values ​​of each first pixel. After all pixels of the image have executed the process of step b, the grayscale frame image has been traversed once. If efficiency permits, the image can be traversed multiple times until the brightness of each first pixel cannot be improved. Then, the refined processing of the grayscale frame image is completed, thereby obtaining the first new brightness value of each first pixel, the first processed image determined based on the first new brightness value of each first pixel, and each first reference pixel group used to determine the new brightness value of each first pixel. For example, refer to Figure 6 As shown, Figure 6A schematic diagram of a first processed image provided by an embodiment of the present invention.

[0088] Step 203: Filter the first comparison pixel group that is at the same position as any first reference pixel group and the first pixel to be processed that is at the same position as the corresponding first pixel from the enlarged frame image; and, based on the color value corresponding to the first comparison pixel group, perform brightness adjustment processing on the color value of the first pixel to be processed to obtain the first color value of the first pixel to be processed.

[0089] In an embodiment of the present invention, a first comparison pixel group that is at the same position as any first reference pixel group and a first pixel to be processed that is at the same position as the corresponding first pixel can be screened from the enlarged frame image, and then the color value of the first pixel to be processed is brightness adjusted based on the color value corresponding to the first comparison pixel group to obtain the first color value of the first pixel to be processed.

[0090] In the embodiment of the present invention, the first color value of the first pixel to be processed may be obtained by adopting but not limited to the following steps:

[0091] Step 1: Determine the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group.

[0092] Step 2: Perform weighted average processing on the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group to obtain the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed;

[0093] In an embodiment of the present invention, a fourth mean of the transparency value or the red color value or the green color value or the blue color value corresponding to the first comparison pixel group can be determined, and a third product value of the fourth mean and the third preset weight can be determined; then the first transparency value or the first green color value or the first blue color value or the first red color value of the first pixel to be processed can be determined, and a fourth product value of the first transparency value or the first green color value or the first blue color value or the first red color value and the fourth preset weight can be determined; further, based on the third product value and the fourth product value, the transparency adjustment value or the red color adjustment value or the green color adjustment value or the blue color adjustment value corresponding to the first pixel to be processed can be determined to determine the transparency adjustment value, the red color adjustment value, the green color adjustment value and the blue color adjustment value corresponding to the first pixel to be processed.

[0094] Step 3: Concatenate the transparency adjustment value, red color adjustment value, green color adjustment value, and blue color adjustment value corresponding to the first pixel to be processed into a binary number of the target numerical type, and use the binary number as the first color value of the first pixel to be processed.

[0095] In the embodiment of the present invention, the transparency adjustment value, red color adjustment value, green color adjustment value, and blue color adjustment value corresponding to the first pixel to be processed are all byte type values, and the transparency adjustment value, red color adjustment value, green color adjustment value, and blue color adjustment value corresponding to the first pixel to be processed can be a binary number of the target value type, and the binary number is used as the first color value of the first pixel to be processed. The target value type can be int type.

[0096] For example, assuming that the color value of the first pixel to be processed is represented as: ARGB0, and the color values ​​corresponding to the pixels in the first comparison pixel group are represented as: ARGB1, ARGB2, ARGB3, then the first color value of the first pixel to be processed is represented as: ARGB can be represented as:

[0097] ARGB=((A1+A2+A3) / 3*weight+A0*(1-weight))<<24

[0098] +((R1+R2+R3) / 3*weight+R0*(1-weight))<<16

[0099] +((G1+G2+G3) / 3*weight+G0*(1-weight))<<8

[0100] +((B1+B2+B3) / 3*weight+B0*(1-weight)).

[0101] Wherein, R1, R2 and R3 are respectively the red color values ​​of each pixel in the first comparison pixel group, weight is the third preset weight, (1-weight) is the fourth preset weight, B1, B2 and B3 are respectively the blue color values ​​of each pixel in the first comparison pixel group, G1, G2 and G3 are respectively the green color values ​​of each pixel in the first comparison pixel group, A1, A2 and A3 are respectively the transparency values ​​of each pixel in the first comparison pixel group, R0, G0, B0 and A0 are respectively the red color value, green color value, blue color value and transparency value of the first pixel to be processed, “<<” is used to represent the left shift operation of a binary number. The red color value corresponding to the first comparison pixel group can be expressed as: (R1+R2+R3) / 3*weight+R0*(1-weight), the blue color value can be expressed as: (B1+B2+B3) / 3*weight+B0*(1-weight), the green color value can be expressed as: (G1+G2+G3) / 3*weight+G0*(1-weight), and the transparency value can be expressed as: (A1+A2+A3) / 3*weight+A0*(1-weight).

[0102] Step 204: Based on the first color value of each first pixel to be processed, a first enhanced image corresponding to the frame image to be processed is obtained.

[0103] In an embodiment of the present invention, each first pixel to be processed in the amplified frame image can be processed based on the scheme in the aforementioned step 203 to obtain the first color value of each first pixel to be processed, and then based on the first color value of each first pixel to be processed, a first enhanced image corresponding to the frame image to be processed can be obtained.

[0104] For example, see Figure 7 As shown, Figure 7 Schematic diagram of a first enhanced image provided in the implementation of the present invention. It should be noted that in actual implementation, the first enhanced image may be a color image. Figure 7 The first enhanced image and Figure 3b By comparing with the enlarged frame image shown, it can be clearly seen that the contour lines of the characters in the first enhanced image after fine-tuning have been refined compared with the contours of the characters in the enlarged frame image, and the brightness has also been slightly improved, giving a clearer visual presentation.

[0105] In the embodiment of the present invention, after obtaining the first enhanced image, the computer device may further process the first enhanced image to obtain a target enhanced image.

[0106] In a possible implementation, after step 204, the computer device may determine the target enhanced image by adopting but not limited to the following steps: Figure 8 Shown:

[0107] Step 801: Determine the feature extraction map corresponding to the first processed image, and refine the feature extraction map to obtain the second processed image, the new brightness value of each second pixel in the second processed image, and each second reference pixel group used to determine the new brightness value of each second pixel.

[0108] In an embodiment of the present invention, the computer device may perform feature extraction processing on the first processed image to obtain a feature extraction graph corresponding to the first processed image. For example, refer to FIG9 , which is a schematic diagram of a feature extraction graph provided by an embodiment of the present invention.

[0109] Exemplarily, the computer device may use a Sobel operator to perform feature extraction processing on the first processed image, or may use a Canny operator to perform feature extraction processing on the first processed image. Of course, the Roberts operator may also be used to perform feature extraction processing on the first processed image, which is not limited in the embodiments of the present invention.

[0110] The following describes a process of performing feature extraction processing on the first processed image based on the Sobel operator to obtain a feature extraction graph.

[0111] For example, assuming that the brightness of the eight pixels adjacent to pixel a in the first processed image are Ltop, Ltopleft, Ltopright, Lleft, Lright, Lbottom, Lbottomleft, Lbottomright, respectively, the new brightness value L of pixel a after sobel filtering can be expressed as:

[0112] L={(abs((Lright-Lleft)*2+Ltopright-Ltopleft+Lbottomright-Lbottomlef)

[0113] +abs((Ltop-Lbottom)*2+Ltopright-Lbottomright+Ltopleft-Lbottomleft))} / 2; where “abs” is used to indicate that an absolute value operation is performed.

[0114] It can be seen that the principle of performing feature extraction processing on the first processed image based on the Sobel operator to obtain the feature extraction map is to determine the first brightness difference value corresponding to each pixel horizontally adjacent to the second pixel, determine the second brightness difference value corresponding to each pixel vertically adjacent to the second pixel, and the new brightness value of the second pixel can be obtained by combining the first brightness difference value and the second brightness difference value.

[0115] In the embodiment of the present invention, after the feature extraction image is obtained, the feature extraction image can be refined to obtain a second processed image, a new brightness value of each second pixel in the second processed image, and each second reference pixel group used to determine the new brightness value of each second pixel. Figure 9b The figure shows a second processed image exemplarily shown in an embodiment of the present invention.

[0116] Specifically, the refinement processing can be understood as finding the maximum brightness value gradient direction composed of adjacent pixels for each second pixel, taking the average of the adjacent pixel group in the maximum gradient direction, making it form a pixel group with the adjacent pixels, finding the direction with a gradient change in brightness value in eight directions, and using the brightness values ​​of the adjacent pixels in this direction to weightedly fit the new brightness value of the second pixel.

[0117] It should be noted that, in an embodiment of the present invention, the method of performing fine processing on the feature extraction image is similar to the method of performing fine processing on the grayscale frame image, that is, the method of obtaining the second processed image, the new brightness value of each second pixel in the second processed image, and the second reference pixel groups for determining the new brightness value of each second pixel is similar to the aforementioned method of obtaining the first processed image, the new brightness value of each first pixel in the first processed image, and the first reference pixel groups for determining the new brightness value of each first pixel, which will not be repeated here.

[0118] Step 802: Filter, from the first enhanced image, a second comparison pixel group that is at the same position as any second reference pixel group, and a second pixel to be processed that is at the same position as the corresponding second pixel; and, based on the color value corresponding to the second comparison pixel group, perform brightness adjustment processing on the color value of the second pixel to be processed to obtain a target color value of the second pixel to be processed.

[0119] It should be noted that, in an embodiment of the present invention, a method for determining the target color value of the second pixel to be processed in the first enhanced image is similar to a method for determining the first color value of the first pixel to be processed in the enlarged frame image. The method for determining the target color value of the second pixel to be processed in the first enhanced image can be executed by referring to the aforementioned method for determining the first color value, which will not be repeated here.

[0120] Step 803: Obtain a target enhanced image based on the target color value of each second pixel to be processed.

[0121] In an embodiment of the present invention, the computer device can process each second pixel to be processed in the first enhanced image based on the scheme in the aforementioned step 802, so as to obtain the target color value of each second pixel to be processed, and then can obtain the target enhanced image corresponding to the frame image to be processed based on the target color value of each second pixel to be processed.

[0122] For example, see Fig.10 As shown, Fig.10 Schematic diagram of a target enhanced image provided in the implementation of the present invention. It should be noted that in actual implementation, the target enhanced image can be a color image. Fig.10 The target enhanced image and Figure 7 By comparing with the first enhanced image shown, it can be seen that the target enhanced image has a clearer and more delicate outline and a better viewing experience, which has the effect of enlarging the image size while ensuring clarity.

[0123] In actual implementation, the computer device can be equipped with an AMD Radeon Vega display core platform. Based on the image enhancement method provided in the embodiment of the present invention, it only takes 10 milliseconds to enlarge an image with a resolution of 1920*1080 to an image with a resolution of 3840*2160, which means that real-time processing of dozens of frames of video per second can be basically achieved.

[0124] like Fig.11 As shown, the present invention provides an image enhancement device, including: a determination unit 1101, used to amplify a frame image to be processed to obtain an amplified frame image; and, determine a grayscale frame image corresponding to the amplified frame image; a first processing unit 1102, used to perform fine processing on the grayscale frame image to obtain a first processed image, a new brightness value of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel; a second processing unit 1103, further used to screen a first comparison pixel group at the same position as any of the first reference pixel groups and a first pixel to be processed at the same position as the corresponding first pixel from the amplified frame image; and, based on the color value corresponding to the first comparison pixel group, perform brightness adjustment processing on the color value of the first pixel to be processed to obtain the first color value of the first pixel to be processed; an obtaining unit 1104, used to obtain a first enhanced image corresponding to the frame image to be processed based on the first color value of each of the first pixels to be processed.

[0125] Optional,

[0126] The first processing unit 1102 is further configured to: determine a feature extraction map corresponding to the first processed image, and perform the refinement processing on the feature extraction map to obtain a second processed image, a new brightness value of each second pixel in the second processed image, and each second reference pixel group used to determine the new brightness value of each second pixel;

[0127] The second processing unit 1103 is further configured to: select, from the first enhanced image, a second comparison pixel group that is at the same position as any second reference pixel group, and a second pixel to be processed that is at the same position as the corresponding second pixel; and, based on the color value corresponding to the second comparison pixel group, perform brightness adjustment processing on the color value of the second pixel to be processed to obtain a target color value of the second pixel to be processed;

[0128] The obtaining unit 1104 is further configured to obtain a target enhanced image based on the target color value of each of the second pixels to be processed.

[0129] Optionally, the first processing unit 1102 is specifically used to: determine each brightness value corresponding to pixels in eight directions adjacent to one of the first pixels; determine a first new brightness value of the one of the first pixels and a first reference pixel group consisting of multiple pixels with the highest comprehensive brightness values ​​in the eight directions adjacent to the first pixel based on the brightness values ​​corresponding to the pixels in the eight adjacent directions and a preset strategy; obtain the first new brightness value of each of the first pixels, a first processed image determined based on the first new brightness value of each of the first pixels, and each first reference pixel group used to determine the new brightness value of each of the first pixels.

[0130] Optionally, the first processing unit 1102 is specifically used to: divide the pixels in the eight adjacent directions into multiple first comparison groups and second comparison groups corresponding to the first comparison groups based on the preset strategy; wherein the brightness value of at least one pixel in the first comparison group is greater than the brightness value of each pixel in the second comparison group; determine a sum value corresponding to the first comparison group to obtain a sum value set; wherein the sum value is used to characterize a comprehensive brightness value determined based on the brightness values ​​corresponding to each pixel in the first comparison group and the brightness value corresponding to the one first pixel; determine a maximum value in the sum value set, determine the maximum value as the first new brightness value of the one first pixel, and determine the pixel that determines the maximum value as the first reference pixel group used to determine a new brightness value of the one first pixel.

[0131] Optionally, the first processing unit 1102 is specifically used to: determine a first mean value of brightness values ​​corresponding to pixels in the first comparison group, and multiply the first mean value by a first preset weight to obtain a first product value; determine a second product value of the brightness value of the first pixel multiplied by a second preset weight; wherein the sum of the first preset weight and the second preset weight is a fixed value; add the first product value and the second product value to determine a sum value corresponding to the first comparison group.

[0132] Optionally, the second processing unit 1103 is specifically used to: determine the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group; perform weighted mean processing on the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group to obtain the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed; concatenate the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed into a binary number of the target numerical type, and use the binary number as the first color value of the first pixel to be processed.

[0133] Optionally, the second processing unit 1103 is specifically used to: determine a fourth mean of the transparency value or the red color value or the green color value or the blue color value corresponding to the first comparison pixel group, and determine a third product value of the fourth mean and a third preset weight; determine the first transparency value or the first green color value or the first blue color value or the first red color value of the first pixel to be processed, and determine a fourth product value of the first transparency value or the first green color value or the first blue color value or the first red color value and a fourth preset weight; determine the transparency adjustment value or the red color adjustment value or the green color adjustment value or the blue color adjustment value corresponding to the first pixel to be processed based on the third product value and the fourth product value, so as to determine the transparency adjustment value, the red color adjustment value, the green color adjustment value and the blue color adjustment value corresponding to the first pixel to be processed.

[0134] An embodiment of the present invention provides a computer device, including a program or an instruction. When the program or the instruction is executed, it is used to execute an image enhancement method and any optional method provided by the embodiment of the present invention.

[0135] An embodiment of the present invention provides a storage medium, including a program or an instruction. When the program or the instruction is executed, it is used to execute an image enhancement method and any optional method provided by the embodiment of the present invention.

[0136] Finally, it should be noted that: It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.

[0137] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0138] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0139] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for image enhancement, characterized in that: include: Amplify the frame image to be processed to obtain an amplified frame image; and, determining a grayscale frame image corresponding to the amplified frame image; Performing refinement processing on the grayscale frame image to obtain a first processed image, new brightness values ​​of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel; Selecting, from the amplified frame image, a first comparison pixel group that is in the same position as any of the first reference pixel groups, and a first to-be-processed pixel that is in the same position as the corresponding first pixel; and, based on the color value corresponding to the first comparison pixel group, performing brightness adjustment processing on the color value of the first pixel to be processed to obtain a first color value of the first pixel to be processed; Based on the first color value of each of the first pixels to be processed, obtaining a first enhanced image corresponding to the frame image to be processed; The step of performing fine processing on the grayscale frame image to obtain a first processed image, new brightness values ​​of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel includes: Determine respective brightness values ​​corresponding to pixels in eight directions adjacent to one of the first pixels; Based on the brightness values ​​corresponding to the pixels in the eight adjacent directions and a preset strategy, determine a first new brightness value of the first pixel and a first reference pixel group consisting of a plurality of pixels with the highest comprehensive brightness values ​​in the eight directions adjacent to the first pixel; Obtaining first new brightness values ​​of the respective first pixels, a first processed image determined based on the first new brightness values ​​of the respective first pixels, and respective first reference pixel groups used to determine new brightness values ​​of the respective first pixels; The determining, based on the respective brightness values ​​corresponding to the pixels in the eight adjacent directions and a preset strategy, a first new brightness value of the first pixel, and determining a first reference pixel group for determining a new brightness value of the first pixel, comprises: Based on the preset strategy, the pixels in the eight adjacent directions are divided into a plurality of first comparison groups and a second comparison group corresponding to the first comparison group; wherein the brightness value of at least one pixel in the first comparison group is greater than the brightness value of each pixel in the second comparison group; Determine a sum value corresponding to the first comparison group to obtain a sum value set; wherein the sum value is used to represent a comprehensive brightness value determined based on the brightness values ​​corresponding to each pixel in the first comparison group and the brightness value corresponding to the first pixel; Determine a maximum value in the sum value set, determine the maximum value as the first new brightness value of the first pixel, and determine the pixel that determines the maximum value as the first reference pixel group for determining a new brightness value of the first pixel.

2. The method according to claim 1, characterized in that After obtaining the first enhanced image corresponding to the frame image to be processed, the method further includes: Determine a feature extraction map corresponding to the first processed image, and perform the refinement processing on the feature extraction map to obtain a second processed image, a new brightness value of each second pixel in the second processed image, and each second reference pixel group used to determine the new brightness value of each second pixel; Selecting, from the first enhanced image, a second comparison pixel group at the same position as any of the second reference pixel groups, and a second pixel to be processed at the same position as the corresponding second pixel; and, based on the color value corresponding to the second comparison pixel group, performing brightness adjustment processing on the color value of the second pixel to be processed to obtain a target color value of the second pixel to be processed; A target enhanced image is obtained based on the target color value of each of the second pixels to be processed.

3. The method according to claim 1, characterized in that The determining a sum value corresponding to the first comparison group includes: Determine a first average value of brightness values ​​corresponding to pixels in the first comparison group, and multiply the first average value by a first preset weight value to obtain a first product value; Determine a second product value of the brightness value of the first pixel multiplied by a second preset weight; wherein the sum of the first preset weight and the second preset weight is a fixed value; The first product value and the second product value are added together to determine a sum value corresponding to the first comparison group.

4. The method according to any one of claims 1 to 3, characterized in that: The step of performing brightness adjustment processing on the color value of the first pixel to be processed based on the color value corresponding to the first comparison pixel group to obtain the first color value of the first pixel to be processed includes: Determine a transparency value, a red color value, a green color value, and a blue color value corresponding to the first comparison pixel group; Performing weighted average processing on the transparency value, red color value, green color value, and blue color value corresponding to the first comparison pixel group to obtain a transparency adjustment value, a red color adjustment value, a green color adjustment value, and a blue color adjustment value corresponding to the first pixel to be processed; The transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed are concatenated into a binary number of a target numerical type, and the binary number is used as a first color value of the first pixel to be processed.

5. The method according to claim 4, characterized in that The weighted average processing is performed on the transparency value, red color value, green color value and blue color value corresponding to the first comparison pixel group to obtain the transparency adjustment value, red color adjustment value, green color adjustment value and blue color adjustment value corresponding to the first pixel to be processed, including: Determine a fourth mean of the transparency value or the red color value or the green color value or the blue color value corresponding to the first comparison pixel group, and determine a third product value of the fourth mean and a third preset weight; Determine a first transparency value or a first green color value or a first blue color value or a first red color value of the first pixel to be processed, and determine a fourth product value of the first transparency value or the first green color value or the first blue color value or the first red color value and a fourth preset weight; Based on the third product value and the fourth product value, the transparency adjustment value or the red color adjustment value or the green color adjustment value or the blue color adjustment value corresponding to the first pixel to be processed is determined to determine the transparency adjustment value, the red color adjustment value, the green color adjustment value and the blue color adjustment value corresponding to the first pixel to be processed.

6. An image enhancement device, characterized in that: The device comprises: A determination unit, configured to amplify the frame image to be processed to obtain an amplified frame image; and determine a grayscale frame image corresponding to the amplified frame image; A first processing unit is used to perform fine processing on the grayscale frame image to obtain a first processed image, a new brightness value of each first pixel in the first processed image, and each first reference pixel group used to determine the new brightness value of each first pixel; The second processing unit is further configured to select, from the amplified frame image, a first comparison pixel group at the same position as any of the first reference pixel groups, and a first pixel to be processed at the same position as the corresponding first pixel; and, based on the color value corresponding to the first comparison pixel group, perform brightness adjustment processing on the color value of the first pixel to be processed to obtain a first color value of the first pixel to be processed; an obtaining unit, configured to obtain a first enhanced image corresponding to the frame image to be processed based on the first color value of each of the first pixels to be processed; Wherein, the first processing unit is specifically used for: Determine respective brightness values ​​corresponding to pixels in eight directions adjacent to one of the first pixels; Based on the brightness values ​​corresponding to the pixels in the eight adjacent directions and a preset strategy, determine a first new brightness value of the first pixel and a first reference pixel group consisting of a plurality of pixels with the highest comprehensive brightness values ​​in the eight directions adjacent to the first pixel; Obtaining first new brightness values ​​of the respective first pixels, a first processed image determined based on the first new brightness values ​​of the respective first pixels, and respective first reference pixel groups used to determine new brightness values ​​of the respective first pixels; The determining, based on the respective brightness values ​​corresponding to the pixels in the eight adjacent directions and a preset strategy, a first new brightness value of the first pixel, and determining a first reference pixel group for determining a new brightness value of the first pixel, comprises: Based on the preset strategy, the pixels in the eight adjacent directions are divided into a plurality of first comparison groups and a second comparison group corresponding to the first comparison group; wherein the brightness value of at least one pixel in the first comparison group is greater than the brightness value of each pixel in the second comparison group; Determine a sum value corresponding to the first comparison group to obtain a sum value set; wherein the sum value is used to represent a comprehensive brightness value determined based on the brightness values ​​corresponding to each pixel in the first comparison group and the brightness value corresponding to the first pixel; Determine a maximum value in the sum value set, determine the maximum value as the first new brightness value of the first pixel, and determine the pixel that determines the maximum value as the first reference pixel group for determining a new brightness value of the first pixel.

7. A computer device, characterized in that: The method comprises a program or an instruction. When the program or the instruction is executed, the method according to any one of claims 1 to 5 is performed.

8. A storage medium, characterized in that: The method comprises a program or an instruction. When the program or the instruction is executed, the method according to any one of claims 1 to 5 is performed.