Image segmentation without machine learning can be achieved using classical methods based on image processing techniques. Thresholding, such as Otsu’s method, is a simple approach that separates objects from the background based on intensity values.
Edge-based methods, like Canny edge detection, identify object boundaries by detecting gradient changes in the image. Region-based methods, such as region growing, group neighboring pixels with similar properties.
These techniques can be implemented using libraries like OpenCV, which provides functions for contour detection, morphological operations, and watershed segmentation for more complex tasks.