# sRrsR-Net: A New Low-Light Image Enhancement Network via Raw Image Reconstruction
## 3 Methods
### RRAW-sRGB Module  
The RRAW-sRGB module is designed to convert the reconstructed raw image data generated from the RAWFormer module back into the sRGB format, aiming to enhance the quality of the initial low-light image. This module employs an encoder-decoder architecture, with ISP processing functions such as white balance and color correction introduced to improve image brightness. The detailed structure of the RRAW-sRGB network is illustrated in Figure 5. The RRAW-sRGB module accepts the reconstructed raw image from the RAWFormer module as input. After a downsampling process, it generates deep-level feature maps \(F_{d1}\in R^{\frac{H}{2}\times\frac{W}{2}\times 2\mathbb{C}}\). These features then pass through a WB block. The output feature map is subsequently merged with the upsampling feature map from the Decoder. A similar process is applied to the deeper feature maps \(F_{d2}\in R^{\frac{H}{2}\times\frac{W}{2}\times 4\mathbb{C}}\), which undergoe color correction through the CCM block before being fused. Both the WB and CCM blocks are designed to make the output more representative of real-world scenes. The feature maps processed through WB and CCM blocks are ultimately fused to produce the enhanced normal-light sRGB image \(\tilde{I}\).  
Many end-to-end cameras' ISP process typically integrate numerous image processing operations, but some of these operations, such as tone mapping and gamma correction often offer limited benefits for LIE. In contrast, the RRAW-to-sRGB module simplifies the process by focusing on white balance and color correction which have a substantial impact on color and brightness. During the white balance process, the intensities of the R, G, and B color channels are adjusted to ensure that white appears consistent with human perception. This process is commonly represented by a white balance gains matrix \(D_{wb}\).  
\[D_{wb}=\begin{bmatrix}G_{r}&0&0\\ 0&G_{g}&0\\ 0&0&G_{b}\end{bmatrix} \tag{8}\]  
The white balance operation is achieved by multiplying the sensor's red, green, and blue color channels with their respective gain coefficients \(G_{r}\), \(G_{g}\), and \(G_{b}\). These gain coefficients can be learned through the parameters of a neural network. The WB blocks are designed with the understanding that they involve 3 \(\times\) 3 matrices. To approximate these matrices, a Depthwise Separable Convolution [33] with a 3 \(\times\) 3 kernel is used. Additionally,  
Figure 5: The structure of the RRAW-sRGB module.  
a \(1\times 1\) Pointwise Convolution (PW) is applied to expand the number of channels in the feature map, mapping it into a higher-dimensional space. After that, the ReLU activation function performs nonlinear filtering on the batch normalized (BN) features. Finally, another \(1\times 1\) PW is applied to restore the features to their original dimension, enhancing the feature representation and inter-feature connections.  
In addition, the human eye and camera sensors respond differently to various colors, leading to color shifts in captured images. To correct for these shifts, this study employs a CCM block which uses a 3 \(\times\) 3 matrix to harmonize the image colors, as shown in the formula:  
\[\hat{I}=F_{dL}\cdot C_{m} \tag{9}\]  
where \(C_{m}\) represents the learnable parameters of the CCM block, and it is implemented by a \(3\times 3\) convolution operation. The output, \(\hat{I}\), is the final enhanced sRGB image.