Answer the question
In order to leave comments, you need to log in
How to set up JavaCV and OpenCV?
Good afternoon Comrades!
It was necessary to solve the problem of object recognition, I decided to work with OpenCV, I learned about the existence of JavaCV. Decided to work with her.
Found instructions for installing opencvlover.blogspot.in/2012/04/javacv-setup-with-...
I downloaded JavaCV from here and compiled it. Set up. But I can't download the image.
import static org.bytedeco.javacpp.opencv_core.*;
import static org.bytedeco.javacpp.opencv_imgproc.*;
import static org.bytedeco.javacpp.opencv_imgcodecs.*;
import static org.bytedeco.javacpp.opencv_highgui.*;
public class launch {
public static void main(String[] args) {
String filename ="C:\\cap\\cap1.png";
IplImage image =cvLoadImage(filename);
if (image != null) {
cvShowImage(filename, image);
cvWaitKey();
}
}
}
Exception in thread "main" 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 org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:550)
at org.bytedeco.javacpp.Loader.load(Loader.java:415)
at org.bytedeco.javacpp.Loader.load(Loader.java:358)
at org.bytedeco.javacpp.opencv_core.<clinit>(opencv_core.java:10)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.bytedeco.javacpp.Loader.load(Loader.java:390)
at org.bytedeco.javacpp.Loader.load(Loader.java:358)
at org.bytedeco.javacpp.opencv_imgcodecs.<clinit>(opencv_imgcodecs.java:13)
at com.mftech.eye.launch.main(launch.java:78)
Caused by: java.lang.UnsatisfiedLinkError: no opencv_imgproc300 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 org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:550)
at org.bytedeco.javacpp.Loader.load(Loader.java:406)
... 8 more
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question