# The Application of Satellite Image Analysis in Oil Spill Detection
## 2 Materials and Methods
### Methodology Description
#### 2.2.4 Short and Long-Term Analysis  
In order to detect changes in surface waters, two Sentinel-2B images were used, one before the disaster on 23 May 2020 (25.81% cloudiness) and another after the initial water treatment on 10 July 2020 (1.20% cloudiness). The spatial resolution of the pixel has been reduced to 10 m in order to simplify and speed up the work of the program. Subsequently, a subset was established, cropping the image to the designated survey area. The bands for the analysis were selected: blue, green, red, near, and mid-infrared. Then, the NDWI2 and SWM indices were calculated to detect surface water in wetlands and measure their extent. In the next step, a formula of actions for both images was introduced (if NDWI2 > 0.3 or SWM > 1, then 1 else 0). Based on calculating water values, information on water level changes between time acquisition is calculated. The difference of the results gives information about the change in the water level. Oil spill mapping technology is successfully used to identify and map oil spills. As mentioned in Section 1, the best wavelength for detecting leaks is 400-700 nm. One of the most effective methods of detecting oil leaks is synthetic aperture radar (SAR). The Sentinel-1A image, obtained on 4 May 2020, was used to visualize oil spills. The image was cropped to the analysed area of study and the image noise was removed with a speckle filter tool. Oil leakage was detected automatically with the Oil Spill Detection tool available in Snap (Sentinel Application Platform) Desktop software. It involves two pre-processing steps: masking of inland areas and radiometric calibration so that the pixel values actually represent the radar backscatter from the surface. After these pre-processing steps, an algorithm detects oil spots and assembles them into a single group. The output is a binary mask. Results were compare with those, obtained from Sentinel-2 image from 31 May 2020. The sequence of steps was the same as during the detection of surface water changes. Bands 1, 9, and 10 that represent aerosols, water vapor, and cirrus clouds, respectively, have been removed [49]. New combinations of bands were created in the range of visible bands to \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Class Name** & **Water** & **Vegetation** & **Ground** & **Snow/Ice** & **Oil** & **Buildings** & **Total** \\ \hline Water & 46 & 0 & 0 & 0 & 0 & 46 \\ \hline Vegetation & 0 & 8 & 1 & 0 & 0 & 1 & 10 \\ \hline Ground & 0 & 10 & 51 & 2 & 0 & 2 & 65 \\ \hline Snow/Ice & 0 & 0 & 0 & 17 & 0 & 0 & 17 \\ \hline Oil & 0 & 1 & 1 & 0 & 11 & 0 & 13 \\ \hline Buildings & 0 & 0 & 1 & 0 & 0 & 6 & 7 \\ \hline Total: & 46 & 19 & 54 & 19 & 11 & 9 & \\ \hline \multicolumn{6}{c}{Overall accuracy: 87.975\%} \\ \hline \multicolumn{6}{c}{Overall kappa statistics: 0.839} \\ \hline \multicolumn{6}{c}{95\% Confidence Interval (82.587–93.363\%)} \\ \hline \multicolumn{6}{c}{Class Name} & \multirow{2}{*}{Producer’s Accuracy} & 95\% Confidence Interval & User’s Accuracy & 95\% Confidence Interval & Kappa Statistics \\ \hline Water & 100.000\% & (98.913–100.000\%) & 100.000\% & (98.913–100.000\%) & 1.0000 \\ \hline Vegetation & 42.105\% & (17.273–66.938\%) & 80.000\% & (50.208–100.000\%) & 0.7727 \\ \hline Ground & 94.444\% & (87.409–100.000\%) & 78.462\% & (67.698–89.225\%) & 0.6728 \\ \hline Snow/Ice & 89.474\% & (73.043–100.000\%) & 100.000\% & (97.059–100.000\%) & 1.0000 \\ \hline Oil & 100.000\% & (95.455–100.000\%) & 84.615\% & (61.156–100.000\%) & 0.8346 \\ \hline Buildings & 66.667\% & (30.313–100.000\%) & 85.714\% & (52.648–100.000\%) & 0.8485 \\ \hline \multicolumn{6}{c}{Quantity Disagreement: 8.228\%} \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Confusion Matrix and Accuracy statistics for SVM Classification. short infrared. The bands representing edges of the absorption characteristics for the oil were summed as a numerator and the band closest to this absorption as a denominator.