Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,10 @@ def draw_arrow(img_result, tip, tail, length, angle):
|
|
76 |
cv2.arrowedLine(img_result, tuple(tail), tuple(tip), (0, 255, 0), 3)
|
77 |
|
78 |
# Add length and angle as text next to the tip point
|
79 |
-
text = f"
|
|
|
|
|
|
|
80 |
cv2.putText(img_result, text, (tip[0] + 10, tip[1] - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 1, cv2.LINE_AA)
|
81 |
|
82 |
def infer(image_in):
|
|
|
76 |
cv2.arrowedLine(img_result, tuple(tail), tuple(tip), (0, 255, 0), 3)
|
77 |
|
78 |
# Add length and angle as text next to the tip point
|
79 |
+
text = f"""
|
80 |
+
Length: {length:.2f},
|
81 |
+
Angle: {angle:.2f}
|
82 |
+
"""
|
83 |
cv2.putText(img_result, text, (tip[0] + 10, tip[1] - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 1, cv2.LINE_AA)
|
84 |
|
85 |
def infer(image_in):
|