Colour Detection using OpenCV to Approximate the RGB Values of a Particular Pixel to the closest predefined Color. This Code lets you choose a particular pixel from any image and gives you the Color at that point.
Walk Through
- Lets you Click on any position of the Image
- Gets the RGB Values from the Clicked Pixel
- Converts the RGB Values to a Close colour that is Predefined and assigned a Name.
- This approximation of the Closest Colour is Done using the simple Idea of Euclidian Distance Formula that is used to find the distance between two different points in space.
- The RGB Values and the Identified colour names are overlayed on to the image
- The image also shows the position where the mouse was clicked using a small circle.