video capture and detection working now

video
Cole Deck 5 years ago
parent c40d84705f
commit 574bf7050c

Binary file not shown.

@ -164,7 +164,7 @@ def detect(calibration_width, img_file, show, quick):
cv2.drawContours(orig, [box.astype("int")], -1, (0, 255, 0), 2)
else:
circular = True
cv2.circle(orig, (int(x), int(y)), int(radius), (0, 255, 0), 2)
cv2.circle(orig, (int(x), int(y)), int(radius), (0, 255, 0), 3)
mask = np.zeros(gray.shape, np.uint8)
cv2.drawContours(mask, [c], 0, 255, -1)
#pixelpoints = np.transpose(np.nonzero(mask))
@ -246,7 +246,7 @@ def detect(calibration_width, img_file, show, quick):
#cv2.drawContours(orig, [box.astype("int")], -1, (0, 255, 0), 2)
else:
circular = True
cv2.circle(orig, (int(x), int(y)), int(radius), (0, 255, 0), 1)
cv2.circle(orig, (int(x), int(y)), int(radius), (255, 0, 0), 2)
objtype = "Unknown"
itemw = larger(dimA, dimB)
@ -321,7 +321,7 @@ def detect(calibration_width, img_file, show, quick):
swap(ypos, ypos2)
if rectangular:
cv2.line(orig, (int(xpos), int(ypos)),
(int(xpos2), int(ypos2)), (0, 255, 0), 1)
(int(xpos2), int(ypos2)), (255, 127, 0), 2)
# print(str(iteml))
# draw the object sizes on the image
if show or True:

Loading…
Cancel
Save