# Deep-Space Background Low-Light Image Enhancement Method Based on Multi-Image Fusion
## 3 Method
### Enhancement of Satellite Images Containing Celestial Bodies
#### 3.2.2 Extract Satellite Target Area  
The determination of the final satellite target area involves two components: the adaptive image enhancement module and the target area mask construction module. Figure 8 illustrates the specific steps and processes involved in these two components.  
Figure 8: Flowchart of satellite target mask generation methodology.  
The target area extraction process is analogous to the extraction of Earth areas. The region with the second-highest comprehensive score is selected from the original image to preliminarily determine the target's location. Subsequently, the original image undergoes preprocessing using the RetinexFormer method. The following process is similar to the target extraction of a single satellite image. The preprocessed image is transferred to the adaptive image enhancement module to obtain the enhanced image \(B_{\text{enhanced}}\). The preliminarily identified target area is mapped onto image \(B_{\text{enhanced}}\), whereupon edge textures and detailed information in image \(B_{\text{enhanced}}\) are utilized to refine and expand the target area. Figure 9 illustrates various binary images utilized in the process of determining the target area mask.  
The grayscale image \(B_{\text{en-gray}}\) of image \(B_{\text{enhanced}}\) undergoes threshold segmentation using the Otsu algorithm [22], followed by edge detection with the Canny operator [23]. Subsequently, the edge detection extension algorithm is applied to detect the original target boundary and expand it outward while maintaining its shape. In cases where the extended edge intersects with other edges, the intersection is retained; if there is no intersection, the original boundary remains intact. This method effectively prevents the loss of the target area. Following this, the results from edge detection and threshold segmentation are combined, allowing for further expansion and refinement of the target area. Any regions identified as mergeable are combined to minimize the risk of target area loss. Finally, the dynamic noise threshold is calculated for denoising, resulting in the final target area mask. Figure 10 presents the comparison of the target area masks and mapped images before and after denoising.  
Figure 10: Comparison of the target area masks and mapped images before and after denoising.  
Figure 9: Several binary images utilized in the process of determining the target area mask. (**a**) Binary image of the original image; (**b**) binary image of the preprocessed image; (**c**) binary image of the extracted target; (**d**) the final target mask.  
After acquiring the Earth region and satellite target region, the deep-space background area can be extracted through Boolean logic operations. The deep-space background from the original image is mapped onto the enhanced image, ensuring that cosmic background information--such as weak light sources in the deep space--is fully preserved. This process effectively maintains the integrity of the original image's deep-space background information while improving its visual quality. By applying masks to these areas and fusing the corresponding images, a deep-space background image with more details can be obtained.