UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
555 Views

USB3 high speed camera + Linux interface, possible?

Jump to solution

Hello,

 

I'm working in a project where there's a need to record some high speed video coming from a commercial USB3 camera and I'm looking to implement a hardware to interface this.

Seeing the options (baremetal/linux) I'm thinking about the possibility  to use petalinux and Zynq ultrascale. I'm more familiar with bare metal applications but I did a few embedded Linux small projects and driver development in the past.

 

To start with I'm thinking to use/get the next:

- Petalinux 

- ZCU102 or the UltraZed kit 

- Standard USB3 HS camera.

 

Anyone knows if would be possible to achieve this? Would the petalinux USB3 driver for Zynq Ultrascale work with a HS USB3 vision camera?

 

Thanks.

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
350 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

You can do performance test with

https://gist.github.com/CreaRo/8c71729ed58c4c134cac44db74ea1754 in petalinux

 

Probably x264enc should be replaced with hw h264 encoder.

For hw encoder, refer 

 http://www.wiki.xilinx.com/Zynq%20UltraScale%EF%BC%8B%20MPSoC%20VCU%20TRD%202018.2%20-%20Design%20Module%204

Then I think zynq mpsoc can save >200fps video stream without loss

0 Kudos
9 Replies
Adventurer
Adventurer
510 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

Hi

You don't need to write driver for usb camera

Linux kernel has generic usb camera driver(UVC driver)

You can choose it in kernel settings of petalinux

 

Device Drivers -> Multimedia support
[*] Media USB Adapters ===> CONFIG_MEDIA_USB_SUPPORT=y

Device Drivers -> Multimedia support -> Media USB Adapter
<*> USB Video Class (UVC) ===> CONFIG_USB_VIDEO_CLASS=y
[*] UVC input events device support (NEW) ===> CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

0 Kudos
Explorer
Explorer
474 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

Hi @hokim,

Thanks for your reply and info ( I'm assuming we are talking about USB3.0)...great, so I won't have to worry about drivers...

Do you know or anyone knows, how many USB3.0 high speed cameras could I interface with petalinux?

Is there anyone that already have implemented a high speed usb3 camera interface under petalinux using zynq ultrascale or similar?

 

Mainly I'd like to know if there's any challenges involved on this or is a pretty straight forward task.

Thanks.

0 Kudos
Adventurer
Adventurer
457 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

Refer http://www.wiki.xilinx.com/reVISION%20Getting%20Started%20Guide%202017.4

video_lib includes userspace code using uvc camera

 

You can connect as many cameras as you want to use.

The actual number depends bandwidth and the number of usb ports

0 Kudos
Explorer
Explorer
436 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

Hi @hokim,

 

Many thanks for the link really useful.  

 

In the examples description I can see this:

"USB2/3 camera up to 1080p60 or stereo 1080p30"

 

Do you know if there's any limitation in terms of camera speed? My goal will be to interface high fps cameras >=200fps?

 

Thanks.  

0 Kudos
Adventurer
Adventurer
417 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

"HDMI Rx up to 4k60" means that mpsoc can process video frame data of 1080p at 240 fps according to below calculation

3840*2160*60/(1920*1080)=240

 

Can you get usb3 high speed camera with >=200 fps?

As far as I know, max YUV fps of usb camera is 60 fps.

 

 

 

0 Kudos
Explorer
Explorer
409 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

Hi @hokim,

 

Thanks again for your reply.

 

As far as I know, max YUV fps of usb camera is 60 fps.

Do you mean with the linux driver interface?

 

Because you can get cameras at higher rates (for lower resolutions) eg:

https://www.ximea.com/en/products/cameras-filtered-by-sensor-types/mq013cg-on

 

 

0 Kudos
Adventurer
Adventurer
396 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

Check which format the 210 fps  is for

The frame data for mpsoc should not be encoded  by codec(i.e mpeg)

0 Kudos
Explorer
Explorer
366 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

@hokim, yes, that's the key for all this question, the video is transmitted using USB3 Vision protocol, and is not encoded, can be selected: RAW(bayer16bits) or RGB(24bits) not sure if supports another formats. 

 

Assuming we've got enough bandwidth (DDR and eMMC/SD memories)  for a  210fps stream, I only interested to record a few seconds...Would it be possible to receive this video stream, encode  and save it as a video format using petalinux and zynq ultrascale?

0 Kudos
Adventurer
Adventurer
351 Views

Re: USB3 high speed camera + Linux interface, possible?

Jump to solution

You can do performance test with

https://gist.github.com/CreaRo/8c71729ed58c4c134cac44db74ea1754 in petalinux

 

Probably x264enc should be replaced with hw h264 encoder.

For hw encoder, refer 

 http://www.wiki.xilinx.com/Zynq%20UltraScale%EF%BC%8B%20MPSoC%20VCU%20TRD%202018.2%20-%20Design%20Module%204

Then I think zynq mpsoc can save >200fps video stream without loss

0 Kudos