WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

This project demonstrates a Python application for recognizing colors in images using OpenCV and a color database. It allows users to interactively explore color information in real-time.

License

Notifications You must be signed in to change notification settings

ayus1234/Color_Detection_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color Detection System

A Python-based application that allows real-time color detection in images using OpenCV and a comprehensive color database. This interactive tool helps users identify precise color names and RGB values by simply double-clicking on any pixel in the image.

Features

  • Real-time color detection from images
  • Interactive double-click interface
  • Displays RGB values and closest matching color name
  • Uses a database of 865 color names
  • Simple and intuitive user interface

Requirements

  • Python 3.x
  • OpenCV (cv2)
  • NumPy
  • Pandas

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/Color_Detection_System.git
    cd Color_Detection_System
  2. Install the required packages:

    pip install opencv-python numpy pandas

Usage

  1. Run the script using the following command:

    python color_detection.py -i <path_to_image>

    Example:

    python color_detection.py -i colorpic.jpg
  2. Once the image opens:

    • Double-click anywhere on the image to get the color name and RGB values
    • Press 'ESC' to exit the program

How It Works

The system works by:

  1. Loading an image specified through command-line arguments
  2. Reading a color database containing RGB values and color names
  3. Calculating the minimum distance between the selected pixel's RGB values and the colors in the database
  4. Displaying the closest matching color name along with its RGB values

Project Structure

  • color_detection.py: Main Python script containing the color detection logic
  • colors.csv: Database file containing color names and their RGB values
  • colorpic.jpg: Sample image for testing

Screenshots

Screenshot 1 Double-click anywhere on the image to detect colors

Screenshot 2 Real-time color detection with RGB values

Screenshot 3

License

  • This project is licensed under the MIT License
  • You are free to use, modify, and distribute this software with proper attribution

About

This project demonstrates a Python application for recognizing colors in images using OpenCV and a color database. It allows users to interactively explore color information in real-time.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages