Cross-Platform webcam access [closed]

2019-03-19 07:39发布

I'm looking for a cross-platform video capture library, for webcam access. One that wraps V4L/V4L2 on Linux, DirectShow on Windows, and QuickTime on the Mac.

C or C++ is preferred, but I can work in Java or Python if those have better options for libraries.

4条回答
Bombasti
2楼-- · 2019-03-19 08:04

The OpenCV (Open Source Computer Vision) works under Linux, Windows and Mac OS X.

I use OpenCV under Mac OS X and it works very well with the built-in iSight of my MacBook, and I believe it works equally well under the other platforms.

Of course, OpenCV is not primarily intended as video capture library, but it can be used as such. And if you want to process the frames you grab from your webcam OpenCV will definitely help you with that...

查看更多
▲ chillily
3楼-- · 2019-03-19 08:09

Two other projects that let you access Webcams from Java:

  1. LTI-Civil
  2. Xuggler
查看更多
Anthone
4楼-- · 2019-03-19 08:12

Openframeworks has a video grabbing component which is meant to be cross platform, perhaps you could just use the framework for that piece :)

查看更多
干净又极端
5楼-- · 2019-03-19 08:27

JMF (Java Media Framework) has libraries in Linux/Windows too, and has some support for webcam capture.

Formats

http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/formats.html

查看更多
登录 后发表回答