element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development How does video work?
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 5 replies
  • Subscribers 364 subscribers
  • Views 672 views
  • Users 0 members are here
Related

How does video work?

e14 Contributor
e14 Contributor over 13 years ago

So the Zedboard is using the FPGA to do some basic video processing.  But if I wanted to use v4l how would I go about doing that?  I want to integrate a frame grabber with some video processing code, but I can't figure out how to capture the video stream live.  Thoughts?

  • Sign in to reply
  • Cancel
  • e14 Contributor
    0 e14 Contributor over 13 years ago

    jayjay71,

    My experience with Video4Linux is limited, however I do believe I know enough to point you in the correct direction.

    Here is the how-to guide for writing a driver for a device to make it V4L compatible:

    http://www.linuxtv.org/downloads/legacy/video4linux/v4l2dwgNew.html

    You will want to write a driver for your custom logic that will be compiled against the version of the Kernel you are using.  This driver must be in line with the aforementioned rules set by the V4L folks.

    I would start by setting up a FIFO within your PL, and fill that with video data.  The other side of the FiFo would be butted up to one of the AXI interfaces.  Depending on how much image data you are pushing through it may have to be the High Performance AXI interface.  Then, you driver would connect the read, write, open, close, ioctr, and mmap functions to specific memory read and writes that corresponding to the address(es) that EDK assigned your peripheral.

    I know that my response requires you to know a lot about a lot but does that make sense?  If not we can try and break it down piece by piece.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 13 years ago

    I appreciate the quick response.  I guess I should elaborate on my situation.

    First of all, I somewhat understand what you're saying, but I've never written a driver before so it's mostly new to me.  Breaking it down would certainly be helpful, but I'm used to scavenging tutorials and binding them together to get what I want eventually.

    So basically what I'm trying to do is get a USB frame grabber to work with OpenCV on the Zedboard.  Using the software that came with the frame grabber (sensoray 2255s) I'm able to get a live stream.  However, this is NOT using v4l and as far as I can tell there's no obvious way to integrate it with OpenCV.  At the moment I'd be happy just have to a driver or a module that will allow me to see the frame grabber as a webcam and then OpenCV can do the rest, although ultimately I'll probably need to do a lot more low-level code to optimize things using VHDL since speed and resources are a big concern.  I had bad luck recompiling the full Digilent kernel (I tried twice and both times I couldn't get anything to boot - it was something with the /dev directory and/or initrd and/or initramfs).  If you know that the Digilent kernel works with v4l (and I assume a full kernel does) I can give that another go.  But like I said, in the end I'll *probably* need to build the driver like you suggested, so any details are appreciated.

    Alternatively, if somebody here knows a way to modify highgui in OpenCV to access non-standard video buffers (somebody who's actually done it) that would work for me as well.

    Again, I appreciate the quick response.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 13 years ago in reply to e14 Contributor

    Although I'm not sure, I think the issue is not the driver but rather a missing v4l module within the kernel.  Hopefully I'll know by the end of the week and I'll probably report back whether I was successful or not.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 13 years ago in reply to e14 Contributor

    Yes, that all makes sense.  I think it's gonna be a while before I get anything put into hardware though.  I'm still very much at the proof-of-concept stage for my project.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • e14 Contributor
    0 e14 Contributor over 13 years ago in reply to e14 Contributor

    *hardware = PL

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube