loop through them all automatically

cascade
Cole Deck 5 years ago
parent 4fe1348fd2
commit 6bfeb1237c

@ -151,7 +151,7 @@ for c in cnts:
orig = image.copy() orig = image.copy()
# loop over the contours individually # loop over the contours individually
for c in cnts: for c in cnts:
orig = image.copy()
num += 1 num += 1
# if the contour is not sufficiently large, ignore it # if the contour is not sufficiently large, ignore it
if cv2.contourArea(c) < 100 or pixelsPerMetric is None: if cv2.contourArea(c) < 100 or pixelsPerMetric is None:
@ -289,5 +289,7 @@ for c in cnts:
0.65, (255, 255, 255), 2) 0.65, (255, 255, 255), 2)
# show the output image # show the output image
cv2.imshow("Item Sorter", orig) cv2.imshow("Item Sorter", orig)
cv2.waitKey(500)
cv2.waitKey(0) cv2.waitKey(0)
Loading…
Cancel
Save