openpnp / opencv

OpenCV Java bindings packaged with native libraries, seamlessly delivered as a turn-key Maven dependency.
Other
327 stars 93 forks source link

Failing with loadShared as well as loadLocally on Raspberry pi 4 with Raspberry OS 32 Bit #73

Closed JimeFuture closed 3 years ago

JimeFuture commented 3 years ago

Hello,

i'm pretty much new in the OpenCV world. I tried this packgae to avoid all the manual installation and manual building for each target. For Windows targets it's working fine. But when i try to run it on my Raspberry pi 4 running Raspberry OS 32 bit loadLocally() and loadShared() are both failing. I there somthing i must do in addition to be able to run it on the Raspberry? I#ve not installed any additional stuff except jdk 11. Same error with both functions:

Exception in thread "main" java.lang.ExceptionInInitializerError at nu.pattern.OpenCV$SharedLoader.getInstance(OpenCV.java:232) at nu.pattern.OpenCV.loadShared(OpenCV.java:181) at ServerKt.main(server.kt:58) at ServerKt.main(server.kt) Caused by: java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:221) at java.base/java.nio.file.Files.copy(Files.java:3034) at nu.pattern.OpenCV.extractNativeBinary(OpenCV.java:382) at nu.pattern.OpenCV.extractNativeBinary(OpenCV.java:317) at nu.pattern.OpenCV.access$100(OpenCV.java:22) at nu.pattern.OpenCV$SharedLoader.<init>(OpenCV.java:204) at nu.pattern.OpenCV$SharedLoader.<init>(OpenCV.java:187) at nu.pattern.OpenCV$SharedLoader$Holder.<clinit>(OpenCV.java:228)

Thx for instructions

vonnieda commented 3 years ago

@JimeFuture Are you using 4.5.1-2? 32 bit ARM support was just added in the most recent version and has been confirmed working through CI tests and user tests.

JimeFuture commented 3 years ago

@vonnieda Thx for your answer. It actually worked with the newest Version. I just had the "old" 4.5.1-0

vonnieda commented 3 years ago

Glad to hear it!