Spaces:
Runtime error
Runtime error
Jyothish CHANDRASENAN
commited on
Commit
·
f2e05d8
1
Parent(s):
f9be12a
Update app.py
Browse files
app.py
CHANGED
@@ -129,12 +129,12 @@ def postprocessor(prediction, orig_img):
|
|
129 |
color = (255, 0, 0)
|
130 |
thickness = 1
|
131 |
result_image = cv2.circle(result_image, (x,y), radius=0, color=color, thickness=2)
|
132 |
-
result_image = cv2.putText(result_image,text[idx], (x-10,y-5), cv2.FONT_HERSHEY_SIMPLEX, 0.25, (255,0,0),
|
133 |
|
134 |
distance = distanceCalculate(points[0], points[1])
|
135 |
midpoints = midpoint(points[0], points[1])
|
136 |
result_image = cv2.line(result_image, points[0], points[1], (0,0,255), 1)
|
137 |
-
result_image = cv2.putText(result_image,str(distance), midpoints, cv2.FONT_HERSHEY_SIMPLEX, 0.25, (0,0,255),
|
138 |
return result_image
|
139 |
|
140 |
def distanceCalculate(p1, p2):
|
|
|
129 |
color = (255, 0, 0)
|
130 |
thickness = 1
|
131 |
result_image = cv2.circle(result_image, (x,y), radius=0, color=color, thickness=2)
|
132 |
+
result_image = cv2.putText(result_image,text[idx], (x-10,y-5), cv2.FONT_HERSHEY_SIMPLEX, 0.25, (255,0,0), 1, cv2.LINE_AA)
|
133 |
|
134 |
distance = distanceCalculate(points[0], points[1])
|
135 |
midpoints = midpoint(points[0], points[1])
|
136 |
result_image = cv2.line(result_image, points[0], points[1], (0,0,255), 1)
|
137 |
+
result_image = cv2.putText(result_image,str(distance), midpoints, cv2.FONT_HERSHEY_SIMPLEX, 0.25, (0,0,255), 1, cv2.LINE_AA)
|
138 |
return result_image
|
139 |
|
140 |
def distanceCalculate(p1, p2):
|