Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rishraks/color-object-detection
This project enables real-time detection of user-defined color objects using a webcam. Users enter a color name, and the program identifies objects matching that color by converting it to its HSV range, applying a mask, and detecting contours. It's a practical tool for object tracking, sorting, and interactive applications.
https://github.com/rishraks/color-object-detection
computer-vision numpy opencv pillow-library
Last synced: 10 days ago
JSON representation
This project enables real-time detection of user-defined color objects using a webcam. Users enter a color name, and the program identifies objects matching that color by converting it to its HSV range, applying a mask, and detecting contours. It's a practical tool for object tracking, sorting, and interactive applications.
- Host: GitHub
- URL: https://github.com/rishraks/color-object-detection
- Owner: rishraks
- License: mit
- Created: 2024-12-12T15:27:52.000Z (20 days ago)
- Default Branch: main
- Last Pushed: 2024-12-12T15:40:00.000Z (20 days ago)
- Last Synced: 2024-12-12T16:32:30.196Z (20 days ago)
- Topics: computer-vision, numpy, opencv, pillow-library
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Color Detection Project
This project enables real-time detection of user-defined color objects using a webcam. Users input a color name, and the program identifies objects of that color by converting it to its HSV range, applying a mask, and detecting contours.
## Libraries Used
- **Numpy**: For numerical operations and array handling.
- **OpenCV**: For image processing and real-time object detection.
- **Webcolors**: For converting color names to RGB values.
- **Pillow**: For image manipulation and additional utilities.## Features
- Detects objects of a user-defined color in real time.
- Highlights detected objects using contours.
- Allows customization of colors through simple name input.## How It Works
1. Users input the name of a color (e.g., "red", "blue").
2. The program retrieves the RGB value of the color using `webcolors`.
3. RGB values are converted to HSV for accurate color detection.
4. A mask is applied to filter the specified color range.
5. Detected objects are outlined using contours.## Requirements
- Python 3.6 or higher
- Libraries: `numpy`, `opencv-python`, `webcolors`, `Pillow`Install the dependencies using:
```bash
pip install numpy opencv-python webcolors Pillow
```## Usage
- Clone this project
- Run the script using:
```bash
main.py
```
- Enter a color name when prompted.
- The program will display a video feed highlighting objects matching the specified color.