Skip to content

sathvik995/Python-color-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Color Detection with Python and OpenCV

This project is a Python-based color detection tool that uses OpenCV to detect colors in an image.

Table of Contents

Features

  • Detects the dominant colors in an image.
  • Provides the color name and RGB values for the detected colors.
  • Works with various image formats.

Prerequisites

Before using this color detection tool, make sure you have the following prerequisites installed:

  • Python (3.x recommended)
  • OpenCV (Open Source Computer Vision Library)

You can install OpenCV using pip:

pip install opencv-python

Instalations

    1. Clone this repository to your local machine: git clone https://github.com/sathvik995/Python-color-detection.git
    1. Navigate to the project directory: cd color-detection

Usage

    1. Open a command prompt or terminal.
  • 2.Navigate to the project directory: cd /path/to/your/color-detection-directory
  • 3.Run the color detection script with your image file as an argument: python color_detection.py -i path_to_your_image.jpg

How It Works

The color detection tool uses OpenCV to read the input image and allows you to select colors by double-clicking on the image. The tool then displays the color name and RGB values for the selected colors. It uses a CSV file containing color names and corresponding RGB values to identify the closest matching color for the selected pixel.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

This project is a Python-based color detection tool that uses OpenCV to detect colors in an image.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages