You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this color detection Python project, we are going to build an application through which you can automatically get the name of the color by clicking on them. So for this, we will have a data file that contains the color name and its values. Then we will calculate the distance from each color and find the shortest one.
5
+
6
+
# Steps Used
7
+
- ##Importing required package and load the image.</br>
8
+
Package used - Pandas and cv2 for OpenCV bindings.</br>
9
+
- ##Reading the CSV file with pandas.</br>
10
+
- ##Set a mouse callback event on a window</br>
11
+
First, we created a window in which the input image will display. Then, we set a callback function which will be called when a mouse event happens.</br>
12
+
**draw_function** -
13
+
In the function, we check if the event is double-clicked then we calculate and set the r,g,b values along with x,y positions of the mouse.</br>
0 commit comments