Exposure correction method and system based on illumination perception mechanism

Through the exposure correction method based on the light perception mechanism, the K-mean mask division and light perception module are used to solve the feature extraction and correction problems of uneven exposure images, and an exposure uniform image is generated, which reduces the calculation complexity and improves resource efficiency.

CN120451484AActive Publication Date: 2025-08-08TIANJIN POLYTECHNIC UNIV

Patent Information

Application Number
CN202510956129.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-08-08
Estimated Expiration
2045-07-11

AI Technical Summary

Technical Problem

When processing uneven exposure images, the prior art cannot accurately extract the features of different lighting areas, and the calculation complexity is high, making it difficult to achieve local lighting correction, resulting in overexposure and high resource demand.

Method used

Using an exposure correction method based on the light perception mechanism, different exposure area masks are generated through the K-mean mask division module, combined with the light sensing local feature extraction module and the global exposure correction module, the normal exposure area information is used to guide the correction of underexposed and overexposed areas, and local feature extraction and global information interaction are realized.

Benefits of technology

Generate images with uniform exposure, reduce calculation complexity, improve resource utilization efficiency, and improve image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451484A_ABST
    Figure CN120451484A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and particularly discloses an exposure correction method and system based on an illumination perception mechanism, and the method comprises the steps: obtaining a non-uniform exposure image; generating masks of the underexposure area, the normal exposure area and the overexposure area; the non-uniform exposure image is subjected to convolution operation and extraction to obtain an initial feature map, the initial feature map is sequentially subjected to multiple times of down-sampling and up-sampling to obtain feature maps with different scales, then a processed feature map is obtained through convolution operation, and the processed feature map and the non-uniform exposure image are fused to obtain an image with uniform exposure; and respectively carrying out local feature extraction and global exposure correction on the initial feature map and the feature maps with different scales by using masks. Different modes are adopted for processing different areas, perception and information interaction between the different areas are enhanced, the quality of the non-uniform exposure image can be improved, and finally an image with uniform exposure is generated.
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 exposure correction method and system based on a light perception mechanism. Background Art

[0002] In real-world scenarios, image exposure distribution is often uneven. A single image may contain both underexposed and overexposed areas, posing a significant challenge to image enhancement. Therefore, how to process unevenly exposed images and output a uniformly exposed image through a series of exposure correction algorithms has become a hot topic of research.

[0003] Researchers at home and abroad have proposed many exposure correction methods to correct uneven lighting. These methods can be roughly divided into traditional methods and deep learning-based methods. Traditional methods are often unable to perceive the differences in features between different regions, and will take uniform processing measures for all pixels, resulting in excessive enhancement of local areas and thus overexposure. Deep learning-based methods mainly focus on low-light image enhancement and double-exposure image enhancement. Low-light image enhancement usually only enhances areas with lower brightness, while double-exposure image enhancement often uses global enhancement or global suppression, which cannot achieve local illumination correction for specific areas. Therefore, existing methods are either global enhancement or global suppression, which makes it difficult to achieve accurate processing of unevenly exposed images, that is, enhancement in underexposed areas and suppression in overexposed areas.

[0004] Existing technologies still have significant deficiencies in feature extraction between different illumination areas, modeling of different illumination areas, and computational complexity and efficiency.

[0005] 1. Feature extraction between regions with different lighting conditions: Both traditional methods and deep learning-based technologies typically perform a global, unified feature extraction on the input image. However, due to uneven exposure in the input image, features vary significantly between regions. Therefore, using a global, unified feature extraction approach cannot achieve accurate feature extraction.

[0006] 2. Modeling unevenly illuminated areas: Existing deep learning frameworks typically use convolutional neural networks (CNNs) or Transformers for global, unified modeling. However, in images with uneven exposure, the features of different exposed areas vary significantly, and these frameworks often fail to effectively perceive the complementary information between different areas.

[0007] 3. Computational complexity and efficiency: Images with uneven exposure are often large, and data processing requires high computational complexity. Existing deep learning models based on scalar convolution have large parameter counts, high resource requirements for training and inference, and high hardware performance, making them difficult to apply in resource-constrained scenarios. Summary of the Invention

[0008] The present invention aims to address the issue of uneven exposure in images captured under uneven lighting conditions. To this end, the present invention provides an exposure correction method and system based on a light perception mechanism. By thoroughly studying the differences in features between different regions (underexposed, normally exposed, and overexposed), the system employs a divide-and-conquer strategy, using information from normally exposed regions as a guide to correct underexposed and overexposed areas. Different approaches are employed for each region, and perception and information interaction between these regions are enhanced. This approach improves the quality of unevenly exposed images, ultimately generating a uniformly exposed image.

[0009] The present invention provides an exposure correction method based on a light perception mechanism, which adopts the following technical solution: comprising the following steps: S1: Obtain non-uniform exposure image; S2: Generate masks of underexposed areas, normally exposed areas, and overexposed areas based on the non-uniform exposure image; S3: The non-uniform exposure image is subjected to a convolution operation to extract an initial feature map. The initial feature map is sequentially downsampled and upsampled multiple times to obtain feature maps of different scales. The processed feature map is then obtained by convolution operation. The processed feature map is fused with the non-uniform exposure image to obtain an image with uniform exposure. Among them, masks are used to perform local feature extraction and global exposure correction on the initial feature map and feature maps of different scales, respectively.

[0010] Furthermore, step S2 includes the following steps: S2.1: Calculate the average of the three channels of the non-uniformly exposed image, obtain a map of the averages, and flatten it into a one-dimensional vector; S2.2: Randomly initialize three cluster centers, calculate the Euclidean distance between each pixel of the one-dimensional vector and the cluster center, assign the pixel to the cluster center with the shortest Euclidean distance, and average all pixels in each cluster to update the cluster center; S2.3: Repeat step S2.2. When the absolute difference between the new and old cluster centers is less than a preset threshold, the clustering operation is terminated; and masks of underexposed areas, normally exposed areas, and overexposed areas are obtained.

[0011] Furthermore, the specific process of using masks to extract local features is as follows: S3.11: Use spatial attention to obtain enhanced features based on the input feature map; S3.12: Based on the enhanced features, the convolution kernel generator generates corresponding convolution kernels for different illumination areas. S3.13: Use the corresponding convolution kernel to perform illumination-aware feature extraction on the enhanced features to obtain feature maps of different regions; S3.14: Multiply the feature maps of different regions with the corresponding masks and then add them together to obtain a feature map containing local features.

[0012] Furthermore, the specific process of using masks to extract local features is expressed by the following formula: in, represents the enhanced features, represents the Sigmod activation function, Represents a splicing operation, represents global maximum pooling, represents global average pooling, represents the Hamada product, represents the input feature map, represents the corresponding convolution kernel, represents the convolution kernel generator, Represents the feature maps of different regions, represents the convolution operation, Represents a feature map containing local features, represents the dot product, Indicates a mask.

[0013] Furthermore, the specific process of using the mask for global exposure correction is as follows: The feature map containing local features is normalized and input into the illumination-aware attention module. The feature map containing local features is added as a residual to the output of the illumination-aware attention module to obtain a summary feature. The illumination-aware attention module is used to correct the features of underexposed and overexposed areas using a mask and the features of the normally exposed area as a guide. The summary features are normalized and then passed through a feedforward neural network to obtain refined features, which are then fused with the summary features to obtain output features.

[0014] Furthermore, the specific process of the light perception attention module is as follows: Using the normalized feature map containing local features, we get the Q vector, K vector, and V vector. Combined with the mask, we get the Q vector, K vector, and V vector for different exposure areas. The Q vector of the normal exposure area is used together with the K vector and V vector of the different exposure areas to calculate the attention weight maps of the different exposure areas. The attention weight maps of different exposure areas are summed to obtain the final weight map.

[0015] Furthermore, the specific process of the illumination perception attention module is expressed by the following formula: in, Represents the feature map containing local features after normalization, A mask representing the normally exposed area, a mask for the underexposed area, and a mask for the overexposed area, represents the dot product, represents the Q weight matrix of point-by-point convolution, represents the K weight matrix of point-by-point convolution, V represents the weight matrix of point-by-point convolution, represents the Q weight matrix of channel-by-channel convolution, represents the K weight matrix of channel-by-channel convolution, V represents the weight matrix of channel-by-channel convolution, Q vectors representing different exposure regions, K vectors representing different exposure areas, V vector representing different exposure areas; in, The Q vector representing the normally exposed area, V vector representing the underexposed area, The V vector represents the normal exposure area, The V vector represents the overexposed area, K vector representing the underexposed area, K vector representing the normally exposed area, K vector representing the overexposed area, represents the Softmax operation, represents the matrix transpose, represents the scaling factor, Attention weight map representing the underexposed area, Represents the attention weight map of the normally exposed area, Attention weight map representing the overexposed area, Represents the final weight graph.

[0016] Furthermore, the masks of the underexposed area, the normally exposed area, and the overexposed area are downsampled to obtain masks of different scales, which correspond to the initial feature map and the feature maps of different scales, respectively.

[0017] Furthermore, the number of downsampling and upsampling is 2, and the convolution operation adopts 3x3 convolution.

[0018] The present invention also provides an exposure correction system based on a light perception mechanism, which adopts the following technical solution: comprising: an image acquisition module, a mask generation module and an image correction module, The image acquisition module is used to obtain a non-uniform exposure image; The mask generation module is used to generate masks of underexposed areas, normally exposed areas, and overexposed areas according to the non-uniform exposure image; The image correction module is configured to extract an initial feature map from the non-uniformly exposed image through a convolution operation, obtain feature maps of different scales through multiple downsampling and upsampling operations, obtain a processed feature map through a convolution operation, and fuse the processed feature map with the non-uniformly exposed image to obtain an image with uniform exposure; Among them, masks are used to perform local feature extraction and global exposure correction on the initial feature map and feature maps of different scales, respectively.

[0019] The above one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: 1. The present invention fully considers the differences in illumination across regions of unevenly exposed images. In the feature extraction stage, a corresponding convolution kernel is used for feature extraction in each region. In the final exposure correction stage, the long-range dependency characteristics of the Transformer are utilized to enable information interaction between regions, enabling the present invention to process unevenly exposed images.

[0020] 2. The present invention constructs a K-means mask partitioning module to generate masks of different exposure areas based on the non-uniform exposure image to guide the exposure correction process.

[0021] 3. This paper constructs an illumination-aware local feature extraction module that combines spatial attention with precise feature extraction for images at each stage. It uses region masks to guide the network's focus on features in different exposure regions, thereby extracting local features at different scales. Dynamic grouped convolution is employed within this module, with a convolution kernel generator generating convolution kernels for different illumination regions.

[0022] 4. The present invention constructs a light-aware global exposure correction module, which uses the information of the normally exposed area as a guide to correct the lighting of the underexposed area and the overexposed area respectively, and realizes the interaction of information between different areas through the long-distance dependency of the attention mechanism.

[0023] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 It is a flow chart of the method provided by the present invention.

[0026] Figure 2 This is the overall network flow chart provided by the present invention.

[0027] Figure 3 This is a flow chart of the illumination perception local feature extraction module provided by the present invention.

[0028] Figure 4 This is a flow chart of the illumination-aware global exposure correction module provided by the present invention.

[0029] Figure 5 This is a flow chart of the light perception attention module provided by the present invention. DETAILED DESCRIPTION

[0030] To make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the present invention. Obviously, the embodiments described are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.

[0031] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0032] To address exposure issues in images captured under non-uniform lighting conditions, the present invention analyzes the characteristics of input images with non-uniform exposure and discovers that within an image with non-uniform lighting, there is always a portion with normal lighting information. Based on this observation, the present invention uses information from normally exposed areas as a guide to correct the lighting in underexposed and overexposed areas. To this end, the present invention designs an illumination-aware exposure correction network (IAEC-Net) to correct for non-uniform lighting. IAEC-Net employs a multi-scale network architecture. Specifically, it uses two downsampling operations to obtain feature maps at three scales, thereby enabling the interaction of information at different scales. IAEC-Net consists of three key modules: a K-means mask generation module (KMG), an illumination-aware local-feature extraction module (ILEM), and an illumination-aware global-exposure correction module (IGEM). KMG uses the K-means clustering algorithm to generate masks for different exposure regions, dividing the image area into underexposed, normally exposed, and overexposed regions. The masks are then downsampled to generate three sets of masks at different scales. Subsequently, ILEM, based on these generated masks and combined with dynamic group convolution, can generate a corresponding convolution kernel for each specific region, achieving efficient and accurate feature extraction. Finally, IGEM refines the extracted features and, using the features of the normally exposed (medium exposed) region as a guide, corrects the exposure information of the underexposed and overexposed regions. This invention provides an efficient and physically interpretable exposure correction method that can improve the quality of unevenly exposed images and generate a uniformly exposed image.

[0033] The following combination Figures 1 to 5 The present invention is further described in detail, and an exposure correction method and system based on a light perception mechanism of the present invention are described: In this embodiment, Figure 1 and Figure 2 As shown, an exposure correction method based on a light perception mechanism is provided, comprising the following steps: S1: Obtain a non-uniform exposure image.

[0034] S2: Generate masks of underexposed areas, normally exposed areas, and overexposed areas according to the non-uniform exposure image.

[0035] The features of different exposed regions in a non-uniformly exposed image vary significantly, making it unreasonable to uniformly process all regions. Therefore, a mask is required to divide the input image into different regions. Therefore, this embodiment constructs a K-means mask partitioning module to generate masks for different exposed regions based on the non-uniformly exposed image, guiding the exposure correction process. The specific operations are as follows.

[0036] First, calculate the average value of the three channels of the non-uniform exposure image and obtain a graph of the average value. , ,in, represents the set of real numbers, Indicates the height of the image, Represents the width of the image, flattened into a one-dimensional vector , ,in, Indicates the size of the feature map, and then applies the K-means clustering algorithm.

[0037] Specifically, this embodiment randomly initializes n cluster centers, where n is set to 3, indicating the number of regions to be divided, corresponding to underexposed regions, normal exposed regions, and overexposed regions. The Euclidean distance between each pixel and the cluster center ,in, represents the i-th pixel, Denotes the kth cluster center. Then, based on the Euclidean distance between each pixel and each cluster center, the pixel is assigned to the cluster center with the shortest Euclidean distance. During the clustering process, all pixels in each cluster are averaged to update the cluster center. This process is then repeated. When the absolute difference between the new and old cluster centers is less than a preset threshold, the clustering operation is terminated, and masks for underexposed areas, normally exposed areas, and overexposed areas are generated. The above process can be expressed by the following formula: (1) (2) (3) in, Represents pixel points and cluster centers The Euclidean distance of Indicates that it belongs to the cluster center The total number of all pixels, represents the preset threshold value of the difference between the old and new cluster centers, represents the new cluster center, represents the old cluster center, Represents the kth cluster. Through this process, three types of region masks can be generated.

[0038] S3: The non-uniform exposure image is subjected to a convolution operation to extract an initial feature map. The initial feature map is sequentially downsampled and upsampled multiple times to obtain feature maps of different scales. The processed feature map is then obtained by convolution operation. The processed feature map is fused with the non-uniform exposure image to obtain an image with uniform exposure. For the initial feature map and the feature maps of different scales, masks are used to perform local feature extraction and global exposure correction respectively. After the initial feature map and the feature maps of different scales have undergone local feature extraction and global exposure correction, the next steps are carried out, such as downsampling, upsampling, and convolution.

[0039] like Figure 2 As shown, in this embodiment, the number of downsampling and upsampling is 2, and both convolution operations use 3x3 convolution.

[0040] To match the downsampled and upsampled feature maps, this embodiment downsamples the masks of the underexposed, normally exposed, and overexposed regions to obtain masks of different scales. The masks calculated in step S2 of this embodiment are used for local feature extraction and global exposure correction of the five feature maps. Two masks are downsampled once, and one mask is downsampled twice.

[0041] This embodiment constructs a light-aware local feature extraction module, uses the mask obtained in step S2, combines spatial attention to accurately extract features from images at each stage, and uses regional masks to guide the network to focus on features of different exposure areas, thereby extracting local features at different scales. The process is as follows: Figure 3 shown.

[0042] The specific process of using masks to extract local features is as follows: S3.11: Feature map of input , using spatial attention, through global average pooling and global maximum pooling, the network can perceive global information, and the neural network gives different weights to different areas to obtain enhanced features .

[0043] S3.12: Based on the enhanced features, dynamic group convolution is used to generate corresponding convolution kernels for different illumination areas through the convolution kernel generator. .

[0044] Specifically, the input is first downsampled to a size of k×k through adaptive average pooling. This step allows the convolution kernel to sense the characteristics of a specific area. Then, it is processed by two 1×1 convolutional layers: the first convolutional layer outputs a tensor of shape k×k×n² and applies the Sigmoid activation function; the second convolutional layer uses grouped convolution with n groups. Each group is adaptively adjusted according to the image characteristics, and a corresponding convolution kernel can be generated for different lighting areas. .

[0045] S3.13: Using the corresponding convolution kernel , perform illumination-aware feature extraction on the enhanced features to obtain feature maps of different regions .

[0046] S3.14: Combine feature maps of different regions with corresponding masks Multiply and then add the sum to obtain a feature map containing local features.

[0047] The process of local feature extraction using masks can be expressed by the following formula: (4) (5) (6) (7) in, represents global maximum pooling, represents global average pooling, represents the Sigmod activation function, Represents a splicing operation, represents the dot product, represents the Hamada product, represents the convolution kernel generator, Represents a feature map containing local features, Represents a convolution operation.

[0048] This embodiment uses the fine features of each area extracted by local features and combines them with masks to guide exposure correction. This embodiment constructs a light-aware global exposure correction module. The process is as follows: Figure 4 As shown, the illumination-aware attention module (IAM) guides the calculation of attention so that the underexposed areas and overexposed areas can fully learn the exposure information of the normally exposed areas to correct uneven lighting.

[0049] The specific steps for global exposure correction using masks are as follows: First, the feature map containing local features is normalized and input into the IAM. Then, the feature map containing local features is added as a residual to the output of the IAM using a direct skip connection to obtain the summary feature. After that, the summary feature is normalized and further refined and integrated through a feedforward neural network (FFN) to obtain the refined feature. Finally, another skip connection fuses the summary feature with the refined feature to obtain the output feature. .

[0050] The process of global exposure correction using masks can be expressed by the following formula: (8) (9) in, represents the illumination-aware attention module, represents a feedforward neural network, Representation layer normalization, Represents a summary feature.

[0051] Light-aware attention module: Since the lighting in underexposed and overexposed areas is very uneven, information from normally exposed areas is needed as a guide to correct their lighting separately. The long-range dependencies of the attention mechanism are used to enable information interaction between different areas.

[0052] like Figure 5 As shown in FIG, the illumination-aware attention module uses a mask to correct the features of the underexposed and overexposed areas using the features of the normally exposed area as a guide. The specific process is as follows: The normalized feature map containing local features undergoes three group convolutions to generate the corresponding query (Q vector), key (K vector), and value (V vector), thus forming the three vectors required by the self-attention block. The Q vector, K vector, and V vector are then multiplied with the mask of the normally exposed area, the mask of the underexposed area, and the mask of the overexposed area, respectively, to obtain the corresponding vectors. The specific process can be described by the following formula: (10) (11) (12) in, Represents the feature map containing local features after normalization; A mask representing a normally exposed area, a mask representing an underexposed area, and a mask representing an overexposed area; represents the Q weight matrix of point-by-point convolution, represents the K weight matrix of point-by-point convolution, V represents the weight matrix of point-by-point convolution, represents the Q weight matrix of channel-by-channel convolution, represents the K weight matrix of channel-by-channel convolution, V represents the weight matrix of channel-by-channel convolution; Represents the Q vectors of different exposure areas, corresponding to the Q vectors of underexposed areas , Q vector of the normal exposure area , Q vector of the overexposed area ; K vectors representing different exposure areas, corresponding to the K vectors of underexposed areas , K vector of the normal exposure area , K vector of overexposed area ; Represents the V vectors of different exposure areas, corresponding to the V vectors of underexposed areas , V vector of the normal exposure area , V vector of the overexposed area .

[0053] By calculation and The dot product of is used to obtain the attention score, which is normalized by the Softmax function. The Softmax operation ensures that a weight matrix is obtained, each row of which represents the correlation between different channels. Finally, the obtained attention weight is applied to Go up and get Similarly, and Do the dot product and apply it to Get ;Will and Do the dot product and apply it to Get Finally, 、 、 Add the attention weight maps to get the final weight map . Correction information from underexposed areas as well as overexposed areas is included to achieve the final correction.

[0054] The specific process can be expressed by the following formula.

[0055] (13) (14) (15) (16) in, represents the final weight graph, Attention weight map representing the underexposed area, Represents the attention weight map of the normally exposed area, Attention weight map representing the overexposed area, represents the Softmax operation, represents the matrix transpose, Represents the scaling factor.

[0056] To verify the superior performance of this method, this example conducted quantitative and subjective comparison experiments on the public Local Color Distributions Prior dataset against several state-of-the-art algorithms. These algorithms include Zero-DCE (CVPR 2020), HWMNet (ECCV 2022), FECNet (ECCV2022), SNRNet (CVPR 2022), LCDPNet (ECCV 2022), FourLLIE (ACM MM 2023), Retinexformer (ICCV 2023), LLformer (AAAI 2023), and CSEC (CVPR 2024). To better visualize the differences between the generated images, the peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) were calculated between the generated results and the ground-truth (GT). The experimental results are shown in Table 1. The quantitative results demonstrate that this method outperforms the indicators of recent state-of-the-art algorithms. Table 1 also shows the number of trainable parameters (Params) in the model, in millions (M), and the number of floating-point operations (Flops), in billions (G).

[0057] Table 1

[0058] This embodiment also provides an exposure correction system based on a light perception mechanism, which adopts the following technical solution: including: an image acquisition module, a mask generation module and an image correction module.

[0059] The image acquisition module is used to obtain a non-uniform exposure image; The mask generation module is used to generate masks of underexposed areas, normally exposed areas, and overexposed areas according to the non-uniform exposure image; The image correction module is configured to extract an initial feature map from the non-uniformly exposed image through a convolution operation, obtain feature maps of different scales through multiple downsampling and upsampling operations, obtain a processed feature map through a convolution operation, and fuse the processed feature map with the non-uniformly exposed image to obtain an image with uniform exposure; Among them, masks are used to perform local feature extraction and global exposure correction on the initial feature map and feature maps of different scales, respectively.

[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. An exposure correction method based on a light perception mechanism, characterized in that: The following steps are involved: S1: Obtain non-uniform exposure image; S2: Generate masks of underexposed areas, normally exposed areas, and overexposed areas based on the non-uniform exposure image; S3: The non-uniform exposure image is subjected to a convolution operation to extract an initial feature map. The initial feature map is sequentially downsampled and upsampled multiple times to obtain feature maps of different scales. The processed feature map is then obtained by convolution operation. The processed feature map is fused with the non-uniform exposure image to obtain an image with uniform exposure. Among them, masks are used to perform local feature extraction and global exposure correction on the initial feature map and feature maps of different scales, respectively.

2. The exposure correction method based on the light perception mechanism according to claim 1, characterized in that: Step S2 includes the following steps: S2.1: Calculate the average of the three channels of the non-uniformly exposed image, obtain a map of the averages, and flatten it into a one-dimensional vector; S2.2: Randomly initialize three cluster centers, calculate the Euclidean distance between each pixel of the one-dimensional vector and the cluster center, assign the pixel to the cluster center with the shortest Euclidean distance, and average all pixels in each cluster to update the cluster center; S2.3: Repeat step S2.

2. When the absolute difference between the new and old cluster centers is less than a preset threshold, the clustering operation is terminated; and masks of underexposed areas, normally exposed areas, and overexposed areas are obtained.

3. The exposure correction method based on the light perception mechanism according to claim 1, characterized in that: The specific process of using masks to extract local features is as follows: S3.11: Use spatial attention to obtain enhanced features based on the input feature map; S3.12: Based on the enhanced features, the convolution kernel generator generates corresponding convolution kernels for different illumination areas. S3.13: Use the corresponding convolution kernel to perform illumination-aware feature extraction on the enhanced features to obtain feature maps of different regions; S3.14: Multiply the feature maps of different regions with the corresponding masks and then add them together to obtain a feature map containing local features.

4. The exposure correction method based on the light perception mechanism according to claim 3, wherein: The specific process of using masks to extract local features is expressed by the following formula: in, represents the enhanced features, represents the Sigmod activation function, Represents a splicing operation, represents global maximum pooling, represents global average pooling, represents the Hamada product, represents the input feature map, represents the corresponding convolution kernel, represents the convolution kernel generator, Represents the feature maps of different regions, represents the convolution operation, Represents a feature map containing local features, represents the dot product, Indicates a mask.

5. The exposure correction method based on the light perception mechanism according to claim 1, wherein: The specific process of global exposure correction using mask is as follows: Normalize the feature map containing local features and input it into the illumination-aware attention module. Then add the feature map containing local features as the residual to the output of the illumination-aware attention module to obtain the summary feature. The illumination-aware attention module is used to correct the features of the underexposed and overexposed areas using a mask and taking the features of the normally exposed areas as a guide; The summary features are normalized and then passed through a feedforward neural network to obtain refined features, which are then fused with the summary features to obtain output features.

6. The exposure correction method based on the light perception mechanism according to claim 5, characterized in that: The specific process of the light perception attention module is as follows: Using the normalized feature map containing local features, we get the Q vector, K vector, and V vector. Combined with the mask, we get the Q vector, K vector, and V vector for different exposure areas. The Q vector of the normal exposure area is used together with the K vector and V vector of the different exposure areas to calculate the attention weight maps of the different exposure areas. The attention weight maps of different exposure areas are summed to obtain the final weight map.

7. The exposure correction method based on the light perception mechanism according to claim 6, characterized in that: The specific process of the light perception attention module is expressed by the following formula: in, Represents the feature map containing local features after normalization, A mask representing the normally exposed area, a mask for the underexposed area, and a mask for the overexposed area, represents the dot product, represents the Q weight matrix of point-by-point convolution, represents the K weight matrix of point-by-point convolution, V represents the weight matrix of point-by-point convolution, represents the Q weight matrix of channel-by-channel convolution, represents the K weight matrix of channel-by-channel convolution, V represents the weight matrix of channel-by-channel convolution, Q vectors representing different exposure regions, K vectors representing different exposure areas, V vector representing different exposure areas; in, The Q vector representing the normally exposed area, V vector representing the underexposed area, The V vector represents the normal exposure area, V vector representing the overexposed area, K vector representing the underexposed area, K vector representing the normally exposed area, K vector representing the overexposed area, represents the Softmax operation, represents the matrix transpose, represents the scaling factor, Attention weight map representing the underexposed area, Represents the attention weight map of the normally exposed area, Attention weight map representing the overexposed area, Represents the final weight graph.

8. The exposure correction method based on the light perception mechanism according to claim 1, wherein: The masks of the underexposed area, the normally exposed area, and the overexposed area are downsampled to obtain masks of different scales, which correspond to the initial feature map and the feature maps of different scales, respectively.

9. The exposure correction method based on the light perception mechanism according to claim 1, wherein: The number of downsampling and upsampling is 2, and the convolution operation uses 3x3 convolution.

10. An exposure correction system based on a light perception mechanism, characterized in that: The method is used to perform an exposure correction method based on a light perception mechanism as claimed in any one of claims 1 to 9, comprising: an image acquisition module, a mask generation module and an image correction module, The image acquisition module is used to obtain a non-uniform exposure image; The mask generation module is used to generate masks of underexposed areas, normally exposed areas, and overexposed areas according to the non-uniform exposure image; The image correction module is configured to extract an initial feature map from the non-uniformly exposed image through a convolution operation, obtain feature maps of different scales through multiple downsampling and upsampling operations, obtain a processed feature map through a convolution operation, and fuse the processed feature map with the non-uniformly exposed image to obtain an image with uniform exposure; Among them, masks are used to perform local feature extraction and global exposure correction on the initial feature map and feature maps of different scales, respectively.

Citation Information

Patent Citations

  • Non-reference image quality evaluation method and device based on semi-supervised learning

    CN112330648A

  • Low-illumination color image enhancement method based on simulation exposure and multi-scale fusion

    CN116563133A

  • Brightness correction method and system for pure color scene area, electronic equipment and medium

    CN117041509A

  • Method for predicting exposure duration of structured light camera based on RGB information

    CN120151660A

  • Underwater image enhancement method based on brightness-mask-guided multi-attention mechanism

    WO2024208188A1

Cited By

  • Welding seam defect detection method and system capable of resisting smog and strong light interference based on electric arc welding environment and medium

    CN120912604A

  • Weld defect detection method and system resistant to strong light interference of smoke based on arc welding environment and medium

    CN120912604B