## 2 Materials and Methods
### Detecting River Pollution through Machine Learning
#### 2.4.2 Feature Extraction  
Color-based features are often used in oil spills, which often create distinctive color patterns on the water surface, including dark black and iridescent rainbow sheens [17]. However, varying illumination, perspective, and occlusions can impede robust feature extraction from imagery. Oil's optically dense properties engender divergent visual signatures compared to surrounding waters, stemming from the differential interaction with solar radiation, particularly intense absorption in the 8000-14,000 nm spectrum. The resulting variations in long-wave infrared coloration facilitate the identification of surface slicks. To leverage these discernible color cues, we extract color-based features from aerial images captured by drones surveying the Shatt al-Arab River [18]. Specifically, we convert RGB images into HSV color space, which decouples hue, saturation, and value information [19]. HSV enables targeted feature engineering, a technique widely utilized in image analysis [20]. Our feature vector incorporates the mean and standard deviation of H, S, and V components across images, capturing color distribution statistics. Additionally, color histogram descriptors are extracted to represent the distribution of hues. By learning from such color-based features, the machine learning model can identify oil spill color patterns to automatically detect their presence in drone-captured imagery.  
Innovatively utilizing the HSV color space for feature extraction in identifying oil spills poses several challenges in distinguishing pollution from natural water features. These challenges include varying illumination, perspective distortions, occlusions, and the complex optical properties of oil slicks. There were multiple challenges to be addressed. Firstly, illumination changes across images lead to inconsistent color representations. To mitigate this, statistical measures such as mean and standard deviation of hue, saturation, and value components were calculated across images. These measures provide a more robust representation of color distribution, reducing the impact of varying illumination. Secondly, some drone-captured images exhibit perspective distortions due to the angle of observation. This affects the appearance of oil slicks and natural water  
Figure 5: System detection operation.  
features. However, by leveraging statistical features extracted from the HSV color space, the model learns to recognize consistent color patterns associated with oil spills despite perspective distortions. Another challenge was represented by objects obstructing the view of the water surface, hindering the identification of pollution. However, oil slicks have distinct optical properties that differ from the surrounding water, allowing for their detection even in partially occluded areas. Our machine learning model was trained on color-based features and it learned to differentiate between oil slicks and other objects, improving the detection accuracy. Oil slicks represented another challenge because they exhibit unique optical properties, such as intense absorption in specific spectral ranges. By focusing on these spectral characteristics, the model identifies surface slicks based on their distinct color patterns in the long-wave infrared spectrum, facilitating their detection in drone-captured imagery.  
By addressing these challenges and leveraging discernible color cues from the HSV color space, the approach enhances the detection of oil spill color patterns, enabling the automated identification of pollution in aerial imagery of the Shat al-Arab River.