|
|
@ -332,12 +332,12 @@ def detect(calibration_width, img_file, show, quick):
|
|
|
|
cv2.putText(orig, str(objtype),
|
|
|
|
cv2.putText(orig, str(objtype),
|
|
|
|
(int(x - 25), int(y + radius + 20)
|
|
|
|
(int(x - 25), int(y + radius + 20)
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
0.55, (255, 255, 255), 2)
|
|
|
|
0.55, (0, 0, 255), 2)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
cv2.putText(orig, str(objtype),
|
|
|
|
cv2.putText(orig, str(objtype),
|
|
|
|
(int(xpos2 + 10), int(ypos2 + 20)
|
|
|
|
(int(xpos2 + 10), int(ypos2 + 20)
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
0.55, (255, 255, 255), 2)
|
|
|
|
0.55, (0, 0, 255), 2)
|
|
|
|
output = ""
|
|
|
|
output = ""
|
|
|
|
objname = objtype;
|
|
|
|
objname = objtype;
|
|
|
|
if objtype == "Unknown":
|
|
|
|
if objtype == "Unknown":
|
|
|
@ -353,12 +353,12 @@ def detect(calibration_width, img_file, show, quick):
|
|
|
|
cv2.putText(orig, output, # print data
|
|
|
|
cv2.putText(orig, output, # print data
|
|
|
|
(int(x - 25), int(y + radius + 35)
|
|
|
|
(int(x - 25), int(y + radius + 35)
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
0.5, (255, 255, 255), 1)
|
|
|
|
0.5, (0, 0, 255), 1)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
cv2.putText(orig, output, # print data
|
|
|
|
cv2.putText(orig, output, # print data
|
|
|
|
(int(xpos2 + 10), int(ypos2 + 35)
|
|
|
|
(int(xpos2 + 10), int(ypos2 + 35)
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
0.5, (255, 255, 255), 1)
|
|
|
|
0.5, (0, 0, 255), 1)
|
|
|
|
|
|
|
|
|
|
|
|
# show the output image
|
|
|
|
# show the output image
|
|
|
|
if show:
|
|
|
|
if show:
|
|
|
|