How to use opencv in Java Web application ? [closed]
Hello,
I am trying to use opencv in one of my java web application but i am facing issue related to .so file the native library. i have set java.library.path to path to directory which contains all the required lib for opencv. I am using the sift detection feature of opencv, but when i am running my tomcat which is outside of eclipse means the standalone tomcat on server i get the following error
HTTP Status 500 - Handler processing failed; nested exception is java.lang.UnsatisfiedLinkError: org.opencv.highgui.Highgui.imread_0(Ljava/lang/String;I)J
on the line that Highgui.imread(bookObject, Highgui.CV_LOAD_IMAGE_COLOR);
it did not find the opencv_java2411.so (the jar file only contains wrappers for the native c++ code in the .so)
or maybe you forgot the System.loadLibrary() call, or put it into the wrong class ? (the so has to get loaded, before any other opencv related things can happen)
hello berak, i have added the call to System.loadLibrary(Core.NATIVE_LIBRARY_NAME); and put it in same class that uses the opencv functions. Can to tell i am wrong we need to place this so file in web-inf lib folder ? i have the same few other things as using java.library.path to so file but still nothing works. i even provided the absolute path using System.load(path); but the same error.
ok, seems all right, so far (we can rule out the usual suspects)
unfortunately, can't help with tomcat (never used it)
ok thanks berak for your time and looking into it :-)