Git Product home page Git Product logo

Comments (13)

Jotschi avatar Jotschi commented on June 26, 2024 2

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.

kasius75 avatar kasius75 commented on June 26, 2024 1

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.

vonnieda avatar vonnieda commented on June 26, 2024

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.

wfaithfull avatar wfaithfull commented on June 26, 2024

👍 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.

Jotschi avatar Jotschi commented on June 26, 2024

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.

enwi avatar enwi commented on June 26, 2024

I am having the same issue on windows. Is it also not included there?

from opencv.

peterkronenberg avatar peterkronenberg commented on June 26, 2024

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.

deanbrok avatar deanbrok commented on June 26, 2024

@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.

Jotschi avatar Jotschi commented on June 26, 2024

@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.

deanbrok avatar deanbrok commented on June 26, 2024

@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.

Jotschi avatar Jotschi commented on June 26, 2024

@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.

deanbrok avatar deanbrok commented on June 26, 2024

@Jotschi Thank you for the help! I will try out your solution.

from opencv.

vonnieda avatar vonnieda commented on June 26, 2024

Closing as a duplicate of #74. Please assist with that issue.

from opencv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.