Comments (13)
Short update:
I was able to solve my issue by using the lib from the libopencv4.2-jni
debian package.
I load the lib via System.loadLibrary("opencv_java420");
and added -Djava.library.path=/usr/lib/jni/
to my start parameters.
@vonnieda I'm not sure why you did not compile with video support but I think it would be enough to add a hint / note / warning to the readme that informs about this?
from opencv.
FFmpeg is already installed on my system and it does not work. I had to rebuild opencv to be able to use videos with it. I understand the license issue, but at this state, the linux version is almost useless without video support. Maybe you have to warn about it.
from opencv.
See comments in openpnp/openpnp#774. ffmpeg is not included for legal reasons, and because I haven't found a way to statically link it. You can install it manually and it should work.
from opencv.
👍 I also just discovered this today while trying to port an old OpenCV project to use this. This kills the usefulness of this library because the application revolves around VideoCapture
, and without FFMPEG support it can't open anything. I already have FFMPEG installed, of course
from opencv.
I think I also ran into the same problem.
The open
method always returns false for me.
VideoCapture capture = new VideoCapture();
capture.open(path);
I'm using this version on debian linux (x86_64)
<dependency>
<groupId>org.openpnp</groupId>
<artifactId>opencv</artifactId>
<version>4.3.0-2</version>
</dependency>
from opencv.
I am having the same issue on windows. Is it also not included there?
from opencv.
I have also not yet been able to find a way to get this to work. Tried -Djava.library.path and -Djna.library.path, but neither seems to work
from opencv.
@Jotschi Hi, thank you for sharing your answer, however, are you still using this Maven package in addition to libopencv4.2-jni
? Or did you have to remove the Maven package first and then add libopencv4.2-jni
?
from opencv.
@deanbrok I have not changed my setup and it works with /usr/lib/jni and debian package opencv4.2-jni (4.2.0+dfsg-6+b4).
from opencv.
@Jotschi Thanks for such a quick reply! So you are no longer using Openpnp's Maven package? And I'm planning to deploy the app on a Docker image, I imagine your solution would work fine there too?
from opencv.
@deanbrok I'm still using
<dependency>
<groupId>org.openpnp</groupId>
<artifactId>opencv</artifactId>
<version>4.3.0-2</version>
</dependency>
If you provide the same libopencv4.2-jni package in your container image it should work. I'm not aware of any other working solution.
from opencv.
@Jotschi Thank you for the help! I will try out your solution.
from opencv.
Closing as a duplicate of #74. Please assist with that issue.
from opencv.
Related Issues (20)
- Should the License be Changed to Apache v2 for OpenCV version 4.7?
- videoCapture.isOpened() always is false! HOT 4
- Opencv 4.8.1 and BarcodeDetection
- libwebp cve-2023-4863 HOT 1
- Memory Leak with some functions HOT 2
- Java 11 requirement HOT 1
- OpenCV.loadLocally() init error HOT 2
- Caused by: java.lang.UnsatisfiedLinkError: /tmp/opencv_openpnp5364447482759473585/nu/pattern/opencv/linux/x86_64/libopencv_java460.so: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /tmp/opencv_openpnp5364447482759473585/nu/pattern/opencv/linux/x86_64/libopencv_java460.so) HOT 2
- platform specific binaries/artifacts HOT 1
- Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java490 in java.library.path HOT 1
- Long delay when opening camera 0
- Open CV distributed with openpnp can't load image from a IP camera HOT 1
- Impossible to load library on Mac OS X HOT 1
- 4.7.0 Version HOT 1
- BarcodeDetector HOT 4
- Extra modules HOT 1
- Class CaptureDelegate is implemented in both HOT 2
- version 4.8.0
- Project runs on M2 Mac but fails on x86 Linux HOT 1
- Setting VideoCapture to certain square resolutions results in garbled output
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv.