diff --git a/CHANGELOG.md b/CHANGELOG.md index e75f6fc0..5ce02890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ + * Disable DocLint, which prevents the build from succeeding on Java 8 ([issue javacpp#5](https://github.com/bytedeco/javacpp/issues/5)) + * Add `FlyCapture2FrameGrabber` with cross-platform support of FlyCapture2 ([pull #45](https://github.com/bytedeco/javacv/pull/45)) * Fix issue that would prevent `CanvasFrame` from working on Mac OS X with recent versions of the JDK ([issue #39](https://github.com/bytedeco/javacv/issues/39) and [issue #314](http://code.google.com/p/javacv/issues/detail?id=314)) * Upgrade `RecordActivity` sample with a continuous record loop, thanks to Federico Sendra and Juan Manuel Sobral * Make `FrameGrabber.createDefault()` throw an exception on unsupported input, instead of returning a cryptic `null` ([issue #30](https://github.com/bytedeco/javacv/issues/30)) diff --git a/README.md b/README.md index 4337548c..fc3093ba 100644 --- a/README.md +++ b/README.md @@ -40,14 +40,13 @@ We can also have everything downloaded and installed automatically with: } ``` -* SBT (inside the `build.sbt` file) + * SBT (inside the `build.sbt` file) ```scala classpathTypes += "maven-plugin" libraryDependencies += "org.bytedeco" % "javacv" % "0.9" ``` -Additionally, we need to either set the `platform.dependency` system property (via the `-D` command line option) to something like `android-arm`, or set the `platform.dependencies` one to `true` to get all the binaries for Linux, Mac OS X, and Windows. - +Additionally, we need to either set the `platform.dependency` system property (via the `-D` command line option) to something like `android-arm`, or set the `platform.dependencies` one to `true` to get all the binaries for Linux, Mac OS X, and Windows. On build systems where this does not work, we need to add the platform-specific artifacts manually. Required Software @@ -69,17 +68,6 @@ Further, although not always required, some functionality of JavaCV also relies Finally, please make sure everything has the same bitness: **32-bit and 64-bit modules do not mix under any circumstances**. -Build Instructions ------------------- -To rebuild the source code, please note that the project files were created for: - - * Maven 2 or 3 http://maven.apache.org/download.html - * JavaCPP 0.9 https://github.com/bytedeco/javacpp - * JavaCPP Presets 0.9 https://github.com/bytedeco/javacpp-presets - -Once installed, simply call the usual `mvn install` command for JavaCPP, its Presets, and JavaCV. By default, all the dependencies listed above are NOT required, except for OpenCV and a C++ compiler for JavaCPP. Please refer to the comments inside the `pom.xml` files for further details. - - Manual Installation for OpenCV and FFmpeg ----------------------------------------- Simply put all the JAR files of JavaCPP, JavaCV, OpenCV, and FFmpeg (`javacpp.jar`, `javacv.jar`, `opencv-*.jar`, and `ffmpeg-*.jar`, respectively) somewhere in your CLASSPATH. Here are some more specific instructions for common cases: @@ -261,6 +249,17 @@ public class Demo { ``` +Build Instructions +------------------ +If the binary files available above are not enough for your needs, you might need to rebuild them from the source code. To this end, the project files were created for: + + * Maven 2 or 3 http://maven.apache.org/download.html + * JavaCPP 0.9 https://github.com/bytedeco/javacpp + * JavaCPP Presets 0.9 https://github.com/bytedeco/javacpp-presets + +Once installed, simply call the usual `mvn install` command for JavaCPP, its Presets, and JavaCV. By default, no other dependencies than a C++ compiler for JavaCPP are required. Please refer to the comments inside the `pom.xml` files for further details. + + ---- Project lead: Samuel Audet [samuel.audet `at` gmail.com](mailto:samuel.audet at gmail.com) Developer site: https://github.com/bytedeco/javacv diff --git a/pom.xml b/pom.xml index d54402fb..c85a4f67 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ UTF-8 yyyyMMddhhmm - 0.9 + ${project.version} **/Mark*.java @@ -78,12 +78,12 @@ org.bytedeco.javacpp-presets ffmpeg - 2.3-${javacpp.version} + 2.4.2-${javacpp.version} org.bytedeco.javacpp-presets flycapture - 2.6.3.4-${javacpp.version} + 2.7.3.13-${javacpp.version} org.bytedeco.javacpp-presets @@ -105,6 +105,11 @@ artoolkitplus 2.3.0-${javacpp.version} + + org.bytedeco.javacpp-presets + flandmark + 1.07-${javacpp.version} + org.jogamp.gluegen @@ -277,6 +282,23 @@ + + doclint-java8-disable + + [1.8,) + + + + + maven-javadoc-plugin + + -Xdoclint:none + + + + + + sign-artifacts diff --git a/src/main/java/org/bytedeco/javacv/FlyCapture2FrameGrabber.java b/src/main/java/org/bytedeco/javacv/FlyCapture2FrameGrabber.java index 9e311c34..3acc531a 100644 --- a/src/main/java/org/bytedeco/javacv/FlyCapture2FrameGrabber.java +++ b/src/main/java/org/bytedeco/javacv/FlyCapture2FrameGrabber.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011,2012,2013 Samuel Audet + * Copyright (C) 2014 Jeremy Laviole, Samuel Audet * * This file is part of JavaCV. * @@ -32,10 +32,6 @@ import static org.bytedeco.javacpp.opencv_imgproc.*; import org.bytedeco.javacpp.FlyCapture2.Error; import static org.bytedeco.javacpp.FlyCapture2.*; -import static org.bytedeco.javacv.FrameGrabber.SENSOR_PATTERN_BGGR; -import static org.bytedeco.javacv.FrameGrabber.SENSOR_PATTERN_GBRG; -import static org.bytedeco.javacv.FrameGrabber.SENSOR_PATTERN_GRBG; -import static org.bytedeco.javacv.FrameGrabber.SENSOR_PATTERN_RGGB; /** * @@ -55,7 +51,7 @@ public static String[] getDeviceDescriptions() throws FrameGrabber.Exception { for (int i = 0; i < numCameras[0]; i++) { PGRGuid guid = new PGRGuid(); - error = busMgr.GetCameraFromIndex(i, guid); + Error error = busMgr.GetCameraFromIndex(i, guid); if (error.notEquals(PGRERROR_OK)) { PrintError(error); System.exit(-1); @@ -128,7 +124,7 @@ public FlyCapture2FrameGrabber(int deviceNumber) throws FrameGrabber.Exception { // Get the camera PGRGuid guid = new PGRGuid(); - error = busMgr.GetCameraFromIndex(deviceNumber, guid); + Error error = busMgr.GetCameraFromIndex(deviceNumber, guid); if (error.notEquals(PGRERROR_OK)) { PrintError(error); System.exit(-1); @@ -174,7 +170,6 @@ protected void finalize() throws Throwable { IMAGE_DATA_FORMAT = 0x1048; private BusManager busMgr = new BusManager(); - private static Error error; private Camera camera; private CameraInfo cameraInfo; private Image raw_image = new Image(); @@ -272,7 +267,7 @@ public void start() throws FrameGrabber.Exception { } } - error = camera.StartCapture(); + Error error = camera.StartCapture(); if (error.notEquals(PGRERROR_OK)) { PrintError(error); } @@ -280,7 +275,7 @@ public void start() throws FrameGrabber.Exception { } public void stop() throws FrameGrabber.Exception { - error = camera.StopCapture(); + Error error = camera.StopCapture(); if (error.notEquals(PGRERROR_OK)) { throw new FrameGrabber.Exception("flycapture camera StopCapture() Error " + error); } @@ -297,7 +292,7 @@ public void stop() throws FrameGrabber.Exception { */ public void trigger() throws FrameGrabber.Exception { // waitForTriggerReady(); - error = camera.FireSoftwareTrigger(); + Error error = camera.FireSoftwareTrigger(); if (error.notEquals(PGRERROR_OK)) { throw new FrameGrabber.Exception("flycaptureSetCameraRegister() Error " + error); } @@ -373,7 +368,7 @@ private void setStride(Image image, int stride) { } public IplImage grab() throws FrameGrabber.Exception { - error = camera.RetrieveBuffer(raw_image); + Error error = camera.RetrieveBuffer(raw_image); if (error.notEquals(PGRERROR_OK)) { throw new FrameGrabber.Exception("flycaptureGrabImage2() Error " + error + " (Has start() been called?)"); } diff --git a/src/main/java/org/bytedeco/javacv/JavaCVCL.java b/src/main/java/org/bytedeco/javacv/JavaCVCL.java index f6349042..bf8eb673 100644 --- a/src/main/java/org/bytedeco/javacv/JavaCVCL.java +++ b/src/main/java/org/bytedeco/javacv/JavaCVCL.java @@ -21,7 +21,6 @@ package org.bytedeco.javacv; import com.jogamp.opencl.CLCommandQueue; -import com.jogamp.opencl.CLCommandQueue.Mode; import com.jogamp.opencl.CLBuffer; import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLDevice; @@ -107,7 +106,7 @@ public JavaCVCL(GLCapabilitiesImmutable caps, GLContext shareWith, CLDevice devi GLPbuffer pbuffer = null; if (caps != null) { GLDrawableFactory factory = GLDrawableFactory.getFactory(caps.getGLProfile()); - if (factory.canCreateGLPbuffer(null)) { + if (factory.canCreateGLPbuffer(null, caps.getGLProfile())) { try { // makes a new buffer pbuffer = factory.createGLPbuffer(null, caps, null, 32, 32, shareWith);