-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
2,287 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
sbt.version=1.1.1 | ||
sbt.version=1.2.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
sbt.version=1.1.1 | ||
sbt.version=1.2.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Spinnaker-demo | ||
================ | ||
|
||
Example of using [JVM wrapper](https://github.com/bytedeco/javacpp-presets/tree/master/flycapture) for | ||
Point Grey [Spinnaker SDK](https://www.ptgrey.com/spinnaker-sdk). | ||
|
||
Please address queries and questions to [JavaCPP discussion group](http://groups.google.com/group/javacpp-project). | ||
|
||
|
||
Examples | ||
------- | ||
|
||
* C API examples in [`src/main/java/spinnaker_c`](src/main/java/spinnaker_c) : | ||
* `Acquisition_C` is an example how to enumerate cameras, start acquisition, and grab images. | ||
* `Sequencer_C` shows how to use the sequencer to grab images with various settings. | ||
|
||
|
||
Build script | ||
------------ | ||
|
||
* `build.sbt` - the main SBT configuration file. | ||
* `project/build.properties` - version of SBT to use. | ||
* `project/plugins.sbt` - plugins used for creation of Eclipse projects. | ||
|
||
|
||
How to build and run using SBT | ||
------------------------------ | ||
|
||
1. Install [Java JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html) | ||
|
||
2. Install [SBT](http://www.scala-sbt.org/) | ||
|
||
3. To run examples, change to directory containing `Spinnaker-demo`. You can run examples by typing on the command line: | ||
|
||
``` | ||
%> sbt run | ||
``` | ||
|
||
SBT will download all needed dependencies, including OpenCV and spinnaker, and run the selected example code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// @formatter:off | ||
|
||
name := "Spinnaker-demo" | ||
organization := "javacv.examples" | ||
|
||
val javacppVersion = "1.4.3" | ||
version := javacppVersion | ||
scalaVersion := "2.12.7" | ||
scalacOptions ++= Seq("-unchecked", "-deprecation", "-Xlint") | ||
|
||
// Platform classifier for native library dependencies | ||
val platform = org.bytedeco.javacpp.Loader.getPlatform | ||
// Libraries with native dependencies | ||
val bytedecoPresetLibs = Seq( | ||
"spinnaker" -> s"1.15.0.63-1.4.3").flatMap { | ||
case (lib, ver) => Seq( | ||
// Add both: dependency and its native binaries for the current `platform` | ||
"org.bytedeco.javacpp-presets" % lib % ver withSources() withJavadoc(), | ||
"org.bytedeco.javacpp-presets" % lib % ver classifier platform | ||
) | ||
} | ||
|
||
libraryDependencies ++= Seq( | ||
"org.bytedeco" % "javacpp" % javacppVersion withSources() withJavadoc(), | ||
"org.bytedeco" % "javacv" % javacppVersion withSources() withJavadoc() | ||
) ++ bytedecoPresetLibs | ||
|
||
resolvers ++= Seq( | ||
Resolver.sonatypeRepo("snapshots"), | ||
// Use local maven repo for local javacv builds | ||
Resolver.mavenLocal | ||
) | ||
|
||
autoCompilerPlugins := true | ||
|
||
// fork a new JVM for 'run' and 'test:run' | ||
fork := true | ||
// add a JVM option to use when forking a JVM for 'run' | ||
javaOptions += "-Xmx1G" | ||
|
||
// Set the prompt (for this build) to include the project id. | ||
shellPrompt in ThisBuild := { state => "sbt:" + Project.extract(state).currentRef.project + "> " } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sbt.version=1.2.6 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
// `javacpp` are packaged with maven-plugin packaging, we need to make SBT aware that it should be added to class path. | ||
classpathTypes += "maven-plugin" | ||
|
||
// javacpp `Loader` is used to determine `platform` classifier in the project`s `build.sbt` | ||
// We define dependency here (in folder `project`) since it is used by the build itself. | ||
libraryDependencies += "org.bytedeco" % "javacpp" % "1.4.3" |
Oops, something went wrong.