Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shivakumargourimath/color-detection-using-opencv-and-python
The Color Detection Project leverages the capabilities of OpenCV and Python to create a system for identifying and naming colors in images.
https://github.com/shivakumargourimath/color-detection-using-opencv-and-python
color-detection color-detection-python opencv pandas python
Last synced: 18 days ago
JSON representation
The Color Detection Project leverages the capabilities of OpenCV and Python to create a system for identifying and naming colors in images.
- Host: GitHub
- URL: https://github.com/shivakumargourimath/color-detection-using-opencv-and-python
- Owner: shivakumargourimath
- Created: 2024-09-12T17:40:43.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T18:17:57.000Z (2 months ago)
- Last Synced: 2024-10-10T17:42:06.278Z (about 1 month ago)
- Topics: color-detection, color-detection-python, opencv, pandas, python
- Language: Jupyter Notebook
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Color-Detection-using-OpenCV-and-Python
This project demonstrates how to detect colors in an image using the OpenCV library in Python. It allows users to click on any part of an image and get the name of the color along with its RGB values.
The project utilizes a dataset ('colors.csv') that maps RGB values to color names, providing a foundation for accurate color recognition.# How to interact:
Click anywhere on the image, and the script will display the color name and RGB values both on the image window and in the terminal.
Press Esc to exit the program.# How It Works
1.Loading the Image: OpenCV reads the input image and displays it in a window.
2.Color Data: The colors.csv file contains color names and their corresponding RGB values. This file helps the program match the clicked pixel to its closest color name.
3.Mouse Callback: OpenCV captures the mouse click events, extracting the RGB values of the clicked pixel.
4.Color Matching: The program compares the pixel's RGB values with the colors in colors.csv to find the nearest color name.
5.Result Display: The detected color and its RGB values are displayed on the image and printed in the terminal