0

I tried to capture using time.sleep(5) but I guess that is pausing the camera.. I want the camera to run normal and after 5 secs (after pressing a spacebar) I would like to click a picture and save it..

# SPACE pressed
elif k%256 == 32:
        img_name = "opencvframe{}.png".format(img_counter)
        cv2.waitKey(2000)
        cv2.imwrite(img_name, img)
        print("{} written!".format(img_name))
        img_counter += 1
rafaelc
  • 57,686
  • 15
  • 58
  • 82

0 Answers0