Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1daf17d

Browse files
DeepshikhaDeepshikha
Deepshikha
authored and
Deepshikha
committed
Updated readme file
1 parent ae43b51 commit 1daf17d

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

‎Color_detection/Readme.md‎

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@
44
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.
55

66
# Steps Used
7-
##-Importing required package and load the image.
8-
Package used - Pandas and cv2 for OpenCV bindings.
9-
##-Reading the CSV file with pandas.
10-
11-
##-Set a mouse callback event on a window
12-
- 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.
13-
###draw_function
14-
- 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.
15-
16-
##-Calculate distance to get color name
17-
d = abs(Red — ithRedColor) + (Green — ithGreenColor) + (Blue — ithBlueColor)
18-
19-
##-Display image on the window
20-
- Whenever a double click event occurs, it will update the color name and RGB values on the window.
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>
14+
**-Calculate distance to get color name**</br>
15+
d = abs(Red — ithRedColor) + (Green — ithGreenColor) + (Blue — ithBlueColor)</br>
16+
**-Display image on the window**</br>
17+
Whenever a double click event occurs, it will update the color name and RGB values on the window.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /