Skip to content
A cross platform video capture library with a focus on machine vision.
C Assembly HTML C++ PHP Java Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
QtCaptureTest QTCaptureTest: Add support for disabling autofocus Jan 5, 2019
cmake
common
doc Updated documentation to reflect the availability of exposure control. Jul 10, 2017
include Added power line frequency setting to windows Jan 7, 2018
linux Added power line frequency setting to Linux Jan 7, 2018
mac
win Added power line frequency setting to windows Jan 7, 2018
.gitignore Add QtCaptureTest/build to gitignore. Oct 11, 2017
.travis.yml
CMakeLists.txt Test build with static linking of runtime. Oct 3, 2017
Doxyfile Updated doxygen project file to have relative paths. Updated document… Aug 1, 2017
LICENSE.txt
README.md
appveyor.yml
bootstrap.bat Fixed bug in Win:setProperty() that returns an undefined status code.… Oct 5, 2017
bootstrap_linux.sh Started on Linux V4L2 integration Jul 11, 2017
bootstrap_osx.sh Fixed CLANG compile errors. Updated CMakeLists.txt Jul 11, 2017

README.md

OpenPNP Logo

openpnp-capture

OpenPnP Capture is a cross platform video capture library with a focus on machine vision. It's goals are:

  • Native camera access on Windows, Linux and Mac. Implemented with DirectShow, V4L2 and AVFoundation respectively.
  • Named device enumeration.
  • Strong, repeatable unique IDs.
  • Format control with support for at least YUV and MJPEG. MJPEG will allow the use of multiple USB cameras on a single hub.
  • Auto and manual exposure control.
  • Auto and manual focus control.
  • Simple, common C wrapper for the listed APIs.

Status

Windows

Feature Implemented
Device Enumeration Yes
Capturing Yes
MJPEG formats Yes
YUV formats Yes
Exposure control Yes
Focus control Yes / Untested
Zoom control Yes
Gain control Yes
White balance control Yes
Framerate control No

Linux

Feature Implemented
Device Enumeration Yes
Capturing Yes
MJPEG formats Yes
YUV formats Yes, YUYV/YUV2
Exposure control Yes
Focus control Yes / Untested
Zoom control Yes
Gain control Yes / Untested
White balance control Yes
Framerate control No

OSX

Feature Implemented
Device Enumeration Yes
Capturing Yes
MJPEG formats Yes (dmb1)
YUV formats Yes
Exposure control Yes / Experimental
Focus control Yes / Experimental
Zoom control Yes / Experimental
Gain control Yes / Experimental
White balance control Yes / Experimental
Framerate control No

TODO

  • support for re-enumeration.

Building OpenPnP Capture

Dependencies

  • CMAKE 3.1 or better
  • MAKE (osx, linux)
  • Visual Studio 2013 + NMake or Ninja Build (windows)
  • NASM for building libjpeg-turbo (linux)

Build instructions (Windows)

Run the batch file 'bootstrap.bat' and choose the desired build system (VisualStudio/nmake or Ninja). Make sure the compiler (Visual Studio) is in the search path.

Go to the build directory and run nmake or ninja to build the library and the test application.

Build instructions (OSX)

Run 'bootstrap_osx.sh'. Run make.

Build instructions (Linux)

Run 'bootstrap_linux.sh'. Run make.

Supporting other platforms

  • Implement all PlatformXXX classes, like in the win or linux directories.
  • PlatformContext handles device and internal frame buffer format enumeration.
  • PlatformStream is responsible for capturing and decoding the camera stream to a 8-bit per channel RGB frame buffer.
  • Statically link external dependencies.

Releases

Releases are built automatically for all supported platforms. See https://github.com/openpnp/openpnp-capture/releases/latest to download the latest.

You can’t perform that action at this time.