Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

FPGA to communicate with webcam

Altera_Forum
Honored Contributor II
3,066 Views

Hi, I am not too sure whether this is achievable or not, but I am thinking to get the image from a webcam connected to any FPGA dev kit. But the webcam normally has its driver. My question is: is it possible for FPGA dev kit to communicate with Webcam?

0 Kudos
12 Replies
Altera_Forum
Honored Contributor II
1,036 Views

yes probably. What kind of webcam is it? if its USB you'll need a USB controller for the FPGA, which is very complicated, and is not free.

0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

oic. I am thinking to design a JPEG and JPEG2000 encoder and decoder in FPGA, but I need to capture the image. I am thinking to capture the raw image using webcam, also my next step is having some motion detection probably using webcam too.  

 

Besides webcam, is there any cheap camera that can be used with FPGA to capture image or video?
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

easiest would be an NTSC or pal camera, connected to an ADC. Much easier than USB

0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

NTSC or PAL I though is communicated to the FPGA through SDI?  

I am not very good in system design, still learning. 

I will google more on this. 

May I know whether the NTSC or PAL camera cost much?
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

You'll have to look into the cameras. I doubt they work with SDI. They output an analogue signal that you need to connect to a video decoder to digitise the values into the FPGA. It is much simpler than USB. I doubt you will find an SDI camera.

0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

Hi, I thought a FPGA attached camera module might be better for your case. USB maybe cost too much time for porting on system, except your are expert on USB video class.. 

 

something like: 

http://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&categoryno=68&no=281 

 

or search "camera" on Altera's page: 

http://www.altera.com/products/devkits/kit-daughter_boards.jsp
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

Do you mean something like this: 

 

http://www.thin-layer-embedded.com/file/view/goldilocks-with-webcam-usb-host+480w.jpg/441160608/goldilocks-with-webcam-usb-host%20480w.jpg  

 

Cyclone IV E EP4CE22 with DDR2, SRAM, EPCS16. Dev board by Thin Layer, you can pre-order one here: http://igg.me/at/fpga-module/x/3703559, $190 inc shipping. Support is here: http://www.thin-layer-embedded.com/module+-+helix_4

 

The USB controller is the MAX3421E, shield is USB Sheild by Sparkfun: https://www.sparkfun.com/products/9947. Shield support not quite ready on thin layer site, but sparkfun site has USB source code for Arduino host that can be ported.  

 

If you use an external USB host it saves you a lot of $$$ not having to buy IP for the FPGA. And the joy of getting it to work. 

 

*Disclosure* I work for the company that makes the board.
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

 

--- Quote Start ---  

oic. I am thinking to design a JPEG and JPEG2000 encoder and decoder in FPGA, but I need to capture the image. I am thinking to capture the raw image using webcam, also my next step is having some motion detection probably using webcam too.  

 

Besides webcam, is there any cheap camera that can be used with FPGA to capture image or video? 

--- Quote End ---  

 

 

Here is one appnote from Altera which you may find interesting: 

http://www.altera.com/literature/an/an427.pdf 

 

As others have suggested, using a USB webcam the project quickly becomes "making USB work" and not about your algorithm development. NTSC/PAL is easier than USB, but you may want DVI/HDMI for increased resolution. Either of those formats have the added benefit that during development, your "camera" can be a VCR/DVD player so that your inputs are identical during your debug. 

 

As far as hardware platforms go, the Terasic VEEK would have been ideal, but looks like it is no longer available. So you will likely end up purchasing at least one dev kit and one daughter card. Terasic has several options: 

http://www.terasic.com.tw/cgi-bin/page/archive.pl?language=english&categoryno=65
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

Thanks everyone for useful suggestion. The project looks interesting. 

 

But seems like there are two big area that I need to develop in, USB and encoding algorithm. 

 

I just would like to pick up more knowledge on the system design but doing some basic project. 

 

Any suggestion how should I start? using the existing camera module and develop the encoding algorithm seems to be the right way
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

Regarding system design, you may want to review the previously mentioned appnote and the Altera Video and Image Processing Suite of IP that it references. It would be reasonable to make your new encoding algorithm block to be compliant with that interface protocol (Avalon-ST packets). 

If you choose to do that, then you have access to BFM's for your simulation development, as well as a surrounding set of useful blocks. NTSC/PAL/DVI/others are implemented via the "Clocked Video Input" block supplied with that suite. With this approach, the input source for your video stream is "dont-care" for your encoding IP. 

 

Unrelated to the topic at hand, since you sound like you are just getting started, you might enjoy this book: 

http://www.amazon.com/design-embedded-image-processing-fpgas/dp/0470828498 

 

Good luck!
0 Kudos
Altera_Forum
Honored Contributor II
1,036 Views

I believe Altera Video and Audio IP reference design also uses Terasic and HSMC daugther card in certain area. 

in fact my budget is limited, that is why I am looking for some "cheap" method to work on this projevt...
0 Kudos
Reply