Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Red Color Segmentation using Classic Computer Vision

Python OpenCV Raspberry Pi

This repository contains a high-performance Red Color Segmentation system implemented using OpenCV on Raspberry Pi 4B. By utilizing dual-range HSV thresholding and morphological refinement, this project achieves high selectivity in isolating red objects across diverse environments.

🚀 Technical Highlights

  • Dual-Range HSV Thresholding: Implements a dual-masking technique to capture both ends of the Red Hue spectrum (0-10 and 170-180).
  • Morphological Refinement: Uses Opening and Closing operations to eliminate salt-and-pepper noise and bridge structural gaps.
  • Lighting Robustness: Tested under various light factors (0.4x to 1.6x Value) to ensure stability in different environments.
  • Multi-Domain Validation: Proven effective on Automotive, Horticulture (Apples), and Botany (Strawberries) datasets.

📊 Quantitative Results (Red Pixel Ratio)

Scenario Automotive Apples Strawberries
Default 9.16% 41.88% 11.85%
Tight 3.77% 3.60% 7.96%
Loose 10.26% 54.69% 12.81%

🎨 Visual Results (Step-by-Step)

Below is the vertical showcase of the segmentation pipeline results.

🚗 1. Automotive Dataset

Original Input Image Input

Binary Mask Mask

Final Segmentation Result Result


🍎 2. Apples Dataset

Original Input Image Input

Binary Mask Mask

Final Segmentation Result Result


🍓 3. Strawberries Dataset

Original Input Image Input

Binary Mask Mask

Final Segmentation Result Result

🎥 Video Demonstration

Click the thumbnail below to watch the technical walkthrough and live simulation:

Watch the video

📄 Project Documentation

Explore the full technical analysis and presentation slides:


Author: Ahmad Hanif Abiyyu Khrisna
Institution: Electronic Engineering Polytechnic Institute of Surabaya (PENS)

About

A high-performance Red Color Segmentation system using classic Computer Vision (OpenCV) on Raspberry Pi. Features dual-range HSV thresholding and morphological refinement, tested across multi-domain datasets including automotive and botanical subjects

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages