This study utilizes spectral analysis to quantify water pollutants by analyzing the images of biological oxygen demand (BOD). In this study, a total of 2545 images depicting water quality pollution were generated due to the absence of a standardized water pollution detection method. A novel snap-shot hyperspectral imaging (HSI) conversion algorithm has been developed to conduct spectral analysis on traditional RGB images. In order to demonstrate the effectiveness of the developed HSI algorithm, two distinct three-dimensional convolution neural networks (3D-CNN) are employed to train two separate datasets. One dataset is based on the HSI conversion algorithm (HSI-3DCNN), while the other dataset is the traditional RGB dataset (RGB-3DCNN). The images depicting water quality pollution were categorized into three distinct groups: Good, Normal, and Severe, based on the extent of pollution severity. A comparison was conducted between the HSI and RGB models, focusing on precision, recall, F1-score, and accuracy. The water pollution model's accuracy improved from 76% to 80% when the RGB-3DCNN was substituted with the HSI-3DCNN. The results suggest that the HSI has the capacity to enhance the effectiveness of water pollution detection compared to the RGB model.