EmbDev.net

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


Author: Lakshita J. (lakshita)
Posted on:

Rate this post
0 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)?

Author: Alexx (Guest)
Posted on:

Rate this post
0 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....

Author: Lothar M. (lkmiller) (Moderator)
Posted on:

Rate this post
0 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
Author: Lakshita J. (lakshita)
Posted on:

Rate this post
0 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
Author: Christophz (Guest)
Posted on:

Rate this post
0 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.

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig