Segmentation
To distinguish crops from weeds, we implemented a plant segmentation pipeline using a color-based approach combined with DBSCAN clustering. Initially, HSV thresholding isolates green pixels in the image. The image is then converted to binary, with green pixels as white and everything else as black. To reduce noise, morphological operations are applied: a 3x3 opening operation and a 10x10 closing operation. Finally, DBSCAN groups the white areas into clusters, with each cluster representing a different plant.