Updated Application File
Browse files
app.py
CHANGED
@@ -109,23 +109,23 @@ def show(video): # main
|
|
109 |
cv2.circle(rgb_image_f, idx_coords, 5, color, cv2.FILLED)
|
110 |
|
111 |
if idx_coords[1] < 72: # brute force but should be extremely marginally faster lol
|
112 |
-
if idx_coords[0] <
|
113 |
color = (0, 0, 255)
|
114 |
-
if
|
115 |
color = (0, 115, 255)
|
116 |
-
if
|
117 |
color = (0, 229, 255)
|
118 |
-
if
|
119 |
color = (0, 195, 88)
|
120 |
-
if
|
121 |
color = (195, 85, 0)
|
122 |
-
if
|
123 |
color = (195, 0, 68)
|
124 |
-
if
|
125 |
color = (195, 0, 143)
|
126 |
-
if
|
127 |
color = (0, 0, 0)
|
128 |
-
if
|
129 |
color = (255, 255, 255)
|
130 |
|
131 |
if len(past_holder) and drawing_flag: # start drawing
|
|
|
109 |
cv2.circle(rgb_image_f, idx_coords, 5, color, cv2.FILLED)
|
110 |
|
111 |
if idx_coords[1] < 72: # brute force but should be extremely marginally faster lol
|
112 |
+
if idx_coords[0] < 71: # red
|
113 |
color = (0, 0, 255)
|
114 |
+
if 71 < idx_coords[0] < 142: # orange
|
115 |
color = (0, 115, 255)
|
116 |
+
if 142 < idx_coords[0] < 213: # yellow
|
117 |
color = (0, 229, 255)
|
118 |
+
if 213 < idx_coords[0] < 284: # green
|
119 |
color = (0, 195, 88)
|
120 |
+
if 284 < idx_coords[0] < 356: # blue
|
121 |
color = (195, 85, 0)
|
122 |
+
if 356 < idx_coords[0] < 427: # indigo
|
123 |
color = (195, 0, 68)
|
124 |
+
if 427 < idx_coords[0] < 498: # violet
|
125 |
color = (195, 0, 143)
|
126 |
+
if 498 < idx_coords[0] < 569: # black
|
127 |
color = (0, 0, 0)
|
128 |
+
if 569 < idx_coords[0]: # white / eraser
|
129 |
color = (255, 255, 255)
|
130 |
|
131 |
if len(past_holder) and drawing_flag: # start drawing
|