Search

CN-122023221-A - Image enhancement method, computer device and readable storage medium

CN122023221ACN 122023221 ACN122023221 ACN 122023221ACN-122023221-A

Abstract

The application discloses an image enhancement method, computer equipment and a readable storage medium, and belongs to the technical field of image signal processing. The method comprises the steps of responding to input of a YUV image, carrying out brightness enhancement on a first brightness map corresponding to a Y channel of the YUV image to obtain a second brightness map, carrying out global average pooling operation on the first brightness map and a first chromaticity map corresponding to a UV channel of the YUV image to obtain statistical characteristics, carrying out color cast correction on the first chromaticity map based on the statistical characteristics to obtain a second chromaticity map, and carrying out linear transformation and recombination calculation on the second brightness map and the second chromaticity map based on an inverse conversion formula from YUV to RGB to obtain a nonlinear enhanced RGB image corresponding to the YUV image. The application can avoid color shift generated during image enhancement, thereby improving the classification precision of the downstream target detection network.

Inventors

  • TU HONGBIN
  • DAI MINJIE
  • LAI XINGYU
  • ZHOU RUIYANG
  • ZHOU SIQI
  • Chai Zhanyang
  • HU KAIDI

Assignees

  • 华东交通大学

Dates

Publication Date
20260512
Application Date
20260413

Claims (10)

  1. 1. An image enhancement method, the image enhancement method comprising: Responding to the input of a YUV image, carrying out brightness enhancement on a first brightness map corresponding to a Y channel of the YUV image to obtain a second brightness map; Performing global average pooling operation on the first luminance map and a first chromaticity diagram corresponding to a UV channel of the YUV image to obtain statistical characteristics; Performing color cast correction on the first chromaticity diagram based on the statistical characteristics to obtain a second chromaticity diagram; And performing linear transformation and recombination calculation on the second luminance map and the second chromaticity map based on a YUV-RGB inverse transformation formula to obtain a nonlinear enhanced RGB image corresponding to the YUV image.
  2. 2. The image enhancement method according to claim 1, wherein the performing luminance enhancement on the first luminance map corresponding to the Y channel of the YUV image to obtain a second luminance map includes: Calling a Zero reference depth curve estimation Zero-DCE model based on a first brightness map corresponding to a Y channel of the YUV image, and generating a group of pixel-level high-order curve parameter maps; constructing an iterative illumination enhancement model based on the high-order curve parameter diagram; and performing pixel-by-pixel nonlinear mapping on the first brightness map based on the iterative illumination enhancement model to obtain a second brightness map.
  3. 3. The method for enhancing an image according to claim 1, wherein the statistical feature includes a first global mean and a first global standard deviation corresponding to the luminance map, and a second global mean and a second global standard deviation corresponding to the chrominance map, and wherein performing color shift correction on the first chrominance map based on the statistical feature to obtain a second chrominance map includes: performing splicing processing on the first global average value, the first global standard deviation, the second global average value and the second global standard deviation to obtain a global feature vector; calling a multi-layer perceptron MLP comprising two full-connection layers based on the global feature vector to generate affine transformation parameters; And carrying out pixel-by-pixel linear transformation on the first chromaticity diagram based on the affine transformation parameters to obtain a second chromaticity diagram.
  4. 4. A method of image enhancement according to claim 3, wherein the affine transformation parameters comprise a 2 x2 scaling rotation matrix and a 2 x1 translation vector.
  5. 5. The image enhancement method according to any one of claims 1 to 4, wherein, in response to input of a YUV image, performing luminance enhancement on a first luminance map corresponding to a Y channel of the YUV image, and before obtaining a second luminance map, the method includes: performing a downsampling operation on a RAW image of a camera in response to input of the RAW image; invoking a parameter prediction model based on the down-sampled RAW image to generate a global illumination feature vector, wherein the parameter prediction model comprises 5 convolution blocks, and each convolution block comprises a convolution layer, a normalization layer and a Gaussian error linear unit GELU to activate a function; Decoding the global illumination feature vector to obtain a dynamic color correction matrix increment and a dynamic offset; And performing pixel-by-pixel linear transformation on the RAW image based on the dynamic color correction matrix increment, the dynamic offset, a preset white balance parameter and a preset basic color correction matrix to obtain a corresponding linear RGB image, wherein the linear RGB image is used for converting to obtain the YUV image.
  6. 6. The image enhancement method according to claim 5, wherein the performing linear transformation and reconstruction calculation on the second luminance map and the second chrominance map based on the YUV-to-RGB inverse transformation formula to obtain the non-linear enhanced RGB image corresponding to the YUV image includes: Calling a channel attention module SE-Block based on the nonlinear enhanced RGB image and the linear RGB image to generate a weighted fused image; performing mean filtering operation on the linear RGB image to obtain a high-frequency residual error; And injecting the high-frequency residual error into the weighted and fused image based on the learnable gating coefficient to obtain a reinforced image.
  7. 7. The image enhancement method according to any one of claims 1 to 4, wherein the performing linear transformation and reconstruction calculation on the second luminance map and the second chromaticity diagram based on the YUV-to-RGB inverse transformation formula to obtain a nonlinear enhanced RGB image corresponding to the YUV image includes: performing 2 times downsampling operation on the second chromaticity diagram to obtain a third chromaticity diagram; calling a residual convolution model, and removing the color spot noise in the third chromaticity diagram to obtain a fourth chromaticity diagram; Performing 2 times up-sampling operation on the fourth chromaticity diagram to obtain a fifth chromaticity diagram; And performing linear transformation and recombination calculation on the second luminance map and the fifth chromaticity map based on a YUV-RGB inverse transformation formula to obtain a nonlinear enhanced RGB image corresponding to the YUV image.
  8. 8. The image enhancement method of claim 7, wherein the residual convolution model comprises a pooling layer, a downsampling layer, an activation layer, a linearization layer, an upsampling layer, and a feature stitching layer.
  9. 9. A computer device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, which program or instruction when executed by the processor implements the steps of the image enhancement method according to any of claims 1-8.
  10. 10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the image enhancement method according to any of claims 1-8.

Description

Image enhancement method, computer device and readable storage medium Technical Field The application belongs to the technical field of image signal processing, and particularly relates to an image enhancement method, computer equipment and a readable storage medium. Background In recent years, image Signal Processing (ISP) based on deep learning has been proposed, in an attempt to directly recover a high quality sRGB image from a black-in-black, noise-intensive sRGB image directly output from an industrial camera through an end-to-end neural network, instead of the hardware ISP pipeline relying on manual tuning in the past. However, since the three channels of RGB simultaneously carry luminance information and chrominance information, in the process of greatly improving the luminance of the dark portion, it is often difficult to maintain a linear proportional relationship between the three channels, so that a non-physical color shift (such as green or purple of uncanny in night sky) occurs in the enhanced image, and the classification accuracy of the downstream target detection network is seriously affected. Disclosure of Invention An object of an embodiment of the present application is to provide an image enhancement method, a computer device, and a readable storage medium, which can avoid color shift generated during image enhancement, thereby improving classification accuracy of a downstream target detection network. In order to solve the technical problems, the application is realized as follows: in a first aspect, an embodiment of the present application provides an image enhancement method, including: Responding to the input of a YUV image, carrying out brightness enhancement on a first brightness map corresponding to a Y channel of the YUV image to obtain a second brightness map; Performing global average pooling operation on the first luminance map and a first chromaticity diagram corresponding to a UV channel of the YUV image to obtain statistical characteristics; Performing color cast correction on the first chromaticity diagram based on the statistical characteristics to obtain a second chromaticity diagram; And performing linear transformation and recombination calculation on the second luminance map and the second chromaticity map based on a YUV-RGB inverse transformation formula to obtain a nonlinear enhanced RGB image corresponding to the YUV image. In a second aspect, embodiments of the present application provide a computer device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the method as described in the first aspect. In a third aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect. In a fourth aspect, embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method as described in the first aspect. In the embodiment of the application, the luminance enhancement is only applied to the Y channel and the chromaticity optimization is only applied to the U, V channel by utilizing the YUV image to perform the bright color decoupling. The problem of color cast caused by unbalanced channel proportion when RGB three channels are enhanced simultaneously is fundamentally avoided, so that the problem of reduced classification precision of a downstream target detection network caused by color cast is avoided, and the classification precision of the downstream target detection network is further improved. Drawings FIG. 1 is one of the flow diagrams of an image enhancement method provided by some embodiments of the present application; FIG. 2 is one of the flow diagrams of the image enhancement method provided by some embodiments of the present application; FIG. 3 is a block diagram of a convolutional neural network provided by some embodiments of the present application; FIG. 4 is one of the flow diagrams of the image enhancement method provided by some embodiments of the present application; FIG. 5 is one of the flow diagrams of the image enhancement method provided by some embodiments of the present application; FIG. 6 is one of the flow diagrams of the image enhancement method provided by some embodiments of the present application; FIG. 7 is a comparison of a low-light original image, a processed image, and a normal-light image provided by some embodiments of the application; Fig. 8 is an internal block diagram of a computer device provided by some embodiments of the application. Detailed Description The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in wh