|
|
@ -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, (0, 0, 255), 2)
|
|
|
|
0.6, (50, 50, 220), 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, (0, 0, 255), 2)
|
|
|
|
0.6, (50, 50, 220), 2)
|
|
|
|
output = ""
|
|
|
|
output = ""
|
|
|
|
objname = objtype;
|
|
|
|
objname = objtype;
|
|
|
|
if objtype == "Unknown":
|
|
|
|
if objtype == "Unknown":
|
|
|
@ -351,14 +351,14 @@ def detect(calibration_width, img_file, show, quick):
|
|
|
|
print(objname)
|
|
|
|
print(objname)
|
|
|
|
if circular:
|
|
|
|
if circular:
|
|
|
|
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 + 40)
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
0.5, (0, 0, 255), 1)
|
|
|
|
0.5, (50, 50, 220), 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 + 40)
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
), cv2.FONT_HERSHEY_SIMPLEX,
|
|
|
|
0.5, (0, 0, 255), 1)
|
|
|
|
0.5, (50, 50, 220), 1)
|
|
|
|
|
|
|
|
|
|
|
|
# show the output image
|
|
|
|
# show the output image
|
|
|
|
if show:
|
|
|
|
if show:
|
|
|
|