Sign in to follow this  
wodinoneeye

Linux support for webcam data streams ??

Recommended Posts

I have a game project that uses a webcam to read positions off a table surface. A webcam feeding images to DirectX/DirectShow gives me access to video frames (stills could serve just as well) for the processing needed to determine positions (filtering and using trig or matrix transformation to remove perspective, etc...). The other person in the project has said that running on Linux would greatly simplify other parts of the project, so my question is: How good is the support to access the same data. The webcam of course has its own interface for configuring itself (some manual camera calibration would be expected). Does linux have any general 'standard' interfaces available for video (and libs that allow access)???

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You're looking for V4L (video4linux) or V4L2. The former is more mature and apparently still favored by programmers for various reasons. IIRC, it uses ioctl, making it a bit awkward to use.

Obviously your webcam must be supported by Linux.


Hope this helps.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by wodinoneeye
Does linux have any general 'standard' interfaces available for video (and libs that allow access)???


Sorry, somehow I missed that bit. If by "interfaces", you mean something like a GUI, then no. Linux is just kernel. Even with a userland environment (libc, etc), there is no guarantee that a display will be present at all.

It's quite possible that GNOME and/or KDE would offer such an interface though. If they do, they probably also provide some kind of API to use it, or at least make it available via Bonobo or KParts. I use plain window managers though, so I have no experience with either GNOME or KDE.


Hope this helps.

Share this post


Link to post
Share on other sites
Sign in to follow this