I am currently trying to code a small program to take pictures of new students and save them by name, etc., in order to facilitate inscriptions, etc.
So, here is my problem, I found a great tutorial that will help me use the webcam: http://www.codeproject.com/Tips/717283/How-to-use-OpenCV-with-Java-under-NetBeans-IDE
I can run this project without errors, but when I try to import the code for mine, I got this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat()J at org.opencv.core.Mat.n_Mat(Native Method) at org.opencv.core.Mat.<init>(Mat.java:24) at recupphoto.Ihm.<init>(Ihm.java:38) at recupphoto.RecupPhoto.main(RecupPhoto.java:19) Java Result: 1
An error occurs when I execute these lines:
Mat frame = new Mat(); MatOfByte mem = new MatOfByte();
Here is my import, if it can help figure out:
import java.util.ArrayList; import java.awt.Graphics; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import javax.imageio.ImageIO; import javax.swing.JOptionPane; import javax.swing.UIManager; import org.opencv.core.Mat; import org.opencv.core.MatOfByte; import org.opencv.imgcodecs.Imgcodecs; import org.opencv.videoio.VideoCapture;
At compile time, I received this message, dunno if related or so
Note. Some input files use unverified or unsafe operations. Note. Recompiling with -Xlint: unchecked for details.
Both errors appear (I think) when Mat () is called, but I cannot find how to fix this.
I really have to use some tips or tips here! Thanks for reading this and sorry for my poor english!