So, the first post.
It is about installation of OpenCV 3.1.0 on the Mac OS X, El Captain.
I just repeat the same process when I install the 3.0.0:
1 | brew install opencv3 --with-java --with-qt5 |
Then I found the jar file in the
1 | /usr/local/Cellar/opencv3/3.1.0_1/share/opencv/java/ |
Then I created the new User libraries
in the Eclipse,
*Add the jar
file.
*Select the same folder as the native library path
.
Then I create a new project, test the code,
1 | System.loadLibrary(Core.NATIVE_LIBRARY_NAME); |
Bang, the error pops up.
1 | Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java310 in java.library.path |
Now below shows how I fix it, thanks to the Janpanse guy,
basically, two steps,
1.
1 | brew reinstall opencv3 --with-java,--with-qt5,--with-contrib |
1
cp /usr/local/Cellar/opencv3/3.1.0_1/share/opencv/java/libopencv_310.so /usr/local/Cellar/opencv3/3.1.0_1/share/opencv/java/libopencv_310.dylib
And then the System.loadLibrary(Core.NATIVE_LIBRARY_NAME)
works good in Eclipse
I am not sure which step saved my day, the --with-contrib
or libopencv_310.dylib
.
But I guess that it might be something wrong with the Homebrew
, I have report a problem on their forum, but didn’t see updates yet.