Multimedia ResearchISSN:2582-547X

FoamLab: An Integrated Image Processing Framework for Automated Foam and Oil Pollution Detection on Lake Surface Images

Abstract

Detecting foam and oil pollution on lake and river surfaces is challenging due to uneven illumination, specular reflection, and the subtle intensity contrast between contaminants and surrounding water. Furthermore, the identification of foam and oil pollution is complicated by the similarity in appearance between foam, oil, and the surface of the water. Consequently, this paper is concerned with the development of FoamLab, which is an advanced platform for the detection and classification of foam and oil pollution. The FoamLab has seven stages of processing for image acquisition and processing, which includes execution of the pipeline of spatial filtering (Gaussian and Median), contrast enhancement (CLAHE method and homomorphic filtering), four segmentation methods (Otsu, Adaptive, Canny, and HSV Color-Range), morphological refining, and classification of images. The FoamLab has been implemented with the help of a Flask web application in conjunction with MySQL and evaluated on 80 images. The results of studies demonstrated the effectiveness of the method due to high accuracy ranging from 65% with the Gaussian-Otsu methodology to 82% with the FoamLab implementation. The CLAHE method improved the value of the matter contrast ratio of images by 85% and the value of detectable boundaries by 10.8%. The effect of reducing the illumination intensity of images was achieved by homomorphic filtering. The effect of compression on image quality was shown without significant loss of quality (PSNR ≥ 35.73dB). Further, the use of shape descriptors provided 80-85% accuracy in foam/oil discrimination. This finding demonstrates the fact that a good classically designed pipeline can achieve pollution detection with good interpretability and usability without any need for big data or any computational power of the deep learning approaches.

References

  • L. Zhang, Y. Wang, and H. Li, "Oil slick detection on water surfaces using contrast enhancement and threshold segmentation," J. Environ. Monitoring, vol. 21, no. 4, pp. 812–820, 2019.
  • R. Kumar and A. Singh, "Edge detection based foam pattern identification in river surface images," Int. J. Remote Sensing Environ., vol. 15, no. 2, pp. 45–58, 2020.
  • S. M. Pizer et al., "Adaptive histogram equalization and its variations," Comput. Vision Graph. Image Process., vol. 39, no. 3, pp. 355–368, 1987.
  • A. M. Reza, "Realization of CLAHE for real-time image enhancement," J. VLSI Signal Process., vol. 38, no. 1, pp. 35–44, 2004.
  • A. V. Oppenheim, R. W. Schafer, and T. G. Stockham, "Nonlinear filtering of multiplied and convolved signals," Proc. IEEE, vol. 56, no. 8, pp. 1264–1291, 1968.
  • D. J. Jobson, Z. Rahman, and G. A. Woodell, "Properties and performance of a center/surround retinex," IEEE Trans. Image Process., vol. 6, no. 3, pp. 451–462, 1997.
  • G. K. Wallace, "The JPEG still picture compression standard," IEEE Trans. Consumer Electron., vol. 38, no. 1, pp. xviii–xxxiv, 1992.
  • Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Trans. Image Process., vol. 13, no. 4, pp. 600–612, 2004.
  • H. R. Sheikh, A. C. Bovik, and G. de Veciana, "An information fidelity criterion for image quality assessment," IEEE Trans. Image Process., vol. 14, no. 12, pp. 2117–2128, 2005.
  • H. Freeman and R. Shapira, "Determining the minimum-area encasing rectangle for an arbitrary closed curve," Commun. ACM, vol. 18, no. 7, pp. 409–413, 1975.
  • L. da F. Costa and R. M. Cesar Jr., Shape Analysis and Classification. Boca Raton, FL: CRC Press, 2000.
  • M. Fingas and C. Brown, "Review of oil spill remote sensing," Spill Sci. Technol. Bull., vol. 4, no. 4, pp. 199–208, 2018.
  • Y. Li, H. Zhang, and X. Chen, "Deep learning for water surface oil spill detection: A review," Remote Sensing, vol. 14, no. 3, p. 588, 2022.
  • R. C. Gonzalez and R. E. Woods, Digital Image Processing, 4th ed. New York, NY: Pearson Education, 2018.
  • X. Deng et al., "A deep learning-based method for marine oil spill detection and its application in UAV imagery," Mar. Pollut. Bull., vol. 208, 2025.
  • P. Wang, Y. Cai, and Q. Xu, "YOLO-based marine oil spill recognition in remote sensing imagery," Remote Sens. Lett., vol. 16, no. 2, pp. 88–101, 2025.
  • Z. Zhang, S. Weng, and L. Xing, "Hybrid CNN ensemble for satellite-based oil spill classification," Sci. Rep., vol. 16, 2026.
  • J. Fan, Y. Sun, and K. Amri, "Utilizing deep learning algorithms for automated oil spill detection in medium resolution optical imagery," Mar. Pollut. Bull., vol. 203, 2024.
  • R. Al-Ruzouq et al., "Sensors, features, and machine learning for oil spill detection and monitoring: A review," Remote Sens., vol. 12, no. 20, p. 3338, 2020.
  • F. De Kerf, J. Vermeulen, and S. Claeys, "A segmented RGB UAV dataset for oil spill detection in port environments," in Proc. IEEE Int. Conf. Image Process. Workshops, 2024.
  • S. Golcarenarenji et al., "Explainable oil spill detection using UAV images," in Proc. Int. Conf. Mobile Intell. Ubiquitous Comput. (MIUCC), 2025.
  • R. Gou, F. Xie, and J. Liu, "Deep learning-based hyperspectral oil spill detection for marine pollution monitoring," Mar. Pollut. Bull., vol. 218, 2025.
  • T. Huang et al., "River algal blooms can be estimated by remote sensing reflectance," Environ. Res. Lett., vol. 19, no. 10, p. 104065, 2024.
  • L. Rey et al., "A performance analysis of YOLO models for deployment on constrained edge devices in drone applications," Electronics, vol. 14, no. 1, 2025.
  • Y. Kurah, A. Al-Sudani, and M. Al-Suhail, "Hyperparameter optimization of deep learning models for oil spill segmentation in RGB images," Front. Earth Sci., vol. 13, 2025.
  • P. Hortobagyi, V. Klemas, and C. Bolpagni, "Simultaneous monitoring of algal bloom and aquatic vegetation in eutrophic shallow lakes using deep learning," J. Great Lakes Res., 2025.