Skip to content

Instantly share code, notes, and snippets.

@FirefoxMetzger
Created March 5, 2021 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FirefoxMetzger/07cb13fa63baa1732180422b815cf879 to your computer and use it in GitHub Desktop.
Save FirefoxMetzger/07cb13fa63baa1732180422b815cf879 to your computer and use it in GitHub Desktop.
import imageio as iio
import matplotlib.pyplot as plt
import time
camera = iio.get_reader("<video0>")
meta = camera.get_meta_data()
delay = 1/meta["fps"]
for frame_counter in range(15):
frame = camera.get_next_data()
time.sleep(delay)
camera.close()
plt.imshow(frame)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment