This study discusses the application of the HSV color segmentation method for color-based object detection in digital images. The data used consist of digital images in JPG, PNG, or WebP format containing various colored objects, including red tomatoes, yellow bananas, green apples, orange oranges, purple akebia, brown sapodilla, and blue blueberries. The research process involves converting images from BGR to HSV, determining HSV ranges for each color, creating masks, performing segmentation, analyzing pixels, detecting contours, and visualizing results using bounding boxes. The results show that the HSV method effectively detects objects, separates them from the background, and provides quantitative information, including pixel count, area percentage, and average HSV values for each color. Red, yellow, green, orange, purple, brown, and blue colors were successfully segmented, displaying clear and accurate objects, both for single and multiple objects, under various sizes and lighting conditions. These findings confirm that the HSV method is a simple, fast, and effective approach for color-based image analysis.
Copyrights © 2025