## 3 Materials and Methods
### Dataset
#### 3.1.2 Data Annotation Technique  
The newly extracted images from the Firefront_Gestosa data were labeled manually with pixel labels based on human observation using \"MATLAB ImageLabeler\". Following that, the labels were normalized and transformed to binary images. Table 2 summarizes the preprocessing steps adopted in the present study. The mask variable refers to ground truth pictures. First, the indexed ground truth images were normalized and then transformed to grayscale pictures. Furthermore, an inverse colormap algorithm [38] was applied to convert the pictures again to indexed values. The algorithm quantizes the colormap into \(2^{5}\) distinct nuance degrees per color component. Later, the closest nuance in the quantized colormap is localized for each pixel in the grayscale image. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Video** & **Pixel Resolution** & \begin{tabular}{c} **Number of Frames** \\ **Second (Frame Rate)** \\ \end{tabular} & \
\begin{tabular}{c} **Durations in** \\ **Seconds** \\ \end{tabular} &
\begin{tabular}{c} **Number of** \\ **Bits per Pixel** \\ \end{tabular} & **Video Format** \\ \hline PIC\_081.MP4 & 1920 \(\times\) 1080 & 50 & 182.88 & 24 & RGB24 \\ \hline PIC\_082.MP4 & 1920 \(\times\) 1080 & 50 & 163.68 & 24 & RGB24 \\ \hline PIC\_083.MP4 & 1920 \(\times\) 1080 & 50 & 178.56 & 24 & RGB24 \\ \hline PIC\_085.MP4 & 1920 \(\times\) 1080 & 50 & 66.24 & 24 & RGB24 \\ \hline PIC\_086.MP4 & 1920 \(\times\) 1080 & 50 & 191.04 & 24 & RGB24 \\ \hline Gestosa2019.MP4 & 1280 \(\times\) 270 & 29.97 & 218.18 & 24 & RGB24 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Firefront_Gestosa dataset: The first five videos consist of five main recorded videos. The last video is a compilation of multiple perspectives from the first five videos. \begin{table}
\begin{tabular}{c c} \hline \hline
**Initialization** & For the Mask of Every Picture \\ \hline \multirow{5}{*}{Image normalization} & \(\bullet\) & Compute minimum and maximum pixel intensity of the mask as follow: \\  & \(\textit{minv}=\underset{i=\{1,\ \ldots,\ \text{size}\}}{\text{min}}\) & \((\textit{mask}(i,j))\) \\  & \(\textit{maxv}=\underset{i=\{1,\ \ldots,\ \text{size}\}}{\text{max}}\) & \((\textit{mask}(i,j))\) \\  & \(\textit{xsize}\) and \(\text{ysize}\) correspond to the number of row and columns of the ground truth picture. \\  & \(\bullet\) & The indexed mask is normalized: \\  & \(\textit{nmask}=round\Big{(}1+(\textit{ncol}-1)*\frac{(\textit{mask}-\textit{ minv})}{(\textit{maxv}-\textit{minv})}\Big{)}\) \\  & \(\textit{ncol}\) corresponds to the Number of columns of the used gray map. \\  & The function round is used to round the results to the next integer number. \\ \hline \multirow{5}{*}{ \begin{tabular}{c} Storing format switch: number \\ colors adjustment \\ \end{tabular}  } & \(\bullet\) & Convert the indexed mask to grayscale image: \\  & \(\textit{rgb\_mask}(i,j)=\text{nmask}(\text{map}(\text{i},\text{j}))\) \\  & map is a matrix defining the gray colormap used. \\  & map is an 256 \(\times\) 3 containing floating-point values of color intensities in the range [0, 1]. \\  & Reduce the number of colors and translation to indexed image using Inverse colormap \\  & computation algorithm [38], input is _rgb\_mask_ and output is _ind\_mask_. \\ \hline \multirow{5}{*}{Final step: Switch to binary image} & \(\bullet\) & Convert the indexed image to binary format: \\  & \(\left\{\begin{array}{l}\textit{bn\_maskind\_mask(i,j)=1,\ if\ ind\_mask(i,j) \geq\gamma\\ \textit{bn\_maskind\_mask(i,j)=0,\ if\ ind\_mask(i,j)<\gamma\\ \textit{\gamma}}\text{ is the luminance threshold, the adopted value is 0.5. \\ \text{\text{\textbullet}}}\text{The main objective of the transformations mentioned above (indexed to grayscale and grayscale to indexed) is to have images that deploy a fixed colormap to make the processing easier later. Then the images are binarized based on a threshold value and stored correctly. The same preprocessing steps were applied to the FLAME dataset that was already labeled.