Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,11 +56,11 @@ def infer(image_in):
|
|
56 |
|
57 |
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
|
65 |
cv2.imwrite("Image_result.png", img)
|
66 |
|
|
|
56 |
|
57 |
|
58 |
|
59 |
+
if 6 > sides > 3 and sides + 2 >= len(approx):
|
60 |
+
arrow_tip = find_tip(approx[:,0,:], hull.squeeze())
|
61 |
+
if arrow_tip:
|
62 |
+
cv2.drawContours(img, [cnt], -1, (0, 255, 0), 3)
|
63 |
+
cv2.circle(img, arrow_tip, 3, (0, 0, 255), cv2.FILLED)
|
64 |
|
65 |
cv2.imwrite("Image_result.png", img)
|
66 |
|