Color plays a powerful role in image segmentation and edge detection. Unlike grayscale images that carry only intensity, color images have more information, allowing more accurate object separation and boundary detection.
What is Image Segmentation:
Image segmentation is the process of dividing an image into regions that are uniform with respect to characteristics like color, texture, or brightness. The goal is to identify meaningful regions, like objects.
USING COLOR IN IMAGE SEGMENTATION
Segmentation in HSI Color Space:
- HSI = Hue, Saturation, Intensity
- Hue (H) is best for identifying colors
- Saturation (S) is used as a mask to refine the segmentation
- Intensity (I) is less useful for color-based segmentation
Example Strategy:
- Use Saturation image to filter strong colors
- Apply thresholds to Hue image to segment specific colors
- Ignore or use Intensity for brightness refinement
Use Case:
Segmenting ripe fruits like red strawberries using Hue values.
Segmentation in RGB Color Space:
Method 1: Euclidean Distance

Method 2: Generalized Distance (Mahalanobis Distance):

Method 3: Bounding Box Method
- Draw a 3D box around mean color a⃗\vec{a}a with widths based on standard deviation
- Simple, faster, and used in real-time systems
COLOR EDGE DETECTION
Let r, g, and b be unit vectors along the R, G, and B axis of RGB color space, and define the vectors

