# Joint Luminance Adjustment and Color Correction for Low-Light Image Enhancement Network
## 3 Method
### Color Correction Module  
Low-light images that suffer from low brightness and uneven brightness are often accompanied by color distortion. The poor lighting condition in the shooting environment leads to insufficient light reaching the camera sensor, ultimately resulting in incomplete or distorted color information in the final captured image. On the other hand, low-light enhancement algorithms usually perform ray compensation on images to improve their quality under low-light conditions. If the light compensation is inappropriate, the image's color may appear unnatural or inaccurate, exacerbating color distortion. If the brightness issue is solved without addressing color distortion, the enhanced image cannot meet the human visual pursuit of high-quality images. Therefore, while enhancing the brightness of low-light images, color correction is also necessary to improve the overall quality of the enhanced image. We have designed a Color Correction Module based on the attention mechanism, as shown in Figure 4. It captures global color features using the attention mechanism and applies them to the image features after illumination adjustment to correct  
Figure 3: The structure of the Luminance Adjustment Module, in which: (**a**) is the Attention Luminance Adjustment Module; (**b**) is the Nonlinear Luminance Adjustment Block, which is common to the Luminance Adjustment Module and the Convolution Luminance Adjustment Module; (**c**) is the Window Attention Block; and (**d**) is the Convolution Luminance Adjustment Module. color deviation and obtain more accurate and realistic colors. Firstly, two shallow feature encoders are used to extract the shallow features of the image through convolutional operations, which helps to reduce computational complexity and obtain global color features of the image in CFEB. It is then followed by an SAB, where the self-attention mechanism is the main operation. In the Self-Attention Block, the query vector \(q\) is initialized as an all-0 matrix without requiring additional multi-head attention. Among them, \(q\) is a learnable embedding query whose key \(k\) and value \(v\) are generated by encoding features without adding positional encoding from the original transformer. After passing through a linearly fully connected layer, we added a learnable color matrix as an additional parameter. The color matrix is initialized as a unit matrix of all 1s and finally applied to the enhanced image generated by the decoder for final color correction. Low-light images exhibit incomplete color information due to insufficient light. Therefore, enhanced images are often accompanied by color distortion. The goal of the color correction algorithm is to improve the color accuracy and to restore the image by correcting the color of the image, so that the image can express the original scene more realistically, clearly, and accurately. The principle of the image color correction algorithm is to correct the color of the image by adjusting the pixel values in the image and changing their color distribution. Compared with the linear algorithm, the nonlinear color correction algorithm has a higher degree of restoration for complex scenes and images with uneven colors. Commonly used nonlinear color correction algorithms include the color correction matrix. The color correction matrix multiplies a 3 \(\times\) 3 matrix coefficient by the RGB color value of the scene captured by the sensor to obtain a color that is close to what the human eye actually sees. It can be adjusted and optimized according to the color characteristics and needs of the image to achieve better visual effects and user experience. The color correction matrix is shown in Equation (1):  
Figure 4: The structure of CCM, in which: (**a**) is the overall CCM structure, including a CFEB, an SAB, and a Learnable Color Matrix; (**b**) is the CFEB; (**c**) is the SAB; and (**d**) is the Self-Attention mechanism. \[ \begin{bmatrix}R^{\prime}\\ G^{\prime}\\ B^{\prime}\end{bmatrix} =