Open amarlearning opened 6 years ago
It seems that the problem is in the linking between the Java method and the underlying C++ function.
Which IDE are you using? Do you properly set up the location of the native library for the OpenCV jar? e.g., http://opencv-java-tutorials.readthedocs.io/en/latest/01-installing-opencv-for-java.html#set-up-opencv-for-java-in-eclipse?
Did you used the pre-compiled version of OpenCV in Ubuntu?
@luigidr I downloaded the 3.4.1 source folder
of OpenCV from here and then installed it using CMake and Apache Ant.
Which IDE are you using?
I am using Eclipse Oxygen.2 Release (4.7.2).
Do you properly set up the location of the native library for the OpenCV jar?
Native library for the OpenCV jar path : /opencv-3.4.1/builds/lib
. I think its correct because this (http://opencv-java-tutorials.readthedocs.io/en/latest/02-first-java-application-with-opencv.html#create-a-simple-application) is running fine. I think the native library path for OpenCV jar is correct.
Thanks, @amarlearning. I just tried the program with the same OpenCV version and IDE on macOS and Windows and it works without any problem.
Are you using the OpenJDK? Does this program work: https://github.com/opencv-java/fourier-transform?
It doesn't use VideoCapture
but it's made with JavaFX: I would like to exclude any problem with your environment (JDK, JavaFX, ...) before trying this program in Ubuntu.
Are you using the OpenJDK?
I am using the Oracle version.
Does this program work: https://github.com/opencv-java/fourier-transform?
I will try to run this program and will respond back to you.
InvocationTargetException
is thrown in creating an instance ofVideoCapture
class.