Jyothish CHANDRASENAN commited on
Commit
08effef
·
1 Parent(s): edec1d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -128,13 +128,13 @@ def postprocessor(prediction, orig_img):
128
  points.append((x,y))
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,y+10), cv2.FONT_HERSHEY_SIMPLEX, 2, (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, 2, (0,0,255), 1, cv2.LINE_AA)
138
  return result_image
139
 
140
  def distanceCalculate(p1, p2):
 
128
  points.append((x,y))
129
  color = (255, 0, 0)
130
  thickness = 1
131
+ result_image = cv2.circle(result_image, (x,y), radius=5, color=color, thickness=10)
132
+ result_image = cv2.putText(result_image,text[idx], (x,y+10), cv2.FONT_HERSHEY_SIMPLEX, 0.35, (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.35, (0,0,255), 1, cv2.LINE_AA)
138
  return result_image
139
 
140
  def distanceCalculate(p1, p2):