Skip to content

Commit

Permalink
Update opencv-stitching samples to latest release version of OpenCV
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Sep 9, 2020
1 parent 8a0c77a commit 95a656b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
8 changes: 4 additions & 4 deletions opencv-stitching-jlink/pom.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.opencv</groupId>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-stitching-jlink</artifactId>
<version>1.5.4-SNAPSHOT</version>
<version>1.5.4</version>
<properties>
<outputModule>org.bytedeco.samples.stitching</outputModule>
<exec.mainClass>org.bytedeco.samples.Stitching</exec.mainClass>
Expand All @@ -13,7 +13,7 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform</artifactId>
<version>4.3.0-1.5.4-SNAPSHOT</version>
<version>4.4.0-1.5.4</version>
</dependency>
</dependencies>

Expand All @@ -38,7 +38,7 @@
<plugin>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.5.4-SNAPSHOT</version>
<version>1.5.4</version>
<executions>
<execution>
<id>javacpp-validate</id>
Expand Down
4 changes: 2 additions & 2 deletions opencv-stitching-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-stitching-native</artifactId>
<version>1.5.4-SNAPSHOT</version>
<version>1.5.4</version>
<properties>
<graalvm.version>20.1.0</graalvm.version>
<exec.mainClass>org.bytedeco.samples.Stitching</exec.mainClass>
Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform</artifactId>
<version>4.3.0-1.5.4-SNAPSHOT</version>
<version>4.4.0-1.5.4</version>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion opencv-stitching/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Sample project for using OpenCV from a generated Java binding made with [Bytedec
On the command line, run:

```bash
$ mvn clean install exec:java -Dexec.mainClass=Stitching \
$ mvn clean compile exec:java -Dexec.mainClass=Stitching \
-Dexec.args="panorama_image1.jpg panorama_image2.jpg \
--output panorama_stitched.jpg --try_use_gpu yes"
```
Expand Down
8 changes: 4 additions & 4 deletions opencv-stitching/pom.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco.javacpp-presets.opencv</groupId>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-stitching</artifactId>
<version>1.4</version>
<version>1.5.4</version>
<properties>
<exec.mainClass>Stitching</exec.mainClass>
</properties>
<dependencies>
<dependency>
<groupId>org.bytedeco.javacpp-presets</groupId>
<groupId>org.bytedeco</groupId>
<artifactId>opencv-platform</artifactId>
<version>3.4.0-1.4</version>
<version>4.4.0-1.5.4</version>
</dependency>
</dependencies>
</project>
13 changes: 7 additions & 6 deletions opencv-stitching/src/main/java/Stitching.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@
//
//M*/

import static org.bytedeco.javacpp.opencv_core.Mat;
import static org.bytedeco.javacpp.opencv_core.MatVector;
import static org.bytedeco.javacpp.opencv_imgcodecs.imread;
import static org.bytedeco.javacpp.opencv_imgcodecs.imwrite;
import static org.bytedeco.javacpp.opencv_stitching.Stitcher;
import org.bytedeco.opencv.opencv_core.Mat;
import org.bytedeco.opencv.opencv_core.MatVector;
import org.bytedeco.opencv.opencv_stitching.Stitcher;
import static org.bytedeco.opencv.global.opencv_imgcodecs.imread;
import static org.bytedeco.opencv.global.opencv_imgcodecs.imwrite;
import static org.bytedeco.opencv.global.opencv_stitching.createStitcher;

public class Stitching {
static boolean try_use_gpu = false;
Expand All @@ -58,7 +59,7 @@ public static void main(String[] args) {
}

Mat pano = new Mat();
Stitcher stitcher = Stitcher.createDefault(try_use_gpu);
Stitcher stitcher = createStitcher(try_use_gpu);
int status = stitcher.stitch(imgs, pano);

if (status != Stitcher.OK) {
Expand Down

0 comments on commit 95a656b

Please sign in to comment.