# Overcoming Adverse Conditions in Rescue Scenarios: A Deep Learning and Image Processing Approach
## 2 Materials and Methods
### Pipeline Design
#### 2.1.1 Exposure Correction (EC)  
The EC module adjusts the brightness and contrast of an image to achieve an optimal level of visibility and detail. In recent years, researchers have proposed several DL methods for exposure adjustments and demonstrated their effectiveness in several applications, including surveillance, robotics, and photography [22; 23; 24; 25].  
In the following section, we describe the DL framework for exposure adjustment in rescue scenarios. We subdivide it into two parallel branches, namely the Under-Exposure Branch (\(UE_{b}\)) and the Over-Exposure Branch (\(OE_{b}\)), which perform the under- and overexposure corrections, respectively. Both share the same unsupervised DL model designed for low-light image enhancement. In the \(UE_{b}\), we apply the model directly to the original images to correct and recover their dark areas. Instead, for the \(OE_{b}\), we introduce a pre-processing step on the original images to treat the overexposure correction as if it were an underexposure recovery problem. After the application of the model, at the end of \(OE_{b}\), a post-processing step is necessary to restore the original appearance of the images. Further details on the processing procedures are given at the end of this section. The high-level architecture of the EC module is outlined in Figure 2.  
Further details about the main components of EC are provided below:  
Low-Light DL model: As DL model, we used the SCI (Self-Calibrated Illumination) [8]. The model is designed to be fast and flexible, thus making it ideal for real-time situations with unpredictable lighting conditions, such as those encountered in rescue scenarios. To train the model, we selected low-light images from several publicly available datasets, including LOL DATASET [6], Ex-Dark DATASET [26], MIT-Adobe FiveK [27]. This heterogeneous nature of the resulting data set was crucial to ensure that the training data set was diverse and representative of a wide range of low-light scenarios.  
The resulting training dataset comprises 2500 images captured under different indoor and outdoor lighting conditions, thus ranging from high-quality images with good resolution and minimal noise to very noisy ones with low visibility. The dataset features various scenes and subjects, including landscapes, indoor scenes, and objects, thus providing a varied set of low-light scenarios. Diversity was further increased through data augmentation techniques such as rotation, flipping, and cropping, which create additional images and improve the model's ability to generalise to different scenarios.  
Figure 1: Pipeline overview. The figure represents the main flow of the pipeline. The modules corresponding to Image-Processing (IP) techniques are coloured orange, whereas the module with the Deep Learning (DL) framework is coloured blue.  
\(OE_{b}\) processing: To perform the overexposure correction, we first pre-process the input exploiting the CIELAB color space since it separates colour information (encoded in the \(a^{*}\) and \(b^{*}\) channels) from lightness information (encoded in the \(L^{*}\) channel). Independent manipulation of the \(L^{*}\) channel has been valuable in reversing brightness without affecting the colour appearance of the original images. In addition, CIELAB is designed to be perceptually uniform, which means that equal changes in lightness should appear to be equally perceptible. Therefore, inverting the \(L^{*}\) channel results in negated images, with the relative differences between the lightness values of different colours remaining consistent. This pre-processed image is then fed to the \(OE_{b}\) (see Figure 3). Once the model is applied, we post-process the image by reversing the \(L^{*}\) channel to recover its original lighting distribution.