Skip to content

In this project, I used OpenCV(Python) to build a Color Detector.

Notifications You must be signed in to change notification settings

apuneet839/Color-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color Detector

An awesome OpenCV project

Table of Contents
  1. About The Project
  2. Roadmap
  3. Contact

About The Project

In this project I built an application through which we can automatically get the name of the color by double clicking on it. For this, I used a dataset that contains the color name and its RGB values. The method used to find the color name was to calculate the distance from each color and find the shortest one.

Color Detector Blue Color Detector Lust Color Detector Green

Procedure:

  • I used a dataset of colors with their name and RGB values.
  • Used Argument Parser from argparse to take image from the user in the command line
  • Read the image using cv2.imread()
  • Read the dataset and indexed it
  • Set a mouse callback event on the image window
  • Define the draw function to calculate the RGB values of the pixel that was clicked on
  • Define the getColorName function to calculate the distance and return the color name
  • Display the image on the window and surround the clicked pixel with a rectangle and use text to display the color name and its RGB values

Built With

This project was built entirely on Python.

Libraries Used

Contact

LinkedIn - Puneet Arora
Twitter - @puneet_arora_14

Project Link: https://github.com/apuneet839/Color-Detector

About

In this project, I used OpenCV(Python) to build a Color Detector.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages