Ask Your Question

bijop's profile - activity

2018-04-06 08:44:37 -0600 received badge  Student (source)
2016-02-03 23:05:30 -0600 asked a question How to use openCV lib in an Eclipse RCP App.

Hello,

I want to use opencv library with its native library in my RCP App. Everything is fine if I add the jar lib in plugin class path using Build Path -> Configure Build Path... etc. and specifying the native library for this jar lib.

Another possibility (the one that I would like to use) is to create a plugin from this jar lib using "create new plugin from external jar archive" and to add Bundle-NativeCode directive to Manifest.MF. Something like that :

Bundle-NativeCode: nativeLibs/libopencv_java300.dylib; osname=MacOSX; processor=x86-64

Then, in the RCP App., I first remove everything from class path and, without changing anything in source code, add this new plugin in plugin dependencies of the RCP App.

Now, when I run the App., opencv library seems to be correctly loaded (using System.LoadLibrary()) but I have this error message when I try to use its functionnalities :

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_eye(III)J

I've been looking on internet to find an answer but without success. I have probably missed something but what ?

I hope someone has already done that before. Please could you help me ?

Thanks a lot, frank

PS : Everything is done using eclipse-RCP-4.4.2, mac OS X.9.5 and OpenCV 3.0 (OpenCV lib has been compiled on the machine)

2014-07-03 06:31:55 -0600 asked a question Java library errors - real time processing

Hello,

I would like to use OpenCV framework with java library under Eclipse, but I am facing multiple errors like this one :

java.lang.Exception: unknown exception at org.opencv.core.Mat.n_copyTo(Native Method) at org.opencv.core.Mat.copyTo(Mat.java:1046) at fr.univamu.ism.tirex.vision.backend.ProcessStep.compute(ProcessStep.java:59) at fr.univamu.ism.tirex.vision.backend.VideoProcessor.compute(VideoProcessor.java:58) at fr.univamu.ism.tirex.vision.backend.VideoProcessor.update(VideoProcessor.java:48) at fr.univamu.ism.tirex.vision.backend.VideoReader.run(VideoReader.java:127)

or this one :

OpenCV Error: Assertion failed (m.dims >= 2) in cv::Mat::Mat, file ........\opencv\modules\core\src\matrix.cpp, line 269 CvException [org.opencv.core.CvException: cv::Exception: ........\opencv\modules\core\src\matrix.cpp:269: error: (-215) m.dims >= 2 in function cv::Mat::Mat ] at org.opencv.imgproc.Imgproc.morphologyEx_2(Native Method) at org.opencv.imgproc.Imgproc.morphologyEx(Imgproc.java:8100) at fr.univamu.ism.tirex.vision.backend.library.ErrodeDilate.doComputation(ErrodeDilate.java:72) at fr.univamu.ism.tirex.vision.backend.ProcessStep.compute(ProcessStep.java:58) at fr.univamu.ism.tirex.vision.backend.VideoProcessor.compute(VideoProcessor.java:58) at fr.univamu.ism.tirex.vision.backend.VideoProcessor.update(VideoProcessor.java:48) at fr.univamu.ism.tirex.vision.backend.VideoReader.run(VideoReader.java:127)

I'm using a main thread that is responsible to get images from camera and to process these images. There is another thread for the GUI to see image processing and to modify this processing in real time.

These errors are very, very random and annoying.

Have you ever seen this kind of problems before ?

Any help would be very appreciable.

thanks