# Zero-TCE: Zero Reference Tri-Curve Enhancement for Low-Light Images
## 3 Materials and Methods
### Multi-Scale Feature Fusion (MFF)  
The TCE-L module can effectively increase the brightness of images, but the contrast remains low. The TCE-C module can significantly enhance the image contrast, yet its brightening effect is limited, and it tends to cause overexposure due to excessive contrast enhancement in brighter areas. Therefore, to fully leverage the advantages of these two modules, we propose an adaptive image fusion algorithm, which can be expressed as follows:  
\[MF(\mathbf{x},\mathbf{x}_{L},\mathbf{x}_{\rm C})=k\mathbf{x}+(1-k)[\gamma\mathbf{x}_{L}+(1-\gamma) \mathbf{x}_{\rm C}], \tag{8}\]  
where \(\mathbf{x}\) represents the pixel matrix of the original low-light image, \(\mathbf{x}_{L}\) represents the pixel matrix of the image enhanced by the TCE-L module, and \(\mathbf{x}_{\rm C}\) denotes the pixel matrix of the image enhanced by the TCE-C module. \(k\) and \(\gamma\) are adaptive weights used to adjust the balance between the original image and the enhanced images, as well as between the two enhanced images, respectively, with values ranging from 0 to 1. Figure 5 demonstrates the processing effects of the TCE-L module, TCE-C module, and MFF module individually, as well as the effect without the MFF module. As observed in Figure 7, when pixel values are too high (i.e., brighter) or too low (i.e., darker), TCE-L performs better in enhancing the dark details of the image. Thus, \(\gamma\) should be larger. When pixel values fall between these two extremes, TCE-C significantly enhances image contrast and highlights certain details, resulting in better enhancement. Hence, \(\gamma\) should be smaller. Based on these findings, we designe a quadratic curve, according to the brightness characteristics of the input image, for the adaptive fusion of the two enhanced images. The formula can be expressed as follows:  
\[\gamma=\frac{1}{128^{2}}\Big{[}\max_{\rm C\{r,g,b\}}\Big{\{}I^{C}(\mathbf{x})\Big{\}} -128\Big{]}^{2}, \tag{9}\]  
where \(\max_{\rm C\{r,g,b\}}\big{\{}I^{C}(\mathbf{x})\big{\}}\) represents the maximum value among the three color channels for a given input \(I(\mathbf{x})\) (i.e., the brightness of the original image at location \(x\)). Figure 6: The enhancement effects of the TCE-L module and the TCE-C module. When enhancing low-light images, the high-light areas, particularly sky regions, often suffer from overexposure and detail loss due to excessive enhancement. Moreover, the RGB color space, consisting of the primary colors red, green, and blue, is widely used in digital imaging because of its intuitiveness and compatibility with hardware. However, the RGB color space lacks precision in handling color distortion, especially when precise control over color variations is required. Both the TCE-L and TCE-C modules directly process the R (red), G (green), and B (blue) channels, which can easily lead to color distortion. The HSV color space offers an alternative perspective for understanding and manipulating color. It decomposes color into three components--hue, saturation, and value--enabling more intuitive and precise adjustments to color. Therefore, our approach processes the image in the HSV color space and designs a weight curve based on the grayscale variation information in the enhanced image for adaptive fusion between the original and enhanced images. First, we determine the brightness value \(g_{m}\) for each pixel within the input image by employing a weighted average approach to the R, G, and B color components. This method assigns varying degrees of importance to each component, which can be mathematically formulated as follows:  
\[g_{m}=0.11R(x)+0.59G(x)+0.30B(x). \tag{10}\]  
Then, a weight coefficient \(k\) is introduced, which can be adaptively adjusted according to the brightness distribution characteristics of the input image.