Comments (9)
This will happen if you forgot to copy one of the JAR files, as explained in
the README.txt file, required by your platform (javacpp.jar,
javacv-linux-x86_64.jar, javacv-linux-x86.jar, javacv-macosx-x86_64.jar,
javacv-windows-x86_64.jar, and javacv-windows-x86.jar). Please copy all of the
JAR files, and let me know that it works, thank you.
Original comment by [email protected]
on 10 Nov 2011 at 4:16
from javacv.
I'm sorry to inform you that it has been done in step 2 using cp *.jar
/use/share/java/ as told in the readme. Is there any thing else that souls be
done?
Best regards.
Original comment by [email protected]
on 10 Nov 2011 at 6:57
from javacv.
Right, ok, MATLAB comes with its own bunch of system libraries in the `bin`
directory, which can (almost always actually) conflict with the Linux system
libraries you compiled OpenCV and what not against. Usually we get some sort of
error when using things like javaaddpath() and import, but if that is not the
case, you will need to figure out which libraries are in conflict, and pick the
most recent one you have (either your Linux system ones, or MATLAB's ones) and
make sure both MATLAB and OpenCV load the same version... good luck. :)
If you figure it out, please let us know which libraries caused you problems.
Others might find the information helpful! thank you.
Original comment by [email protected]
on 10 Nov 2011 at 7:19
from javacv.
Or maybe using the `mex` script file as compiler instead of GCC when
configuring OpenCV with cmake could make it work ...
http://www.vtk.org/Wiki/CMake:MatlabMex
Also, the more stuff you disable in OpenCV, the less it will depend on other
libraries, so you could try to build a very slim version of OpenCV with
everything disabled, and see what that gives...
Original comment by [email protected]
on 10 Nov 2011 at 7:30
from javacv.
One more thing, to see the error, it may help to load the modules manually. We
would get e.g.:
>> javaaddpath('/tmp/crap/javacv-bin/javacv.jar')
>> classLoader = com.googlecode.javacpp.Loader().getClass().getClassLoader();
>> class = classLoader.loadClass('com.googlecode.javacv.cpp.opencv_core');
>> com.googlecode.javacpp.Loader.load(class)
??? Java exception occurred:
java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.googlecode.javacpp.Loader.load(Loader.java:343)
at com.googlecode.javacpp.Loader.load(Loader.java:271)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:126)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.googlecode.javacpp.Loader.load(Loader.java:291)
if the `libjniopencv_core.so` file is missing, but MATLAB would display errors
concerning other missing files or functions that way too... Let me know what
you get, for the other modules like `opencv_imgproc` and `opencv_highgui` as
well, thanks.
Original comment by [email protected]
on 11 Nov 2011 at 4:08
from javacv.
I tried what you proposed and I get an error that you may help me to understand.
Here is the code I used:
javaaddpath('/usr/share/java/javacv.jar')
classLoader = com.googlecode.javacpp.Loader().getClass().getClassLoader();
class = classLoader.loadClass('com.googlecode.javacv.cpp.opencv_core');
com.googlecode.javacpp.Loader.load(class)
And here is the error Matlab returns me:
Static method or constructor invocations cannot be indexed.
Do not follow the call to the static method or constructor with
any additional indexing or dot references.
Error in test (line 3)
classLoader = com.googlecode.javacpp.Loader().getClass().getClassLoader();
Do you have any clue? The "Static method..." is strange for me what may be the
cause of this warning?
Original comment by [email protected]
on 14 Nov 2011 at 2:12
from javacv.
I solved my problem by installing the repository version of opencv and then
rebuilding all the new opencv (2.3.1) over it.
As i needed libavcodec libavformat etc. I rebuild all ffmpeg (with x264,
libtheora, ...) enabling both shared and static libraries maybe this helped but
I won't be able to tell.
The problem is solved for me but maybe we can keep a trace in any case someone
also get a similar problem.
regards,
Olivier.
Original comment by [email protected]
on 14 Nov 2011 at 6:24
from javacv.
Do you mean that the official OpenCV 2.3.1 sources do not work, but the sources
from the trunk here https://code.ros.org/svn/opencv/trunk/ do work?
Original comment by [email protected]
on 15 Nov 2011 at 10:36
from javacv.
Well, I guess this issue has been resolved, but the problem with MATLAB is that
it comes with its own duplicate set of libraries, so we may have to recompile
OpenCV and JavaCV using those libraries, if we cannot make MATLAB use the
system libraries... I added a comment about that on the Wiki page:
http://code.google.com/p/javacv/wiki/UsingJavaCVInMATLAB
Thanks for reporting this issue!
Original comment by [email protected]
on 12 May 2012 at 12:32
- Changed state: Done
- Added labels: Type-Other
- Removed labels: Type-Defect
from javacv.
Related Issues (20)
- FacePreview: ClassNotFoundException - java.awt.image.BufferedImage HOT 4
- parameters for cvmat method? HOT 5
- ObjectFinder in Adroid HOT 7
- Memory Leak in cvLoadImage or JavaCV (Big Issue, New problem) HOT 17
- FacePreview using new OpenCV API HOT 3
- SURF Detect "bad allocation" Error HOT 10
- How to install? UnsatisfiedLinkError jniopencv_core36577.dll HOT 7
- Demo: java.lang.UnsatisfiedLinkError - Reason: image not found HOT 13
- cvFindContours different results HOT 2
- cannot run javacv example, ClassNotFoundException (Mac OS X) HOT 13
- ChamferMatching HOT 3
- Flann radiusSearch, knnSearch HOT 3
- javacv throws java.lang.UnsatisfiedLinkError HOT 3
- Invalid Memory Access using FloatPointer and PointVectorVector (chamerMatching()) HOT 1
- Getting Linker Error HOT 2
- Issue with javacv implementation of HOG descriptor HOT 10
- Running the sample facepreview of JavaCV on Android with eclipse + Windows xp HOT 7
- Insufficient memory HOT 2
- cvGoodFeaturesToTrack issue HOT 3
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 javacv.