Giter Club home page Giter Club logo

Comments (10)

b005t3r avatar b005t3r commented on July 3, 2024 1

The README.md says to use opencv-platform. If you're not using that, then don't expect things to work. What more do you need to know?

What you mean is that instead of doing this:

                <dependency>
                    <groupId>org.bytedeco</groupId>
                    <artifactId>opencv</artifactId>
                    <version>4.9.0-1.5.10</version>
                    <scope>compile</scope>
                    <classifier>windows-x86_64</classifier>
                </dependency>

I'm supposed to do this?

                <dependency>
                    <groupId>org.bytedeco</groupId>
                    <artifactId>opencv-platform</artifactId>
                    <version>4.9.0-1.5.10</version>
                    <scope>compile</scope>
                    <classifier>windows-x86_64</classifier>
                </dependency>

from javacpp-presets.

saudet avatar saudet commented on July 3, 2024

Please try again with 1.5.10

from javacpp-presets.

b005t3r avatar b005t3r commented on July 3, 2024

Please try again with 1.5.10

Just tried it with 1.5.10, the issue is still there.

As I said, it's not consistent and happens only on some Windows 11 machines, no idea why.

What can I do to investigate it further?

from javacpp-presets.

saudet avatar saudet commented on July 3, 2024

Please set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more information on the console.

from javacpp-presets.

b005t3r avatar b005t3r commented on July 3, 2024

OK, here are the results, I think the issue is pretty clear (missing OpenCV dependencies):

Debug: Failed to load for opencv_cudev490: java.lang.UnsatisfiedLinkError: no opencv_cudev490 in java.library.path: [C:\Program Files\Test App\data\jdk-13.0.2\bin, C:\windows\Sun\Java\bin, C:\windows\system32, C:\windows, C:\windows\system32, C:\windows, C:\windows\System32\Wbem, C:\windows\System32\WindowsPowerShell\v1.0\, C:\windows\System32\OpenSSH\, C:\Users\testuser\AppData\Local\Microsoft\WindowsApps, ., .]
Debug: Loading C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\opencv_core490.dll
Debug: Failed to load C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\opencv_core490.dll: java.lang.UnsatisfiedLinkError: C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\opencv_core490.dll: Can't find dependent libraries
Debug: Loading library opencv_core490
Debug: Failed to load for opencv_core490: java.lang.UnsatisfiedLinkError: no opencv_core490 in java.library.path: [C:\Program Files\Test App\data\jdk-13.0.2\bin, C:\windows\Sun\Java\bin, C:\windows\system32, C:\windows, C:\windows\system32, C:\windows, C:\windows\System32\Wbem, C:\windows\System32\WindowsPowerShell\v1.0\, C:\windows\System32\OpenSSH\, C:\Users\testuser\AppData\Local\Microsoft\WindowsApps, ., .]
Debug: Loading C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\opencv_imgproc490.dll
Debug: Failed to load C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\opencv_imgproc490.dll: java.lang.UnsatisfiedLinkError: C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\opencv_imgproc490.dll: Can't find dependent libraries
Debug: Loading library opencv_imgproc490
Debug: Failed to load for opencv_imgproc490: java.lang.UnsatisfiedLinkError: no opencv_imgproc490 in java.library.path: [C:\Program Files\Test App\data\jdk-13.0.2\bin, C:\windows\Sun\Java\bin, C:\windows\system32, C:\windows, C:\windows\system32, C:\windows, C:\windows\System32\Wbem, C:\windows\System32\WindowsPowerShell\v1.0\, C:\windows\System32\OpenSSH\, C:\Users\testuser\AppData\Local\Microsoft\WindowsApps, ., .]
Debug: Loading C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\jniopencv_core.dll
Debug: Failed to load C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\jniopencv_core.dll: java.lang.UnsatisfiedLinkError: C:\Users\testuser\.javacpp\cache\testapp.jar\org\bytedeco\opencv\windows-x86_64\jniopencv_core.dll: Can't find dependent libraries
Debug: Loading library jniopencv_core
Debug: Failed to load for jniopencv_core: java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path: [C:\Program Files\Test App\data\jdk-13.0.2\bin, C:\windows\Sun\Java\bin, C:\windows\system32, C:\windows, C:\windows\system32, C:\windows, C:\windows\System32\Wbem, C:\windows\System32\WindowsPowerShell\v1.0\, C:\windows\System32\OpenSSH\, C:\Users\testuser\AppData\Local\Microsoft\WindowsApps, ., .]

I checked the opencv_core.dll file in DependenciesGui and got this:
image

For opencv_imgproc.dll those are missing:
image

No idea why was it linked against those VS libs?

from javacpp-presets.

saudet avatar saudet commented on July 3, 2024

from javacpp-presets.

b005t3r avatar b005t3r commented on July 3, 2024

It looks like the issue is easily fixable (I mean not fixable, but it's relatively easy workaround) by installing this:
https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version

from javacpp-presets.

b005t3r avatar b005t3r commented on July 3, 2024

Those are available with javacpp-platform

I don't understand. Is there another dependency I need to list in my pom.xml? I would really appreciate if you replied with a more elaborate explanation from time to time :)

from javacpp-presets.

saudet avatar saudet commented on July 3, 2024

from javacpp-presets.

saudet avatar saudet commented on July 3, 2024

I assumed that fixed it, but please let me know if that still doesn't work

from javacpp-presets.

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.