Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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