# Deep-Space Background Low-Light Image Enhancement Method Based on Multi-Image Fusion
## 3 Method
### Enhancement of Single Satellite Images
Specifically, Gamma correction [9] by the RGB channel is realized by the following equation:  
\[I_{\alpha^{\prime\prime}}(x,y)\ =255\times(\frac{I_{\alpha}^{\prime}(x,y)-a}{255-a} \ )^{1/\gamma} \tag{3}\]  
where \(a\) represents the dynamically adjusted compensation parameter and \(\gamma\) denotes the midtone parameter. The value of \(\tau\) is determined to comply with the equation as follows:  
\[\gamma= \begin{cases}0.4&\tau/255<0.4\\ \tau/255&0.4\leq\tau/255\leq 0.7\\ 0.7&\tau/255>0.7\end{cases}  \tag{4}\]  
where \(\tau\) denotes the highlight threshold calculated by the cumulative distribution function. When \(\gamma<0.4\), the correction curve is too steep, which easily leads to the loss of dark details, and when \(\gamma>0.7\), the correction curve is too flat, which affects the contrast enhancement effect. \(\gamma\in[0.4,0.7]\) can balance the needs of detail retention and contrast enhancement [9]. 3. Extraction of satellite target area  
Noise in images can significantly impact the accuracy of image analysis. To address this problem, we employ a strategy that combines the OTSU algorithm [22] with Canny edge detection [23] for effective noise removal. Initially, the OTSU algorithm is utilized to binarize the image, creating a binary image. This process also calculates the necessary high and low thresholds for the Canny edge detection. The method helps eliminate most of the small noise present in the image. Finally, we merge the binary image with the results from the edge detection to extract the regions that may contain the target. When conducting connected component analysis and selecting regions, the target area is determined based on its size, luminance information, and density characteristics. If a candidate region stands out with both the largest area and the highest density uniquely, it is selected directly. However, if the candidate regions with the largest area and highest density differ, the region with the largest area and the highest percentage of luminance exceeding 128 takes priority. In this case, the focus is placed first on selecting the region that has the highest percentage of luminance above 128, followed by the candidate region that possesses the largest area of luminance. Ultimately, based on the results of these analyses, a final target mask is determined, which is used to extract the target region from the original image. 4. Target areas merging and noise removal  
When the target region lacks connectivity, region merging can be achieved by extending the boundaries of the target region. Specifically, the boundary of the target region is extended by 5%, and then the extended region is checked to see if it contains other connected components. If it does, the regions are merged. To avoid excessive noise after region merging, the noise in the merged region needs to be calculated and cleaned up. For the connected components whose area is smaller than the set noise threshold, they are removed to obtain the target region mask after denoising. Finally, set the enhanced processed image as \(I_{proc}\), set the original image as \(I_{orig}\), and perform the fusion of the two images to obtain the output image as \(I_{out}\). The fusion formula for the two images is as follows. \[I_{out}(x,y)= \begin{cases}I_{proc}(x,y)&M(x,y)=255\\ I_{orig}(x,y)&\text{otherwise}\end{cases}  \tag{5}\]where M denotes the final target region mask. This method effectively preserves the detailed information of the deep-space background while enhancing the target. Figure 3 demonstrates the comparison of several single satellite images before and after enhancement.