EmbDev.net

Forum: FPGA, VHDL & Verilog How to use USB port of FPGA to access webcam


von Lakshita J. (lakshita)


Rate this post
useful
not useful
Hello all,

I am working on a project related to image processing and I want to 
capture the photo using a USB webCAM.

Can anyone please tell me How to interface Logitech webcam through USB 
port of any FPGA board(i.e. Zybo, Zedboard, Basys3)?

:
von Alexx (Guest)


Rate this post
useful
not useful
Is this your homework? You need to use the driver to acess the webcam.
Use embedded linux on the ZYNQ platform. I worked with xillybus once for 
a project at university, it worked for us. You need a linux driver for 
the webcam and if you need it in the programmable logic xillybus helps 
you to stream it there....

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Lakshita J. wrote:
> webcam through USB port of any FPGA board(i.e. ... Basys3)?
Read, how the both USB connectors J2 and J4 of the Basys3 board are 
connected to the FPGA. You will find out, that you cannot implement a 
USB host to get data from the connectors to the FPGA.
See there: 
https://reference.digilentinc.com/_media/reference/programmable-logic/basys-3/basys3_rm.pdf

> Zybo, Zedboard,
Do the same here.
Zybo: the USB Micro AB connector J9 offers USB2.0 OTG functionality.
https://reference.digilentinc.com/reference/programmable-logic/zybo/reference-manual

Zedboard: see Chapter 2.3.1 there the manual 
http://www.zedboard.org/sites/default/files/documentations/ZedBoard_HW_UG_v2_2.pdf

For connecting a USB device to a FPGA being the host, you 1. must 
implement the USB host hardware connection and 2. you must implement the 
host driver to connect to the USB device and retrieve data from the 
connected USB device. None of those both tasks are for beginners.

So use a board able to run a linux OS and its drivers to connect to the 
webcam. Then capture the picture to RAM and then start your own image 
processing. This alone will be demanding enough.

: Edited by Moderator
von Lakshita J. (lakshita)


Rate this post
useful
not useful
Thank u all for the valuable information. Can you provide any useful 
links related to this topic of using USB Webcam?

: Edited by User
von Christophz (Guest)


Rate this post
useful
not useful
Most USB webcams implement the standard "USB video class" therefor you 
should follow the official documentation for this devices:
https://www.usb.org/document-library/video-class-v15-document-set

And the USB standard as the base:
https://www.usb.org/document-library/usb-32-specification-released-september-22-2017-and-ecns

As said before, we would suggest you to use a simpler interface to 
connect a camera to an FPGA. USB is complex from a developers 
perspective.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.