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.