Spaces:
Running
Running
Commit
·
cb2f09c
1
Parent(s):
fd97df3
change parameter
Browse files
app.py
CHANGED
@@ -15,8 +15,8 @@ def drawAxis(img, p_, q_, color, scale):
|
|
15 |
hypotenuse = sqrt((p[1] - q[1]) * (p[1] - q[1]) + (p[0] - q[0]) * (p[0] - q[0]))
|
16 |
|
17 |
# Here we lengthen the arrow by a factor of scale
|
18 |
-
q[0] = p[0] - scale * hypotenuse/
|
19 |
-
q[1] = p[1] - scale * hypotenuse/
|
20 |
cv2.line(img, (int(p[0]), int(p[1])), (int(q[0]), int(q[1])), color, 3, cv2.LINE_AA)
|
21 |
|
22 |
# create the arrow hooks
|
|
|
15 |
hypotenuse = sqrt((p[1] - q[1]) * (p[1] - q[1]) + (p[0] - q[0]) * (p[0] - q[0]))
|
16 |
|
17 |
# Here we lengthen the arrow by a factor of scale
|
18 |
+
q[0] = p[0] - scale * hypotenuse/2 * cos(angle)
|
19 |
+
q[1] = p[1] - scale * hypotenuse/2 * sin(angle)
|
20 |
cv2.line(img, (int(p[0]), int(p[1])), (int(q[0]), int(q[1])), color, 3, cv2.LINE_AA)
|
21 |
|
22 |
# create the arrow hooks
|