cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nevil235
Visitor
Visitor
380 Views
Registered: ‎08-25-2020

multiple usb camera video - processing

If we attach multiple cameras to a single fpga board - Is it possible to process the video data from all the cameras simultaneously? How can this be done?

 

 

0 Kudos
2 Replies
watari
Teacher
Teacher
344 Views
Registered: ‎06-16-2013

Hi @nevil235 

 

>If we attach multiple cameras to a single fpga board - Is it possible to process the video data from all the cameras simultaneously? How can this be done?

 

Yes.

I suggest you to use v4l2 driver to capture video stream from usb device on linux.

 

Best regards,

0 Kudos
dsp81
Adventurer
Adventurer
268 Views
Registered: ‎10-25-2017

I've done this using the GStreamer framework on the pre-built Vitis-AI v1.2 ZCU104 board image.

My setup:

  • From my Linux dev. host I SSH with X forwarding to the ZCU104 and then launch the following GStreamer command

 

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480, format=YUY2, framerate=30/1 ! videoconvert ! autovideosink​


I see the video on my dev. host that has been forwarded from the ZCU104 for USB camera 0 (/dev/video0)

 

  • From a different terminal on my Linux dev. host I SSH to the ZCU104 without X forwarding and run the following commands

 

export DISPLAY=:0.0
xset -dpms
gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw, width=640, height=480, format=YUY2, framerate=30/1 ! videoconvert ! kmssink bus-id=fd4a0000.zynqmp-display plane-id=38 sync=false fullscreen-overlay=true​

 

I see video from USB camera 1 (/dev/video2) on my DisplayPort monitor connected to the ZCU104.

With the setup listed above I'm capturing video from 2 different USB cameras connect to the ZCU104 using a USB hub.  You would most likely be able to also use the OpenCV VideoCapture class to accomplish the same thing as what I've done with GStreamer.

0 Kudos