What is an efficient way of getting a counter in this for loop statement
for (x, y, window) in sliding_window(img, stepSize=32, windowSize=(64, 64)):
print window
What is an efficient way of getting a counter in this for loop statement
for (x, y, window) in sliding_window(img, stepSize=32, windowSize=(64, 64)):
print window
Use enumerate():
for i, (x, y, window) in enumerate(sliding_window(img, stepSize=32, windowSize=(64, 64))):
print i, window