Hello !
There was a question regarding the OpenCV . I connected it according to this instruction. He sees classes from the library without problems, but in this section of the code:
public static Mat cargar(String image, boolean gr, boolean bw, int thr) throws IOException { Mat imagen = Imgcodecs.imread("/Users/***/Desktop/"+image); if (gr) Imgproc.cvtColor(imagen, imagen, Imgproc.COLOR_BGR2GRAY); if (bw) Imgproc.threshold(imagen, imagen, thr, 255, Imgproc.THRESH_BINARY); return imagen; } swears:
Exceptions .Imgcodecs.imread (Imgcodecs.java:102) at Functiones.cargar (Functiones.java:24) at Main.main (Main.java:14)
I met this error for the first time, read it on various resources, many decided it was because they added
System.loadLibrary(Core.NATIVE_LIBRARY_NAME); and it all worked. I don't have one.
I understand that he just does not see this library? But if I hadn’t seen it, it would have shown that such a library simply simply does not exist, I have only Exception at compile time.
After adding the line System.loadLibrary(Core.NATIVE_LIBRARY_NAME); , then another exception:
Exception in thread "java.lang.UnsatisfiedLinkError: no opencv_java310 in java.library.path at java.lang.ClassLoader.loadLibrary (ClassLoader.java:1864) at java.lang.Runtime.loadLibrary0 (Runtime.java:870) at java.lang.System.loadLibrary (System.java:1122) at Functiones.cargar (Functiones.java:24) at Main.main (Main.java:14)
I did not connect something correctly? But he did everything according to the instructions (above link).
OC: Mac OS El Capitan (10.11.4 (15E65)) Development Environment: Eclipse Mars.2 Release (4.5.2)
Thank !
OpenCVlibopencv_calib3d.3.1.0.dylibfileOpenCVlibopencv_calib3d.3.1.0.dylibnot in the specified path.Calib3dis a separate module in OpenCV. In theory, it should not be loaded by your program, since it is not used at all in the example code. However, the java may have its own characteristics, but unfortunately I am not an expert. - alexis031182-D BUILD_opencv_calib3d=OFFflag to thecmakecommand. If you still swear on which module, then just as his expense. It is clear that this is not a fountain, but at least it will be possible to get a working basis, then to have the opportunity to deal with each module separately and as needed. - alexis031182