# USB Camera IN and HDMI OUT Display

**URL:** <https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728>\
**Category:** Community corner\
**Created:** [October 2, 2022, 5:12am UTC](https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728 "2022-10-02T05:12:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ash](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Ash](https://discuss.pynq.io/u/Ash)\
**Post date:** [October 2, 2022, 5:12am UTC](https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728/1 "2022-10-02T05:12:11Z")

</div>

Hello. I have a usb camera which I wish to interface with the development board in this manner…  
-connect USB camera to board USB IN  
-writing python application to some image processing based on opencv  
-display the resulting image to HDMI out lcd display

Please suggest~  
Best,  
/Ash

---

<div class="post-metadata">

**Author:** ![skalade](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/skalade/32/686_2.png) [@skalade](https://discuss.pynq.io/u/skalade)\
**Post date:** [October 2, 2022, 10:21pm UTC](https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728/2 "2022-10-02T22:21:29Z")

</div>

Hi there,

Most PYNQ supported boards, with the default image, will ship example notebooks doing exactly what you’ve described your use case to be, e.g. the [opencv facedetect notebook](https://github.com/Xilinx/PYNQ/blob/master/boards/Pynq-Z1/base/notebooks/video/opencv_face_detect_hdmi.ipynb) will take a usb webcam input and stream into directly to an HDMI output…

Thanks  
Shawn

---

<div class="post-metadata">

**Author:** ![Ash](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Ash](https://discuss.pynq.io/u/Ash)\
**Post date:** [October 3, 2022, 12:44am UTC](https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728/3 "2022-10-03T00:44:12Z")

</div>

Hi @skalade thanks for your reply. so this would work something like…  
-getting data stream via uvc usb and I can write python script on board to run and display output on hdmi lcd?

---

<div class="post-metadata">

**Author:** ![skalade](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/skalade/32/686_2.png) [@skalade](https://discuss.pynq.io/u/skalade)\
**Post date:** [October 3, 2022, 9:54am UTC](https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728/4 "2022-10-03T09:54:53Z")

</div>

Meant to link this notebook instead: [PYNQ/opencv\_face\_detect\_webcam.ipynb at master · Xilinx/PYNQ · GitHub](https://github.com/Xilinx/PYNQ/blob/master/boards/Pynq-Z1/base/notebooks/video/opencv_face_detect_webcam.ipynb). There are loads of video example notebooks you can browse on the default PYNQ image.

It’s an example of what you want to do. USB webcam to hdmi output.

Thanks  
Shawn

---

<div class="post-metadata">

**Author:** ![cking](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/cking/32/5476_2.png) [@cking](https://discuss.pynq.io/u/cking)\
**Post date:** [June 29, 2023, 3:07pm UTC](https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728/5 "2023-06-29T15:07:02Z")

</div>

Hi there,

I am dragging this post back up just to ask if anyone can clarify what s going on under the hood on the board when the base overlay is loaded onto the board to perform this video streaming pipeline of USB webcam → HDMI.

I am looking to test a video stream pipeline that remains entirely in the Processing system (PS) and doesn’t cross the VDMA over to the Programmable Logic (PL). (And hopefully in the future a stream that is entirely PL based and doesn’t cross over to the PS).

If I load the board with the base overlay, and create the most simple pipeline of USB in and HDMI out, will this be entirely PS? the loading of the programmable logic with the bitstream has me confused whether it is involved.

Ideally then in the future I can introduce a video processing algorithm (also in the PS) hence would like to keep the latency to a minimum.

Thanks,  
Cameron

---

<div class="post-metadata">

**Author:** ![briansune](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.pynq.io/briansune/32/3087_2.png) [@briansune](https://discuss.pynq.io/u/briansune)\
**Post date:** [June 29, 2023, 3:36pm UTC](https://discuss.pynq.io/t/usb-camera-in-and-hdmi-out-display/4728/6 "2023-06-29T15:36:55Z")

</div>

@cking

For pure ARM based video:

> **[Using Cameras in Embedded Linux Systems - Colibri VF61 Module](https://www.toradex.com/blog/using-cameras-in-embedded-linux-systems)**
>
> This blog post explores various ways to view and record videos using Toradex Colibri VF61 Computer on Module / System on Module running Embedded Linux.

Only need → gst-launch videotestsrc

For pure PL video to HDMI:  
You need to change the host to device from this example see USB camera IN:

> **[GitHub - WangXuan95/FPGA-USB-Device: An FPGA-based USB full-speed device core...](https://github.com/WangXuan95/FPGA-USB-Device)**
>
> An FPGA-based USB full-speed device core to implement USB-serial, USB-camera, USB-audio, USB-hid, etc. It requires only 3 FPGA common IOs rather than additional chips. 基于FPGA的USB full-speed device端...

Which also mean your board need a larger PL DDR3 support video buffering if you really don’t want main memory crossing.

There are no free lunch in this EARTH.

ENJOY~
