Skip to content

Instantly share code, notes, and snippets.

@Kunzendorf
Created October 3, 2020 16:33
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 Kunzendorf/0ed42a0c8f3e657e4dcb2ea90be3e3af to your computer and use it in GitHub Desktop.
Save Kunzendorf/0ed42a0c8f3e657e4dcb2ea90be3e3af to your computer and use it in GitHub Desktop.
PYNQ HDMI input test
from pynq.overlays.base import BaseOverlay
from pynq.lib.video import *
base = BaseOverlay("base.bit")
hdmi_in = base.video.hdmi_in
hdmi_out = base.video.hdmi_out
hdmi_in.configure()
hdmi_out.configure(hdmi_in.mode)
hdmi_in.start()
hdmi_out.start()
import PIL.Image
frame = hdmi_in.readframe()
img = PIL.Image.fromarray(frame)
img.save("/home/xilinx/jupyter_notebooks/base/video/data/test_pic.jpg")
hdmi_out.stop()
hdmi_in.stop()
del hdmi_in, hdmi_out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment