Giter Site home page Giter Site logo

Comments (6)

LauLauThom avatar LauLauThom commented on July 19, 2024

Hi there,
thanks for reporting the issue,

The problematic import statement is the following one :

from org.bytedeco.javacpp.opencv_core import Mat, Scalar, Point, minMaxLoc, subtract # UNUSED normalize, NORM_MINMAX, CV_8UC1, CV_32FC1

To reproduce the issue, I believe activating IJ-OpenCV and running this line in the script editor, selecting python as language should trigger a similar error.

I dont have a solution, but I think it might be due to the operating system.
The import statement above, loads the opencv functions from platform-specific jars.
All of them are shipped with the update site, and by some magic, the correct package is imported.
It seems it's not the case for your OS.

Can you first check that you have all these jars in the subfolder jars of your Fiji installation ?
image

If yes, maybe try moving all these packages out of the jars directory, except for the macosx one.

from multitemplatematching-fiji.

amichaut avatar amichaut commented on July 19, 2024

Hi,
Thanks for the reply!
Running the import line in a script editor reproduces the error indeed.
I moved out the linux and windows jars but running the import line in a script editor still raises the following error:
Caused by: java.lang.UnsatisfiedLinkError: /Users/amichaut/.javacpp/cache/opencv-3.4.2-1.4.2-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/libjniopencv_core.dylib: dlopen(/Users/amichaut/.javacpp/cache/opencv-3.4.2-1.4.2-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/libjniopencv_core.dylib, 0x0001): Library not loaded: '@rpath/libopencv_imgproc.3.4.dylib' Referenced from: '/Users/amichaut/.javacpp/cache/opencv-3.4.2-1.4.2-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/libjniopencv_core.dylib' Reason: tried: '/Applications/Fiji.app/lib/macosx/libopencv_imgproc.3.4.dylib' (no such file), '/Applications/Fiji.app/mm/macosx/libopencv_imgproc.3.4.dylib' (no such file), '/Users/amichaut/.javacpp/cache/opencv-3.4.2-1.4.2-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/./libopencv_imgproc.3.4.dylib' (no such file), '/Users/travis/build/bytedeco/javacpp-presets/opencv/cppbuild/macosx-x86_64/lib/libopencv_imgproc.3.4.dylib' (no such file), '/Users/amichaut/.javacpp/cache/opencv-3.4.2-1.4.2-macosx-x86_64.jar/org/bytedeco/javacpp/maco

from multitemplatematching-fiji.

LauLauThom avatar LauLauThom commented on July 19, 2024

Interesting, I had never noticed some files were being cached in the user directory ^^ !
It seems in your case it cant find the file related to opencv_imgproc

This is what I have in my user directory .javacpp/cache...
image

Do you have something like that in your directory ? if yes do you have a file with imgproc in the name ?

from multitemplatematching-fiji.

amichaut avatar amichaut commented on July 19, 2024

Yes I have. but it is a .dylib file (and actually it's a symbolic link pointing to another directory in the cache). Here's the content of the directory

-rw-r--r--  1 amichaut  staff   3,9M 16 jul  2018 libjniopencv_core.dylib
lrwxr-xr-x  1 amichaut  staff   115B 28 fév 19:14 libopencv_core.4.0.dylib@ -> /Users/amichaut/.javacpp/cache/opencv-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/libopencv_core.4.0.dylib
lrwxr-xr-x  1 amichaut  staff   118B 28 fév 19:14 libopencv_imgproc.4.0.dylib@ -> /Users/amichaut/.javacpp/cache/opencv-macosx-x86_64.jar/org/bytedeco/javacpp/macosx-x86_64/libopencv_imgproc.4.0.dylib

from multitemplatematching-fiji.

LauLauThom avatar LauLauThom commented on July 19, 2024

hmm not sure what is going wrong there, maybe some permission issue on the directory ?
Is there a way to run Fiji in admin ? Maybe delete the content of this cache directory.

Eventually you can try the next version of these dependencies, maybe it was fixed by then.
Try version 3.4.3-1.4.3 for instance.

It's a bit tedious you have to download the packages manually from the link below, clicking the market artefact then download button on the right(see screencapture).
And move the previous jar out of the Fiji.app/jars directory.
image

So opencv
https://oss.sonatype.org/#nexus-search;gav~org.bytedeco.javacpp-presets~opencv~~~~kw,versionexpand

Same for JavaCV (take the matching version, so here it would be 1.4.3)
https://oss.sonatype.org/#nexus-search;quick~javacv
image

and javacpp
https://oss.sonatype.org/#nexus-search;gav~org.bytedeco~javacpp~~~
image

Otherwise it can be worse searching through (the numerous) issues of javacpp
https://github.com/bytedeco/javacpp/issues?q=is%3Aissue+mac+

from multitemplatematching-fiji.

amichaut avatar amichaut commented on July 19, 2024

ok, thanks a lot for your help. I have just tried removing the cache directory for now but it didn't change anything

from multitemplatematching-fiji.

Related Issues (9)

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.