Java bindings for the openpnp-capture video capture library. Releases include all platform binaries and support auto extraction for a "plug and play" experience. Simply install the Maven dependency and start capturing!
<dependency>
<groupId>org.openpnp</groupId>
<artifactId>openpnp-capture-java</artifactId>
</dependency>
public static void main(String[] args) {
OpenPnpCapture capture = new OpenPnpCapture();
CaptureDevice device = capture.getDevices().get(0);
CaptureFormat format = device.getFormats().get(0);
CaptureStream stream = device.openStream(format);
BufferedImage image = stream.capture();
}
See https://github.com/openpnp/openpnp-capture/releases to pick a release of the native library to build against and specify it's tag name in the next command.
./scripts/download-openpnp-capture.sh <RELEASE>
mvn clean package
Releases are built automatically using Github Actions. Binaries for non-tagged commits can be downloaded from the Actions tab. Binaries for tagged releases are deployed to Maven Central and Github Releases.
To release a new version to Github Releases and Maven central:
- Choose an OpenPnP Capture release from https://github.com/openpnp/openpnp-capture/releases.
- Update the version line in
.github/workflows/build.yml
to include that release name. - Update the version in
pom.xml
. Should match release. Append-n
for sub-releases. - Commit and tag the changes with the new version number.
- Push to main.
- Github Actions will build and deploy the release.