Image enhancement method and enhancement system in low-light environment

By combining traditional image processing and deep learning technology in low-light environments, clustering algorithms and brightness gain models are used to perform regional adaptive brightness adjustment and denoising on images, which solves the problem of image quality degradation in low-light environments and achieves Efficient and intelligent image enhancement.

CN118674655AActive Publication Date: 2024-09-20GUOCHUANG RUISHI ARTIFICIAL INTELLIGENCE TECHNOLOGY (SICHUAN) CO LTD

Patent Information

Application Number
CN202411163857.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-09-20
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

Image shooting in low-light environments leads to a reduction in visual quality. Existing technologies such as histogram equalization methods can easily lead to excessive image enhancement, loss of details, or color distortion in practical applications, and are difficult to adapt to complex and changeable low-light environments.

Method used

Combining traditional image processing technology and deep learning technology, by obtaining the original Raw domain image of the image, a clustering algorithm is used to segment the area, calculate the area brightness, and use the pre-trained brightness gain model to improve the brightness, and then use the denoising model to remove Noise processing to generate efficient, high-quality enhanced images.

Benefits of technology

It achieves efficient and intelligent brightness adjustment of images in low-light environments, avoids excessive enhancement or loss of details caused by global enhancement, and significantly improves the visual effects of images and the performance of computer vision systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674655A
    Figure CN118674655A
Patent Text Reader

Abstract

The invention provides an image enhancement method and enhancement system in a low-light environment, and belongs to the technical field of image processing, and the method comprises the steps: firstly obtaining an original Raw domain image of a to-be-enhanced image, calculating the brightness value of each pixel, then carrying out the region segmentation of the image through employing a clustering algorithm based on the brightness values of the pixels, generating a plurality of image regions, and carrying out the segmentation of the image regions; the method comprises the following steps: calculating a brightness mean value of each image area as area brightness, inputting the area brightness into a pre-trained brightness gain model, outputting corresponding gain coefficients, applying the gain coefficients to carry out brightness improvement on the corresponding image areas to obtain a gain Raw domain image, and finally, carrying out denoising processing on the gain Raw domain image by utilizing a denoising model to obtain a denoising result. Noise in the image is eliminated or reduced, and finally an enhanced image is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image enhancement method and enhancement system in a low-light environment. Background Art

[0002] In the field of image processing, image capture in low-light environments is a common challenge. Insufficient lighting conditions can significantly degrade the visual quality of images, leading to problems such as loss of detail, low contrast, and color distortion. These problems not only affect the viewing effect of the image, but also greatly limit the performance of computer vision systems, especially in key applications such as security monitoring, autonomous driving, and face recognition. Therefore, it is particularly important to develop an effective low-light image enhancement method.

[0003] Traditional low-light image enhancement methods mainly include histogram equalization (HE) and its improved versions, such as adaptive histogram equalization (AHE) and contrast-limited adaptive histogram equalization (CLAHE). These methods enhance the contrast by redistributing the pixel intensity of the image, but in practical applications they often lead to problems such as over-enhancement, loss of details or color distortion. In addition, these methods are usually based on global or local statistical information and are difficult to adapt to complex and changing low-light environments.

[0004] In recent years, with the rapid development of deep learning technology, more and more researchers have begun to explore the application of deep learning methods in the field of low-light image enhancement. By training a large amount of image data, deep learning algorithms can automatically learn the features of images and generate high-quality enhanced images. Among them, the deep learning model based on Retinex theory has shown good performance. Retinex theory simulates the color perception mechanism of the human eye, decomposes the observed image into two parts: a reflectance map and a brightness map, and achieves image enhancement by adjusting the brightness map. However, most of the existing Retinex-based deep learning models require careful design of artificial constraints and parameters, which limits the generalization performance of the model in different scene applications.

[0005] Therefore, it is necessary to provide an image enhancement method and enhancement system in a low-light environment to solve the above technical problems. Summary of the invention

[0006] In order to solve the above technical problems, the present invention provides an image enhancement method and enhancement system in a low-light environment, which combines traditional image processing technology and deep learning technology to achieve efficient and high-quality enhancement of low-light images. The present invention provides an image enhancement method in a low-light environment, the enhancement method comprising the following steps: S1: obtaining an original Raw domain image of the image to be enhanced, and obtaining the brightness value of each pixel in the original Raw domain image; S2: Based on the brightness value of each pixel, a clustering algorithm is used to perform region segmentation on the original Raw domain image to generate multiple image regions; S3: Calculating the regional brightness of the image area according to the brightness values ​​of all pixels in the image area, wherein the regional brightness is the average brightness of the image area; S4: inputting the regional brightness of each of the image regions into a pre-trained brightness gain model, outputting a gain coefficient of each of the image regions, and applying the output gain coefficient to enhance the brightness of the corresponding image region to obtain a gain Raw domain image; S5: Perform denoising processing on the gain Raw domain image using a denoising model to obtain an enhanced image.

[0007] Preferably, step S1 comprises the following steps: S101: obtaining an original Raw domain image of an image to be enhanced and performing format analysis; S102: Reading the RGB value of each pixel in the parsed original Raw domain image; S103: Perform weighted summation on the RGB values ​​of the pixel to obtain the brightness value corresponding to the pixel, where the brightness value The calculation formula is: in, , and They are value, and ’s weights, and their values ​​are 0.299, 0.587 and 0.114 respectively.

[0008] Preferably, step S2 comprises the following steps: S201: selecting an initial cluster center by random initialization according to the brightness value range of the original Raw domain image; S202: traverse each pixel in the original Raw domain image, and assign each pixel to the nearest cluster center according to the brightness value of each pixel; S203: after all pixels are assigned to cluster centers, the center of each cluster is recalculated according to the brightness values ​​of all pixels in each cluster; S204: repeating the above steps S202 and S203 to perform iterative optimization until the change of the cluster center is less than a preset threshold; S205: According to the final cluster center and the corresponding pixel set, the original Raw domain image is divided into multiple image regions, each image region is composed of a group of pixels belonging to the same cluster.

[0009] Preferably, the image region includes a connected region and a non-connected region on the image.

[0010] Preferably, step S3 comprises the following steps: S301: Read the brightness values ​​of all pixels in the image area; S302: Based on the brightness values ​​of all pixels in the image area, calculate the brightness mean of the image area, and identify the brightness mean as the area brightness.

[0011] Preferably, step S4 comprises the following steps: S401: inputting the calculated regional brightness of each image region into the brightness gain model for mapping processing to obtain a corresponding gain coefficient; S402: traversing all image regions, and multiplying the brightness value of each pixel in the image region by a gain coefficient to achieve brightness enhancement; S403: After traversing all image regions, the processed image regions are combined into a gain Raw domain image.

[0012] Preferably, the training of the brightness gain model includes: Collect training datasets containing image pairs in low-light and normal-light environments under the same scene; For each low-light image in the training data set, extract the regional brightness of its image area according to the method of steps S1 to S3; For each normal light image corresponding to the low light image, the regional brightness of its image area is also extracted, and the target gain coefficient from the low light image regional brightness to the normal light image regional brightness is calculated; The extracted low-light image area brightness and the corresponding target gain coefficient are used as training data and labels to construct and train a brightness gain model so that the brightness gain model learns the mapping relationship between the area brightness and the target gain coefficient.

[0013] Preferably, step S5 is specifically: The obtained gain Raw domain image is input into the pre-trained denoising model, and the noise in the image is analyzed and eliminated by the denoising model, so as to output an enhanced image with improved brightness and reduced noise.

[0014] The present invention further provides an image enhancement system in a low-light environment, which is used to execute the image enhancement method in a low-light environment, and the enhancement system comprises: A brightness acquisition module, used to acquire an original Raw domain image of the image to be enhanced, and acquire the brightness value of each pixel in the original Raw domain image; An image segmentation module, used to perform region segmentation on the original Raw domain image based on the brightness value of each pixel by using a clustering algorithm to generate multiple image regions; A regional brightness calculation module, used to calculate the regional brightness of the image area according to the brightness values ​​of all pixels in the image area, wherein the regional brightness is the brightness mean of the image area; A brightness gain adjustment module, used for inputting the regional brightness of each of the image regions into a pre-trained brightness gain model, outputting a gain coefficient of each of the image regions, and applying the output gain coefficient to enhance the brightness of the corresponding image region to obtain a gain Raw domain image; The denoising and enhancement module is used to perform denoising processing on the gain Raw domain image by using a denoising model to obtain an enhanced image.

[0015] Compared with the related art, the image enhancement method and enhancement system in a low-light environment provided by the present invention have the following beneficial effects: The present invention first obtains the original Raw domain image of the image to be enhanced and calculates the brightness value of each pixel. Then, a clustering algorithm is used to perform regional segmentation on the image based on the pixel brightness value to generate multiple image regions. The brightness mean of each image region is calculated as the regional brightness, and the regional brightness is input into a pre-trained brightness gain model. The corresponding gain coefficients are output, and the brightness of the corresponding image regions is enhanced by using these gain coefficients to obtain a gain Raw domain image. Finally, a denoising model is used to perform denoising on the gain Raw domain image to eliminate or reduce the noise in the image, and finally an enhanced image is obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of an image enhancement method in a low-light environment provided by the present invention; Figure 2 A module structure diagram of an image enhancement system in a low-light environment provided by the present invention. DETAILED DESCRIPTION

[0017] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention, rather than all structures, are shown in the accompanying drawings. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.

[0018] It should also be noted that, for ease of description, only the parts related to the present invention, but not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the various operations (or steps) as being processed sequentially, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the various operations can be rearranged. The processing can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.

[0019] Embodiment 1 The present invention provides an image enhancement method in a low-light environment, referring to Figure 1 As shown, the enhancement method comprises the following steps: S1: Obtain an original Raw domain image of an image to be enhanced, and obtain a brightness value of each pixel in the original Raw domain image.

[0020] In this embodiment, the original Raw domain image in a low-light environment is captured by an image sensor. Since the Raw domain image retains the most original image data and has not undergone processing steps such as color interpolation and white balance that may introduce noise or information loss, it can ensure that the acquired brightness value is the purest and most accurate. This provides a solid foundation for subsequent image processing and helps to improve the overall effect of image enhancement.

[0021] S2: Based on the brightness value of each pixel, a clustering algorithm is used to perform region segmentation on the original Raw domain image to generate multiple image regions.

[0022] In this embodiment, the K-means clustering algorithm is used to segment the image into multiple regions based on the brightness value of the pixels. The algorithm iteratively searches for the optimal cluster center and clusters pixels with similar brightness to form different image regions. This regional segmentation method can not only identify the dark and bright areas in the image, providing an accurate target area for subsequent brightness gain adjustment, but also retain the edge information of the image to avoid detail loss caused by global processing.

[0023] S3: Calculate the regional brightness of the image area according to the brightness values ​​of all pixels in the image area, wherein the regional brightness is the average brightness of the image area.

[0024] In this embodiment, for each image region obtained by clustering, the average value of the brightness values ​​of all pixels therein is calculated as the regional brightness of the region. This average value represents the overall brightness level of the region and is an important basis for subsequent brightness gain adjustment. By calculating the regional brightness, the brightness characteristics of each region can be more accurately grasped, thereby avoiding overexposure or underexposure problems caused by applying a uniform gain to the entire image.

[0025] S4: inputting the regional brightness of each of the image regions into a pre-trained brightness gain model, outputting a gain coefficient of each of the image regions, and applying the output gain coefficient to enhance the brightness of the corresponding image region to obtain a gain Raw domain image.

[0026] In this embodiment, a brightness gain model is pre-trained using deep learning technology, and the model can output corresponding gain coefficients according to the input regional brightness values. After the regional brightness of each image area is input into the model, the gain coefficients of the respective areas are obtained. Then, the corresponding image areas are brightness-enhanced according to these gain coefficients, that is, the brightness value of each pixel is multiplied by the corresponding gain coefficient. This area-based brightness adjustment method can intelligently adjust the gain according to the image content, avoiding the problems that may be caused by the global gain. At the same time, the overall brightness of the image after the brightness enhancement is significantly improved while retaining the details and layering, and the visual effect is brighter and clearer.

[0027] S5: Perform denoising processing on the gain Raw domain image using a denoising model to obtain an enhanced image.

[0028] In this embodiment, some noise may be introduced during the brightness enhancement process. In order to improve the image quality, the gain Raw domain image is denoised using the denoising model in deep learning. These denoising models can effectively identify and remove noise components in the image while retaining the edge and detail information of the image. After denoising, the image quality is further improved, becoming clearer and more natural. Denoising not only eliminates the noise that may be introduced during the brightness enhancement process, but also improves the overall visual effect and practical value of the image.

[0029] Specifically, step S1 includes the following steps: S101: Acquire the original Raw domain image of the image to be enhanced and perform format analysis.

[0030] In this embodiment, the original Raw domain image in a low-light environment is first captured by an image sensor (such as a CMOS or CCD sensor). The Raw domain image is data directly read from the sensor, which contains the original light intensity information of each pixel, but has not yet been processed by color interpolation, white balance, etc. Next, the acquired Raw domain image needs to be format parsed for subsequent processing, specifically: the metadata of the Raw file and the image data itself are parsed and converted into a processable format.

[0031] Format parsing is the first step in processing Raw domain images. It ensures that subsequent steps can correctly access and operate image data, converting Raw data into a processable format, and facilitating subsequent brightness extraction steps.

[0032] S102: Read the RGB value of each pixel in the parsed original Raw domain image.

[0033] In this embodiment, in the Raw domain image, each pixel point usually does not directly store the RGB value, but stores the original light intensity information of different color channels (such as red, green, and blue channels). Therefore, before reading the "RGB value" of each pixel, it is necessary to first perform demosaicing processing on the Raw data to interpolate the single color value of each pixel point into a complete RGB value. After the interpolation is completed, the parsed and interpolated RGB value can be read.

[0034] S103: Perform weighted summation on the RGB values ​​of the pixel to obtain the brightness value corresponding to the pixel, where the brightness value The calculation formula is: in, , and They are value, and ’s weights, and their values ​​are 0.299, 0.587 and 0.114 respectively.

[0035] In this embodiment, based on the difference in sensitivity of the human eye to different colors, the RGB values ​​of the pixel are weighted and summed to obtain the brightness value of the pixel. The weights commonly used are based on the results of psychophysical experiments, where the weights of red, green, and blue are 0.299, 0.587, and 0.114, respectively. By weighted summing the RGB values, a single value that can reflect the brightness of the pixel can be obtained.

[0036] Specifically, step S2 includes the following steps: S201: According to the brightness value range of the original Raw domain image, an initial cluster center is selected by random initialization.

[0037] In this embodiment, the number of clusters K in the K-means clustering algorithm is first determined, which can be set according to the degree of refinement required for processing. Then, according to the brightness value range of all pixels in the original Raw domain image, K different brightness values ​​are randomly selected as initial cluster centers. The selection of these initial cluster centers has a certain influence on the final result of the algorithm, but the K-means algorithm can usually reduce this influence through iterative optimization.

[0038] S202: traverse each pixel in the original Raw domain image, and assign each pixel to the nearest cluster center according to its brightness value.

[0039] In this embodiment, each pixel in the original Raw domain image is traversed, the distance between its brightness value and all cluster centers is calculated (expressed in Euclidean distance), and the pixel is assigned to the cluster center closest to it. In this way, each pixel is assigned to a cluster.

[0040] By assigning pixels to the nearest cluster center, the initial region segmentation of the image is achieved. This brightness value-based allocation method ensures that pixels of similar brightness are divided into the same region, providing a basis for subsequent regional brightness calculation and brightness gain adjustment.

[0041] S203: After all pixels are assigned to cluster centers, the center of each cluster is recalculated according to the brightness values ​​of all pixels in each cluster.

[0042] In this embodiment, after all pixels are assigned to cluster centers, the average value of the brightness values ​​of all pixels in each cluster is calculated, and the average value is used as the new cluster center. In this way, new K cluster centers are obtained, which are closer to the brightness value distribution center of the pixels in each cluster.

[0043] By continuously and iteratively updating the cluster centers, the algorithm can gradually converge to the global or local optimal solution. This updating method ensures that the cluster centers can better reflect the brightness characteristics of the pixels in each cluster.

[0044] S204: Repeat the above steps S202 and S203 to perform iterative optimization until the change of the cluster center is less than a preset threshold.

[0045] In this embodiment, steps S202 and S203 are repeatedly performed until the change in the cluster center (i.e., the distance difference between the new cluster center and the old cluster center) is less than a preset threshold value. This threshold value is set according to actual needs and is used to control the number of iterations and convergence accuracy of the algorithm.

[0046] Through iterative optimization, the K-means algorithm can gradually reduce the change in cluster centers until the algorithm converges. This iterative method ensures that the algorithm can find stable cluster centers and achieve accurate region segmentation of the image.

[0047] S205: According to the final cluster center and the corresponding pixel set, the original Raw domain image is divided into multiple image regions, each image region is composed of a group of pixels belonging to the same cluster.

[0048] In this embodiment, the original Raw domain image is segmented into multiple image regions according to the final cluster centers and the corresponding pixel sets. Each image region is composed of a group of pixels belonging to the same cluster, and these pixels have similar characteristics in terms of brightness values.

[0049] In addition, the image region includes a connected region and a non-connected region on the image.

[0050] In this embodiment, a connected region refers to a set of interconnected pixels in the original Raw domain image, which have adjacent boundaries in two-dimensional space, and whose brightness values ​​or features are classified as the same category by the clustering algorithm. In the K-means clustering algorithm, a connected region refers to a set of pixels belonging to the same cluster center, which not only have similar brightness values ​​in the image, but also are interconnected in spatial position, that is, each pixel is adjacent to at least one other pixel belonging to the same cluster.

[0051] Disconnected regions refer to a set of pixels in an image that have similar brightness values ​​or features but are not connected in space. In the results of the K-means clustering algorithm, since the algorithm mainly clusters based on the brightness values ​​of pixels without considering the spatial relationship between pixels, some disconnected regions may be generated. Although the pixels in these regions are classified into the same category by the clustering algorithm, they are not directly connected in the image, but are separated by other pixels that do not belong to the cluster.

[0052] Specifically, step S3 includes the following steps: S301: Read the brightness values ​​of all pixels in the image area.

[0053] In this embodiment, for each image region obtained by segmentation in step S2, all pixels in the region are traversed, and the brightness value of each pixel is read.

[0054] S302: Based on the brightness values ​​of all pixels in the image area, calculate the brightness mean of the image area, and identify the brightness mean as the area brightness.

[0055] In this embodiment, after reading the brightness values ​​of all pixels in the image area, the average value of these brightness values, i.e., the brightness mean value, is calculated. Specifically, the brightness values ​​of all pixels in the area are added together and then divided by the total number of pixels. The obtained brightness mean value is the regional brightness of the image area, which represents the average level of the overall brightness of the area.

[0056] Specifically, step S4 includes the following steps: S401: Inputting the calculated regional brightness of each image region into the brightness gain model for mapping processing to obtain a corresponding gain coefficient.

[0057] In this embodiment, a brightness gain model is designed. This model is trained using deep learning technology. The input of the model is the regional brightness, and the output is the corresponding gain coefficient. The gain coefficient is used to adjust the brightness of the image area to achieve the desired brightness enhancement effect.

[0058] The regional brightness of each image area is input into the brightness gain model, and the model will calculate the corresponding gain coefficient according to the preset mapping relationship. This gain coefficient is the multiplier factor required for subsequent adjustment of the brightness of the image area.

[0059] S402: traverse all image regions, and multiply the brightness value of each pixel in the image region by a gain coefficient to achieve brightness enhancement.

[0060] In this embodiment, after obtaining the gain coefficient of each image area, all image areas are traversed, and the brightness of the pixels in each area is adjusted. Specifically, the original brightness value of each pixel is multiplied by the corresponding gain coefficient to obtain the adjusted brightness value. This process achieves an overall improvement in the brightness of the image area.

[0061] It should be noted that when adjusting the brightness, the overflow problem of the brightness value needs to be considered. If the adjusted brightness value exceeds the range that the image data can represent (such as 0-255 for an 8-bit grayscale image), appropriate cropping and normalization are required to solve the overflow problem of the brightness value.

[0062] S403: After traversing all image regions, the processed image regions are combined into a gain Raw domain image.

[0063] In this embodiment, after the brightness adjustment of all image areas is completed, the processed image areas are recombined according to their positional relationship in the original Raw domain image to form a complete gain Raw domain image, and it is ensured that each image area maintains the correct position and size in the combined image to avoid misalignment or overlap.

[0064] Specifically, the training of the brightness gain model includes: Collect a training dataset containing image pairs in low-light and normal-light environments under the same scene.

[0065] For each low-light image in the training data set, the regional brightness of its image area is extracted according to the method of steps S1 to S3.

[0066] For each normal-light image corresponding to the low-light image, the regional brightness of its image area is also extracted, and a target gain coefficient from the low-light image regional brightness to the normal-light image regional brightness is calculated.

[0067] The extracted low-light image area brightness and the corresponding target gain coefficient are used as training data and labels to construct and train a brightness gain model so that the brightness gain model learns the mapping relationship between the area brightness and the target gain coefficient.

[0068] Specifically, step S5 is as follows: The obtained gain Raw domain image is input into the pre-trained denoising model, and the noise in the image is analyzed and eliminated by the denoising model, so as to output an enhanced image with improved brightness and reduced noise.

[0069] In this embodiment, the gain Raw domain image after brightness gain processing is input into a pre-trained denoising model. This denoising model is trained based on a large amount of image data containing noise, and is intended to learn and identify noise patterns in the image, and reduce or eliminate these noises through corresponding algorithms or network structures.

[0070] The specific implementation of the denoising model can rely on a deep learning model. When the gain Raw domain image is input into the denoising model, the model will analyze each pixel or pixel block in the image to determine whether it contains noise, and adjust the pixel value accordingly to reduce or eliminate the noise. This process is iterative until the model believes that the noise in the image has been reduced to an acceptable level.

[0071] The working principle of the image enhancement method in a low-light environment provided by the present invention is as follows: first, the original Raw domain image of the image to be enhanced is obtained, and the brightness value of each pixel is calculated. Then, the image is segmented into regions based on the pixel brightness value using a clustering algorithm to generate multiple image regions. The brightness mean of each image region is calculated as the regional brightness, and the regional brightness is input into a pre-trained brightness gain model, and the corresponding gain coefficient is output. These gain coefficients are applied to enhance the brightness of the corresponding image region to obtain a gain Raw domain image. Finally, the gain Raw domain image is denoised using a denoising model to eliminate or reduce the noise in the image, and finally an enhanced image is obtained.

[0072] Based on this, this application has the following advantages: Regional adaptive brightness enhancement: The image is segmented into regions through a clustering algorithm, and the mean brightness of each region is calculated to achieve regional adaptive brightness enhancement. This method can perform targeted enhancement based on the brightness characteristics of different regions, avoiding the problem of over-enhancement or detail loss that may be caused by global enhancement methods.

[0073] Deep learning denoising: The pre-trained denoising model is used to denoise the gain Raw domain image, which effectively eliminates the noise in the image. The denoising process not only improves the clarity of the image, but also improves the visual effect of the image and the accuracy of subsequent processing.

[0074] Good generalization performance: The method of the present invention does not rely on prior knowledge or artificial constraints of specific scenes, but automatically learns image features and performs enhancement processing through a deep learning model. Therefore, the method exhibits good generalization performance in different scenes and lighting conditions.

[0075] Embodiment 2 The present invention also provides an image enhancement system in a low-light environment, which is used to perform the image enhancement method in a low-light environment. Figure 2 As shown, the enhancement system comprises: The brightness acquisition module 100 is used to acquire an original Raw domain image of the image to be enhanced, and acquire the brightness value of each pixel in the original Raw domain image.

[0076] The image segmentation module 200 is used to perform region segmentation on the original Raw domain image based on the brightness value of each pixel by using a clustering algorithm to generate multiple image regions.

[0077] The regional brightness calculation module 300 is used to calculate the regional brightness of the image area according to the brightness values ​​of all pixels in the image area, wherein the regional brightness is the average brightness of the image area.

[0078] The brightness gain adjustment module 400 is used to input the regional brightness of each image area into a pre-trained brightness gain model, output a gain coefficient of each image area, and apply the output gain coefficient to enhance the brightness of the corresponding image area to obtain a gain Raw domain image.

[0079] The denoising and enhancement module 500 is used to perform denoising processing on the gain Raw domain image using a denoising model to obtain an enhanced image.

[0080] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes 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 generate 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.

[0081] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, the storage medium including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically-erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0082] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or includes elements that are inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device that includes the elements.

Claims

1. A method for image enhancement in a low-light environment, characterized in that: The enhancement method comprises the following steps: S1: obtaining an original Raw domain image of the image to be enhanced, and obtaining the brightness value of each pixel in the original Raw domain image; S2: Based on the brightness value of each pixel, a clustering algorithm is used to perform region segmentation on the original Raw domain image to generate multiple image regions; S3: Calculating the regional brightness of the image area according to the brightness values ​​of all pixels in the image area, wherein the regional brightness is the average brightness of the image area; S4: inputting the regional brightness of each of the image regions into a pre-trained brightness gain model, outputting a gain coefficient of each of the image regions, and applying the output gain coefficient to enhance the brightness of the corresponding image region to obtain a gain Raw domain image; S5: Perform denoising processing on the gain Raw domain image using a denoising model to obtain an enhanced image.

2. The image enhancement method in a low-light environment according to claim 1, characterized in that: Step S1 includes the following steps: S101: obtaining an original Raw domain image of an image to be enhanced and performing format analysis; S102: Reading the RGB value of each pixel in the parsed original Raw domain image; S103: Perform weighted summation on the RGB values ​​of the pixel to obtain the brightness value corresponding to the pixel, where the brightness value The calculation formula is: in, , and They are value, and ’s weights, and their values ​​are 0.299, 0.587 and 0.114 respectively.

3. The image enhancement method in a low-light environment according to claim 2, characterized in that: Step S2 includes the following steps: S201: selecting an initial cluster center by random initialization according to the brightness value range of the original Raw domain image; S202: traverse each pixel in the original Raw domain image, and assign each pixel to the nearest cluster center according to its brightness value; S203: after all pixels are assigned to cluster centers, the center of each cluster is recalculated according to the brightness values ​​of all pixels in each cluster; S204: repeating the above steps S202 and S203 to perform iterative optimization until the change of the cluster center is less than a preset threshold; S205: According to the final cluster center and the corresponding pixel set, the original Raw domain image is divided into multiple image regions, each image region is composed of a group of pixels belonging to the same cluster.

4. The image enhancement method in a low-light environment according to claim 3, characterized in that: The image region includes a connected region and a non-connected region on the image.

5. The image enhancement method in a low-light environment according to claim 4, characterized in that: Step S3 includes the following steps: S301: Read the brightness values ​​of all pixels in the image area; S302: Based on the brightness values ​​of all pixels in the image area, calculate the brightness mean of the image area, and identify the brightness mean as the area brightness.

6. The image enhancement method in a low-light environment according to claim 5, characterized in that: Step S4 includes the following steps: S401: inputting the calculated regional brightness of each image region into the brightness gain model for mapping processing to obtain a corresponding gain coefficient; S402: traversing all image regions, and multiplying the brightness value of each pixel in the image region by a gain coefficient to achieve brightness enhancement; S403: After traversing all image regions, the processed image regions are combined into a gain Raw domain image.

7. The image enhancement method in a low light environment according to claim 6, characterized in that: The training of the brightness gain model includes: Collect training datasets containing image pairs in low-light and normal-light environments under the same scene; For each low-light image in the training data set, extract the regional brightness of its image area according to the method of steps S1 to S3; For each normal light image corresponding to the low light image, the regional brightness of its image area is also extracted, and the target gain coefficient from the low light image regional brightness to the normal light image regional brightness is calculated; The extracted low-light image area brightness and the corresponding target gain coefficient are used as training data and labels to construct and train a brightness gain model so that the brightness gain model learns the mapping relationship between the area brightness and the target gain coefficient.

8. The image enhancement method in a low-light environment according to claim 7, characterized in that: Step S5 is specifically as follows: The obtained gain Raw domain image is input into the pre-trained denoising model, and the noise in the image is analyzed and eliminated by the denoising model, so as to output an enhanced image with improved brightness and reduced noise.

9. An image enhancement system in a low-light environment, used to execute the image enhancement method in a low-light environment as claimed in any one of claims 1 to 8, characterized in that: The enhancement system comprises: A brightness acquisition module, used to acquire an original Raw domain image of the image to be enhanced, and acquire the brightness value of each pixel in the original Raw domain image; An image segmentation module, used to perform region segmentation on the original Raw domain image based on the brightness value of each pixel by using a clustering algorithm to generate multiple image regions; A regional brightness calculation module, used to calculate the regional brightness of the image area according to the brightness values ​​of all pixels in the image area, wherein the regional brightness is the brightness mean of the image area; A brightness gain adjustment module, used for inputting the regional brightness of each of the image regions into a pre-trained brightness gain model, outputting a gain coefficient of each of the image regions, and applying the output gain coefficient to enhance the brightness of the corresponding image region to obtain a gain Raw domain image; The denoising and enhancement module is used to perform denoising processing on the gain Raw domain image by using a denoising model to obtain an enhanced image.

Citation Information

Patent Citations

  • Method and apparatus for suppress glare and enhancing image in low illumination image

    CN109064426A

  • Single image defogging method based on bright and dark region segmentation

    CN115456905A

  • Illumination enhancement method and system for image with non-uniform brightness distribution, medium and equipment

    CN117333401A

  • Display device and operating method thereof

    CN118020285A

  • Image enhancement method and system for power transmission channel, and storage medium

    CN118212150A

Cited By

  • Low-illumination video image enhancement method based on brightness automatic perception

    CN119477710A