Image enhancement method and system based on improved HVI-CIDnet
Through the improved HVI-CIDnet method, the cross-gating module and projection distribution loss function are used to solve the problem of brightness and color separation under low light conditions, and an enhancement effect with sufficient image brightness, natural color and rich details is achieved.
Patent Information
- Application Number
- CN202510954988.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-10-21
AI Technical Summary
Existing low-light enhancement methods have difficulty in accurately separating and adjusting brightness and color information when processing complex lighting conditions, resulting in image distortion and quality degradation, and cannot meet the needs of professional applications.
An improved HVI-CIDnet method is adopted. The cross-gating module replaces the cross-attention module, and the multi-axis gating weight is combined to adaptively fuse the global context and local structural features. The projection distribution loss function is introduced to suppress the loss of semantic information under noise interference and enhance the ability to retain texture details.
The image enhancement quality is significantly improved, making the enhanced image bright, natural in color, and rich in details, effectively avoiding the interference of brightness adjustment on color and the impact of color processing on brightness.
Smart Images

Figure CN120823104A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more particularly to an image enhancement method and system based on an improved HVI-CIDnet. Background Art
[0002] With the widespread application of various electronic devices in different lighting environments, obtaining clear, bright and color-accurate images is extremely critical for many scenarios such as security monitoring, autonomous driving, and medical imaging.
[0003] Currently, most low-light enhancement methods focus on adjusting image brightness and using deep neural networks to learn the mapping relationship between low-light and normal-light images in the sRGB or HSV color space. However, these existing methods have many limitations in practical applications.
[0004] In the sRGB color space, image brightness and color are highly correlated across the three channels. During image enhancement operations, any slight perturbation in the color space may cause significant changes in the brightness and color of the generated image. In severe cases, this can lead to image distortion, affecting image quality and usability, and failing to meet the needs of professional applications that require high image accuracy.
[0005] While the HSV color space can somewhat separate the brightness and color of an image from the sRGB channels, the discontinuity of the hue axis and the complex mapping relationships within the sRGB space make this approach ineffective when dealing with complex and changing lighting conditions. This is especially true in complex scenes with extremely uneven lighting conditions and large variations in light intensity. Enhancement methods based on the HSV color space struggle to accurately separate and adjust brightness and color information, thus failing to achieve the desired enhancement effect, effectively improving image visualization quality, and supporting subsequent image analysis tasks.
[0006] Therefore, how to provide an image enhancement method and system that can more accurately process brightness and color information and still have excellent performance under complex lighting conditions is a problem that technical personnel in this field urgently need to solve. Summary of the Invention
[0007] In view of this, the present invention provides an image enhancement method and system based on an improved HVI-CIDnet. To address the problem of amplified noise in low-light enhanced images, a cross-gating module is used to replace the cross-attention module in the LCA module. The global context and local structural features are adaptively fused through multi-axis gating weights to suppress the loss of semantic information under noise interference. To address the edge blurring phenomenon caused by image enhancement, a projection distribution loss function is introduced to constrain the distribution alignment of the enhanced image and the real image in the feature space, thereby enhancing the ability to retain texture details.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] On the one hand, the present invention provides an image enhancement method based on an improved HVI-CIDnet, comprising:
[0010] Get the input image;
[0011] Performing an HVI transformation on the input image to obtain an intensity map, an HV color map, and an HVI color map corresponding to the input image;
[0012] Using the intensity map and the HV color map as inputs of an improved color and brightness decoupling network, performing image enhancement on the intensity map and the HV color map respectively, and concatenating the enhanced intensity map and HV color map to obtain an HVI enhanced image;
[0013] The HVI enhancement image is added to the HVI color image using a residual mechanism to obtain a final enhanced image.
[0014] Preferably, performing HVI transformation on the input image to obtain an intensity map and an HV color map corresponding to the input image includes:
[0015] Calculate the intensity map of the input image using the formula:
[0016]
[0017] Among them, I max is the intensity value of the input image, I c Represents the brightness value of the input image, R represents the red channel, G represents the green channel, and B represents the blue channel;
[0018] The color density of the input image is calculated based on the intensity map, using the formula:
[0019]
[0020] Where k represents the parameter of noise and detail conflict, and ε is 1 × 10 -8 ;
[0021] An adaptive linear mapping function is constructed to alleviate the color shift of the RGB channels. The adaptive linear mapping function is:
[0022]
[0023] Among them, γ G ,γ B is a key trainable parameter for adaptively correcting hue deviation in HVI color space, γ G ,γB ∈(0,1); H represents the hue of the input image, H∈[0,1];
[0024] An image saturation adaptive adjustment function is constructed based on the adaptive linear mapping function, and the formula is:
[0025] D T =T(P γ )
[0026] Where T(·) is a custom function that satisfies T(0)=T(1), and T(P γ )≥0;
[0027] Based on the color density, saturation, and saturation adaptive adjustment function, the planar formalization of the HV color map is obtained as follows:
[0028]
[0029] in, For horizontal planarization, For the vertical plane formalization, ⊙ represents element-by-element multiplication, S represents the saturation of the image, h = cos(2πP γ ), v=sin(2πP γ 0.
[0030] Preferably, the intensity map and the HV color map are used as inputs of an improved color and brightness decoupling network, and image enhancement is performed on the intensity map and the HV color map respectively, comprising:
[0031] Performing feature extraction on the intensity map and the HV color map respectively to obtain an intensity feature map and an HV feature map;
[0032] Interactively learning the intensity feature map and the HV feature map to obtain an interactive intensity feature map and an HV feature map, respectively;
[0033] The intensity feature map and the intensity feature map after interaction, and the HV feature map and the HV feature map after interaction are respectively added using a residual mechanism to obtain an interaction intensity map and an interaction HV map;
[0034] Performing intensity enhancement on the interaction intensity map to obtain an enhanced intensity map;
[0035] The interactive HV map is denoised to obtain an enhanced HV map.
[0036] Preferably, interactive learning is performed on the intensity characteristic graph and the HV characteristic graph to obtain the intensity characteristic graph and the HV characteristic graph after interaction, respectively, including:
[0037] The input feature X of the intensity feature map and the input feature Y of the HV feature map are respectively passed through a fully connected layer to obtain a projection feature X1 and a projection feature Y1;
[0038] The projection feature X1 and the projection feature Y1 are respectively normalized, fully connected and activated by the GELU to output the projection feature X2 and the output projection feature Y2. The output projection feature X2 and the output projection feature Y2 are respectively expressed as:
[0039] X2=σ(W1LN(X1))
[0040] Y2=σ(W2LN(Y1))
[0041] Where σ represents the GELU activation function, LN represents layer normalization, W1 represents the MLP projection matrix of the projected feature X1, and W2 represents the MLP projection matrix of the projected feature Y1;
[0042] The multi-axis cross-gating weights of the input feature X and the input feature Y are calculated respectively according to the output projection feature X2 and the output projection feature Y2, and the output projection feature X2 and the output projection feature Y2 are interactively learned according to the multi-axis cross-gating weights. The multi-axis cross-gating weights are:
[0043]
[0044] in, Represents the multi-axis cross-gating of the input feature X, represents the multi-axis cross-gating of the input feature Y, ⊙ represents element-by-element multiplication, and the function G(·) is:
[0045] G(x)=W5([W3Block b (z1),W4Grid d (z2)])
[0046] Among them, [·,·] represents the connection, and W3 represents the fixed window Block of the output projection feature X2 b and fixed grid d The spatial projection matrix of W4 represents the fixed window Block of the output projection feature Y2 b and fixed grid d The spatial projection matrix of , (z1,z2) represents two independent heads split along the channel dimension z;
[0047] After completing interactive learning, the output projection feature X2 and the output projection feature Y2 are adjusted through a fully connected layer to adjust the channel dimension so that the output projection feature X2 and the output projection feature Y2 after interactive learning maintain the same channel dimension as the output projection feature X2 and the output projection feature Y2, and then added to the input projection feature X1 and the projection feature Y1 to obtain the final result:
[0048]
[0049] Among them, X3 represents the intensity feature after interaction, Y3 represents the HV feature after interaction, W7 represents the MLP projection matrix of the projection feature X1, and W8 represents the MLP projection matrix of the projection feature Y1.
[0050] Preferably, the color and brightness decoupling network uses a joint perceptual loss and a projective distribution loss function to optimize the image enhancement effect, specifically including:
[0051] The projection distribution loss is expressed as:
[0052]
[0053] Among them, φ j '={φ' 1,j ,…,φ' n,j} represents the input image u and the real image v in direction w j The projection feature set on ,λ is a non-negative constant, m' represents the number of projection groups, and the distance W p express:
[0054]
[0055] Among them, F a (s) is l a The cumulative distribution function, F b (s) is l b The cumulative distribution function of Represents the pth element of the original set a after sorting; Represents the pth element of the sorted original set b;
[0056] The projection distribution loss function is added to the perceptual loss function, and the final loss function is:
[0057] L=λ1·L per +λ2·L pdl
[0058] Among them, L per represents the perceptual loss function, L pdl represents the projection distribution loss function, λ1 represents the weight of the perceptual loss function, and λ2 represents the weight of the projection distribution loss function.
[0059] On the other hand, the present invention provides an image enhancement system based on an improved HVI-CIDnet, for implementing the above-mentioned image enhancement method based on an improved HVI-CIDnet, comprising:
[0060] An acquisition module, used to obtain input images;
[0061] An HVI conversion module is used to perform HVI conversion on the input image to obtain an intensity map, an HV color map and an HVI color map corresponding to the input image;
[0062] A color and brightness decoupling network is used to perform image enhancement on the intensity map and the HV color map respectively, and to splice the enhanced intensity map and HV color map to obtain an HVI enhanced image;
[0063] An output module is used to add the HVI enhancement image and the HVI color image using a residual mechanism to obtain a final enhanced image.
[0064] Preferably, the color and brightness decoupling network includes:
[0065] an intensity convolution layer, configured to extract features from the intensity map to obtain an intensity feature map;
[0066] An HV convolutional layer is used to extract features from the HV color map to obtain an HV feature map;
[0067] An improved brightness cross attention module is used to interactively learn the intensity feature map and the HV feature map to obtain an interactive intensity feature map and an HV feature map respectively;
[0068] a splicing module, configured to add the intensity feature map and the intensity feature map after interaction, and the HV feature map and the HV feature map after interaction, respectively, using a residual mechanism to obtain an interaction intensity map and an interaction HV map;
[0069] an intensity enhancement module, used for performing intensity enhancement on the interaction intensity map to obtain an enhanced intensity map;
[0070] The color denoising module is used to denoise the interactive HV map to obtain an enhanced HV map.
[0071] As can be seen from the above technical solutions, compared with the prior art, the present invention provides an image enhancement method and system based on an improved HVI-CIDnet. The improved decoupling network enhances the intensity map and HV color map separately, and then adds them to the HVI color map via a residual mechanism to generate an enhanced image. This effectively avoids the interference of brightness adjustment on color and the influence of color processing on brightness, significantly improving the image enhancement quality, resulting in an enhanced image with sufficient brightness, natural color, and rich details. The LCA module uses a cross-gating module to replace the cross-attention module. The multi-axis gating weights adaptively fuse global context and local structural features to suppress semantic information loss under noise interference. A projection distribution loss function is introduced to constrain the distribution alignment of the enhanced image and the real image in the feature space, enhancing the ability to preserve texture details. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in 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 merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0073] Figure 1 A schematic diagram of the process provided by the present invention.
[0074] Figure 2 It is an improved HVI-CIDnet network structure.
[0075] Figure 3 It is a traditional LCA network structure.
[0076] Figure 4 It is a cross-gating module network structure.
[0077] Figure 5 A visual example of a comparative experiment. DETAILED DESCRIPTION
[0078] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0079] The HVI-CIDNet algorithm in the present invention introduces a new color space called Horizontal / Vertical-Intensity (HVI). It can not only separate brightness and color information, but also combines three trainable representation parameters and a trainable function to enable it to adapt to the brightness ratio and color changes of different low-light images. On this basis, in order to make full use of the decoupled information, the Color and Intensity Decoupling Network (CIDNet) is used. After the HVI transform is applied to the image, it is input into the HV branch to extract color information, and the brightness branch to establish a photometric mapping function under different lighting conditions. In addition, in order to enhance the interaction between the image structures in the brightness and color branches, the Lighten Cross-Attention (LCA) module is used to learn the complementary information of the vertical / horizontal branch and the brightness branch.
[0080] The embodiment of the present invention discloses an image enhancement method based on an improved HVI-CIDnet, such as Figure 1-2 Shown, including:
[0081] Get the input image;
[0082] Perform HVI transformation on the input image to obtain the intensity map, HV color map and HVI color map corresponding to the input image;
[0083] The intensity map and HV color map are used as inputs of the improved color and brightness decoupling network. The intensity map and HV color map are enhanced respectively, and the enhanced intensity map and HV color map are spliced to obtain the HVI enhanced image.
[0084] The HVI enhancement image is added to the HVI color image using the residual mechanism to obtain the final enhanced image.
[0085] Furthermore, the input image is transformed into an HVI image to obtain the intensity map and HV color map corresponding to the input image, including:
[0086] Calculate the intensity map of the input image. In the low-light enhancement task, accurately estimating the light intensity map in the scene is one of the key points. Use the maximum value of the RGB channel to represent the intensity map of the image. The formula is:
[0087]
[0088] Where Imax is the intensity value of the input image, Ic is the brightness value of the input image, R is the red channel, G is the green channel, and B is the blue channel;
[0089] In order to overcome the one-to-many mapping problem of HSV color space, this paper designs a trainable horizontal / vertical (HV) color map as a plane for quantizing color reflectance map and maintaining a one-to-one mapping relationship with sRGB color space. HVI color space consists of three trainable parameters C k ,γ G ,γ B and a customized training function T(x).
[0090] Parameter C k Used to adjust the density of the color plane in the low-light area. The color density of the input image is calculated based on the intensity map. The formula is:
[0091]
[0092] Among them, k represents the parameter of noise and detail conflict. When training on the LOLv2 dataset, k is set to 3. ε is set to 1 × 10 to prevent zero division errors in division operations. -8 ;
[0093] Since different cameras have different sensitivities in RGB channels, color shift may occur in low-light scenes. γ It is an adaptive linear mapping of hue in the HSV color space. The linear mapping formula is used to alleviate the color shift caused by data diversity. Therefore, the color shift of the RGB channel is alleviated by constructing an adaptive linear mapping function. The adaptive linear mapping function is:
[0094]
[0095] Among them, γ G ,γ B It is the key trainable parameter for adaptively correcting hue deviation in HVI color space, γ G ,γ B ∈(0,1); H represents the hue of the input image, H∈[0,1];
[0096] In order to improve the saturation of the generated results, a P-based γ Function density T(P γ ), which is used to adaptively adjust the image saturation. The formula for constructing the image saturation adaptive adjustment function based on the adaptive linear mapping function is:
[0097] D T =T(P γ )
[0098] Among them, T(·) satisfies T(0)=T(1), and T(P γ )≥0;
[0099] The planar formalization of the HV color map is obtained based on color density, saturation, and saturation adaptive adjustment function. The formula is:
[0100]
[0101] in, For horizontal planarization, For the vertical plane formalization, ⊙ represents element-by-element multiplication, S represents the saturation of the image, h = cos(2πP γ ), v=sin(2πP γ ), by setting the middle h=cos(2πP γ ) and v=sin(2πP γ ) orthogonalizes the image so that the bijection is preserved.
[0102] Furthermore, the intensity map and HV color map are used as inputs of the improved color and brightness decoupling network, and image enhancement is performed on the intensity map and HV color map respectively, including:
[0103] The Color and Intensity Decoupling Network (CIDNet) is a dual-branch low-light image enhancement network based on the U-Net architecture. It takes a brightness map and a high-value (HV) color map as input, extracts features from the intensity map and the HV color map, respectively, and generates intensity and HV feature maps. Specifically, a 3 x 3 convolution is used to ensure that the two branches obtain feature maps of the same dimension.
[0104] Interactive learning is performed on the intensity feature map and the HV feature map to obtain the interactive intensity feature map and the HV feature map respectively;
[0105] The residual mechanism is used to add the intensity feature map to the intensity feature map after interaction, and the HV feature map to the HV feature map after interaction, to obtain the interaction intensity map and the interaction HV map.
[0106] Performing intensity enhancement on the interaction intensity map to obtain an enhanced intensity map;
[0107] The interaction HV map is denoised to obtain an enhanced HV map. Denoising the interaction HV map avoids noise artifacts and color shift, while the brightness enhancement module increases brightness and removes saturated areas.
[0108] Furthermore, Figure 3As shown in the figure, in the original LCA module, the HV branch and I branch in the LCA module process HV features and brightness features respectively. In order to learn the complementary potential between HV features and brightness features during the processing, a cross attention block (CAB) is used to use one branch as the query and the other branch as the key and value to enable the CAB module to learn from the opposing branches (for example, the HV branch uses the information of the brightness branch to optimize itself). However, this approach is highly dependent on accurate global correlation modeling. Night images often contain noise, and noise and uneven lighting may interfere with the learning of attention weights, making it difficult for the model to accurately capture effective contextual information.
[0109] The embodiment of the present invention replaces the cross attention module in the traditional LCA module with a cross gating module. The network structure of the module is as follows: Figure 4 The intensity feature map and the HV feature map are interactively learned to obtain the intensity feature map and the HV feature map after interaction, including:
[0110] The input feature X of the intensity feature map and the input feature Y of the HV feature map are respectively passed through a fully connected layer to obtain the projection feature X1 and the projection feature Y1;
[0111] The projection feature X1 and the projection feature Y1 are respectively normalized, fully connected and the GELU activation function to output the projection feature X2 and the output projection feature Y2. The output projection feature X2 and the output projection feature Y2 are respectively expressed as:
[0112] X2=σ(W1LN(X1))
[0113] Y2=σ(W2LN(Y1))
[0114] Where σ represents the GELU activation function, LN represents layer normalization, W1 represents the MLP projection matrix of the projected feature X1, and W2 represents the MLP projection matrix of the projected feature Y1;
[0115] The multi-axis cross-gating weights of the input feature X and the input feature Y are calculated according to the output projection feature X2 and the output projection feature Y2, respectively. The output projection feature X2 and the output projection feature Y2 are interactively learned according to the multi-axis cross-gating weights. The multi-axis cross-gating weights are:
[0116]
[0117] in, Represents the multi-axis cross-gating of the input feature X, represents the multi-axis cross-gating of the input feature Y, ⊙ represents element-by-element multiplication, and the function G(·) is:
[0118] G(x)=W5([W3Block b (z1),W4Grid d (z2)])
[0119] Among them, [·,·] represents the connection, and W3 represents the fixed window Block of the output projection feature X2 b and fixed grid d The spatial projection matrix of W4 represents the fixed window Block of the output projection feature Y2 b and fixed grid d The spatial projection matrix of (z1, z2) represents two independent heads split along the channel dimension z. The projection of the activated feature x can be expressed as:
[0120] [z1,z2]=z=σ(W6LN(x))
[0121] Among them, W6 represents the weight of a learnable linear projection layer.
[0122] After completing interactive learning, the output projection feature X2 and the output projection feature Y2 are adjusted through a fully connected layer to adjust the channel dimension so that the output projection feature X2 and the output projection feature Y2 after interactive learning maintain the same channel dimension as the output projection feature X2 and the output projection feature Y2, and then the input residual connection is added to obtain the final result:
[0123]
[0124] Among them, X3 represents the intensity feature after interaction, Y3 represents the HV feature after interaction, W7 represents the MLP projection matrix of the projection feature X1, and W8 represents the MLP projection matrix of the projection feature Y1.
[0125] Since the feature extraction of deep learning can capture the high-level semantic information of the image, directly using L1 or L2 distance to measure feature differences in the feature space may lead to the loss of detailed information, especially in the shape and structure of the feature distribution. Projection distribution loss can better capture the texture and structural information of the image by comparing feature distributions rather than single feature values. By converting the image restoration problem into an optimal transmission problem, it seeks to minimize the cost of converting the input feature distribution to the target feature distribution to generate a more visually realistic image. Therefore, the color and brightness decoupling network of the present invention adopts a joint perceptual loss and a projection distribution loss function to optimize the image enhancement effect, specifically including:
[0126] The projection distribution loss is expressed as:
[0127]
[0128] Among them, φj '={φ' 1,j ,…,φ' n,j} represents the input image u and the real image v in direction w j The projection feature set on ,λ is a non-negative constant, m' represents the number of projection groups, and the distance W p express:
[0129]
[0130] Among them, F a (s) is l a The cumulative distribution function, F b (s) is l b Cumulative distribution function; setting a and b to 1 represents two sets of one-dimensional projection features for comparison, and the cumulative distribution function is replaced by the empirical distribution. Represents the pth element of the original set a after sorting; Represents the pth element of the sorted original set b.
[0131] The projection distribution loss function is added to the perceptual loss function, and the final loss function is:
[0132] L=λ1·L per +λ2vL pdl
[0133] Among them, L per represents the perceptual loss function, L pdl represents the projection distribution loss function, λ1 represents the weight of the perceptual loss function, and λ2 represents the weight of the projection distribution loss function.
[0134] By combining perceptual loss and projective distribution loss functions, a balance is achieved between brightness enhancement and detail preservation: perceptual loss maintains the high-level semantic consistency of the image, while projective distribution loss effectively suppresses detail degradation in the low-light enhancement process by aligning the distribution in the feature space, making textures clearer and edges more distinct.
[0135] In order to verify the effectiveness of the image enhancement of the present invention, the dataset used for the low-light image enhancement network is the LOLv2
[61] dataset, which consists of two parts: a real scene dataset and a synthetic dataset. In the real scene dataset, there are 687 pairs of training data and 100 pairs of test data. These images are obtained by controlling the ISO and exposure time of the camera in the real scene. In the synthetic dataset, LOLv2 generates 900 pairs of training data and 100 pairs of test data by using an algorithm to enhance the illumination and adding noise to the original low-light image. In the experiments of this embodiment, experiments were conducted using datasets in real scenes to ensure the practicality and reliability of the experimental results.
[0136] Experimental environment configuration: The experimental platform's operating system is Windows 10 Professional, the CPU is an Intel(R) Core(TM) i5-10400F @ 2.9GHz with 32GB of RAM, and the graphics card is an Nvidia GeForce RTX 2080Ti with 22GB of video memory. The development language is Python 3.9, and the deep learning framework is Pytorch-GPU 2.0.1. CUDA version 11.8 is used, and cuDNN version 8.9.2.26 is used for GPU acceleration.
[0137] The experimental parameters are set as follows: the batch size (Batch_Size) is set to 8, the initial learning rate (LearningRate) is 0.0001, the optimizer (Optimizer) is Adam, and the number of training times (Epochs) is set to 1000 times.
[0138] In order to verify the effectiveness of the improved algorithm, two objective evaluation indicators commonly used in the field of low-light enhancement are adopted: Peak Signal to Noise Ratio (PSNR) and Structural Similarity Index (SSIM).
[0139] The PSNR metric primarily calculates the pixel-level error between the original image and the enhanced image. A larger PSNR value indicates a smaller error and less distortion. The PSNR metric is calculated based on the mean square error (MSE) between the two images. The mean square error is the average of the squared differences in pixel values between the original and processed images, and is expressed as follows:
[0140]
[0141] Where I(i,j) and D(i,j) represent the pixel values at position (i,j) of the original image and the enhanced image, respectively, and m and n represent the number of rows and columns of the image, respectively. After obtaining the MSE value, the PSNR value can be expressed as:
[0142]
[0143] Among them, MAX I Represents the maximum possible value of a pixel in an image, usually 255.
[0144] The SSIM metric primarily considers the differences in brightness, contrast, and structure between the original image and the enhanced image. It is closer to human visual perception and can better reflect the visual quality of an image. The closer the SSIM value is to 1, the more similar the two images are, and the better the image quality. The SSIM value can be calculated as follows:
[0145]
[0146] Among them, u gt and u g Represent the pixel mean of the original image and the enhanced image, σ gt and σ gen Represent the pixel standard deviations of the original image and the enhanced image respectively. C1 and C2 are very small constants set to prevent the denominator from being zero.
[0147] To demonstrate the performance of each module, this example conducted a series of combined ablation experiments, the results of which are shown in Table 1. The use of the cross-gating module facilitates the fusion of global and local image features, resulting in a 0.21dB improvement in PSNR and a slight increase in SSIM of 0.004dB. Using the projection distribution loss function resulted in a 0.17dB improvement in PSNR and a 0.002dB increase in SSIM. Combining the cross-gating module with the projection distribution loss function resulted in PSNR and SSIM reaching 23.15dB and 0.868dB, respectively. These results demonstrate the algorithm's robust low-light enhancement capabilities.
[0148] Table 1 Ablation experiments of improved HVI-CIDnet algorithm
[0149]
[0150] This example uses comparative experiments to evaluate the performance of a proposed improved algorithm based on HVI-CIDnet in low-light conditions. This algorithm is compared with existing low-light image enhancement algorithms to verify its effectiveness in improving image brightness and color quality, reducing noise, and restoring image details. The superiority of the proposed method is demonstrated through both objective and subjective evaluation metrics.
[0151] The experiment is conducted on the LOLv2 real dataset. Figure 5Visual comparison results of the proposed algorithm with RetinexNet, Zero-DCE++, LLFlow, SNR-Aware
[62] , PairLIE, and RUAS on a very dark input image are shown. As can be seen from the images, algorithms (b), (c), and (f) perform poorly in improving overall image brightness. They over-brighten the image, and (f) even overexposes it. The remaining algorithms are relatively close to the true image in terms of brightness. In terms of improving color quality, algorithms (c), (d), (e), and (g) perform well, while the other images exhibit varying degrees of color distortion. (a) exhibits a high overall saturation, while (g) exhibits a saturation close to the true image. In terms of noise, algorithms (d), (e), and (g) perform well, while the other algorithms amplify noise. In terms of restoring image texture, the portrait and ping-pong net in the red frame show that algorithms (a), (b), and (f) restore the portrait poorly, resulting in blurriness, and only partially restore the ping-pong net, performing poorly. In contrast, algorithms (d) and (e) fail to restore the net clearly, with many missing areas. Algorithm (g) maintains good texture detail and color information while ensuring brightness restoration.
[0152] From the visualization results, it can be seen that the improved algorithm can effectively improve the brightness of low-light images while retaining the details and texture information of the image. Compared with other classic algorithms, the proposed method shows better visual effects in restoring low-light images.
[0153] The objective results of the comparative test are shown in Table 2. Comparisons of the PSNR and SSIM metrics clearly demonstrate that the improved algorithm not only excels in detail recovery but also maintains image perceptual quality. Specifically, the proposed algorithm achieved a high PSNR score of 23.15 dB and an SSIM score of 0.868 dB, demonstrating its superior ability to preserve image structural information and texture details. By comparison, other algorithms still have some shortcomings in this regard.
[0154] Table 2 Comparative experiments of different algorithms
[0155]
[0156]
[0157] On the other hand, the present invention provides an image enhancement system based on an improved HVI-CIDnet, which is used to implement the above-mentioned image enhancement method based on an improved HVI-CIDnet, such as Figure 2 Shown, including:
[0158] An acquisition module, used to obtain input images;
[0159] The HVI transformation module is used to perform HVI transformation on the input image to obtain the intensity map, HV color map and HVI color map corresponding to the input image;
[0160] The color and brightness decoupling network is used to perform image enhancement on the intensity map and HV color map respectively, and then concatenate the enhanced intensity map and HV color map to obtain the HVI enhanced image;
[0161] The output module is used to add the HVI enhancement image and the HVI color image using the residual mechanism to obtain the final enhanced image.
[0162] Preferably, the color and brightness decoupling network includes:
[0163] The intensity convolution layer is used to extract features from the intensity map to obtain an intensity feature map;
[0164] The HV convolution layer is used to extract features from the HV color map to obtain the HV feature map;
[0165] The improved brightness cross attention module is used to interactively learn the intensity feature map and the HV feature map, and obtain the interactive intensity feature map and HV feature map respectively;
[0166] A splicing module is used to use a residual mechanism to add the intensity feature map to the intensity feature map after interaction, and the HV feature map to the HV feature map after interaction, to obtain an interaction intensity map and an interaction HV map;
[0167] an intensity enhancement module, used for performing intensity enhancement on the interaction intensity map to obtain an enhanced intensity map;
[0168] The color denoising module is used to denoise the interactive HV map to obtain an enhanced HV map.
[0169] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0170] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image enhancement method based on improved HVI-CIDnet, characterized in that: include: Get the input image; Performing an HVI transformation on the input image to obtain an intensity map, an HV color map, and an HVI color map corresponding to the input image; Using the intensity map and the HV color map as inputs of an improved color and brightness decoupling network, performing image enhancement on the intensity map and the HV color map respectively, and concatenating the enhanced intensity map and HV color map to obtain an HVI enhanced image; The HVI enhancement image is added to the HVI color image using a residual mechanism to obtain a final enhanced image.
2. The image enhancement method based on improved HVI-CIDnet according to claim 1, wherein Performing an HVI transformation on the input image to obtain an intensity map and an HV color map corresponding to the input image includes: Calculate the intensity map of the input image using the formula: Among them, I max is the intensity value of the input image, I c Represents the brightness value of the input image, R represents the red channel, G represents the green channel, and B represents the blue channel; The color density of the input image is calculated based on the intensity map, using the formula: Among them, k represents the parameter of noise and detail conflict, ε is 1×10 -8 ; An adaptive linear mapping function is constructed to alleviate the color shift of the RGB channels. The adaptive linear mapping function is: Among them, γ G ,γ B is a key trainable parameter for adaptively correcting hue deviation in HVI color space, γ G ,γ B ∈(0,1); H represents the hue of the input image, H∈[0,1]; An image saturation adaptive adjustment function is constructed based on the adaptive linear mapping function, and the formula is: D T =T(P γ ) Where T(·) is a custom function that satisfies T(0)=T(1), and T(P γ )≥0; Based on the color density, saturation, and saturation adaptive adjustment function, the planar formalization of the HV color map is obtained as follows: in, For horizontal planarization, For the vertical plane formalization, ⊙ represents element-by-element multiplication, S represents the saturation of the image, h = cos(2πP γ ), v=sin(2πP γ ).
3. The image enhancement method based on improved HVI-CIDnet according to claim 1, wherein The intensity map and the HV color map are used as inputs of an improved color and brightness decoupling network, and image enhancement is performed on the intensity map and the HV color map respectively, including: Performing feature extraction on the intensity map and the HV color map respectively to obtain an intensity feature map and an HV feature map; Interactively learning the intensity feature map and the HV feature map to obtain an interactive intensity feature map and an HV feature map, respectively; The intensity feature map and the intensity feature map after interaction, and the HV feature map and the HV feature map after interaction are respectively added using a residual mechanism to obtain an interaction intensity map and an interaction HV map; Performing intensity enhancement on the interaction intensity map to obtain an enhanced intensity map; The interactive HV map is denoised to obtain an enhanced HV map.
4. The image enhancement method based on improved HVI-CIDnet according to claim 3, wherein Interactively learning the intensity feature map and the HV feature map to obtain an interactive intensity feature map and an HV feature map, respectively, includes: The input feature X of the intensity feature map and the input feature Y of the HV feature map are respectively passed through a fully connected layer to obtain a projection feature X1 and a projection feature Y1; The projection feature X1 and the projection feature Y1 are respectively normalized, fully connected and activated by the GELU to output the projection feature X2 and the output projection feature Y2. The output projection feature X2 and the output projection feature Y2 are respectively expressed as: X2=σ(W1LN(X1)) Y2=σ(W2LN(Y1)) Where σ represents the GELU activation function, LN represents layer normalization, W1 represents the MLP projection matrix of the projected feature X1, and W2 represents the MLP projection matrix of the projected feature Y1; The multi-axis cross-gating weights of the input feature X and the input feature Y are calculated respectively according to the output projection feature X2 and the output projection feature Y2, and the output projection feature X2 and the output projection feature Y2 are interactively learned according to the multi-axis cross-gating weights. The multi-axis cross-gating weights are: in, Represents the multi-axis cross-gating of the input feature X, represents the multi-axis cross-gating of the input feature Y, ⊙ represents element-by-element multiplication, and the function G(·) is: G(x)=W5([W3Block b (z1),W4Grid d (z2)]) Among them, [·,·] represents the connection, and W3 represents the fixed window Block of the output projection feature X2 b and fixed grid d The spatial projection matrix of W4 represents the fixed window Block of the output projection feature Y2 b and fixed grid d The spatial projection matrix of , (z1,z2) represents two independent heads split along the channel dimension z; After completing interactive learning, the output projection feature X2 and the output projection feature Y2 are adjusted through a fully connected layer to adjust the channel dimension so that the output projection feature X2 and the output projection feature Y2 after interactive learning maintain the same channel dimension as the output projection feature X2 and the output projection feature Y2, and then added to the input projection feature X1 and the projection feature Y1 to obtain the final result: Among them, X3 represents the intensity feature after interaction, Y3 represents the HV feature after interaction, W7 represents the MLP projection matrix of the projection feature X1, and W8 represents the MLP projection matrix of the projection feature Y1.
5. The image enhancement method based on improved HVI-CIDnet according to claim 1, wherein The color and brightness decoupling network uses a joint perceptual loss and a projective distribution loss function to optimize the image enhancement effect, specifically including: The projection distribution loss is expressed as: Among them, φ' j ={φ' 1,j ,…,φ' n,j } represents the input image u and the real image v in direction w j The projection feature set on ,λ is a non-negative constant, m' represents the number of projection groups, and the distance W p express: Among them, F a (s) is l a The cumulative distribution function, F b (s) is l b The cumulative distribution function of Represents the pth element of the original set a after sorting; Represents the pth element of the sorted original set b; The projection distribution loss function is added to the perceptual loss function, and the final loss function is: L=λ1·L per +λ2·L pdl Among them, L per represents the perceptual loss function, L pdl represents the projection distribution loss function, λ1 represents the weight of the perceptual loss function, and λ2 represents the weight of the projection distribution loss function.
6. An image enhancement system based on improved HVI-CIDnet, characterized in that: The method for implementing an improved HVI-CIDnet-based image enhancement method according to any one of claims 1 to 5 comprises: An acquisition module, used to obtain input images; An HVI conversion module is used to perform HVI conversion on the input image to obtain an intensity map, an HV color map and an HVI color map corresponding to the input image; A color and brightness decoupling network is used to perform image enhancement on the intensity map and the HV color map respectively, and to splice the enhanced intensity map and HV color map to obtain an HVI enhanced image; An output module is used to add the HVI enhancement image and the HVI color image using a residual mechanism to obtain a final enhanced image.
7. The image enhancement system based on the improved HVI-CIDnet according to claim 6, characterized in that: The color and brightness decoupling network includes: an intensity convolution layer, configured to extract features from the intensity map to obtain an intensity feature map; An HV convolutional layer is used to extract features from the HV color map to obtain an HV feature map; An improved brightness cross attention module is used to interactively learn the intensity feature map and the HV feature map to obtain an interactive intensity feature map and an HV feature map respectively; a splicing module, configured to add the intensity feature map and the intensity feature map after interaction, and the HV feature map and the HV feature map after interaction, respectively, using a residual mechanism to obtain an interaction intensity map and an interaction HV map; an intensity enhancement module, used for performing intensity enhancement on the interaction intensity map to obtain an enhanced intensity map; The color denoising module is used to denoise the interactive HV map to obtain an enhanced HV map.