i am currently trying to code a little program to take picture of newly students and save them by their names etc to ease the inscriptions things etc.
So here is my problem, i found a great tutorial to help me using a webcam: http://www.codeproject.com/Tips/717283/How-to-use-OpenCV-with-Java-under-NetBeans-IDE
I can run this project with no error but when i try to import some code to 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
The error occurs when i execute theses lines:
Mat frame = new Mat(); MatOfByte mem = new MatOfByte();
Here are my imports in case it could help to find 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;
While compilation i got this message, dunno if related or so
Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
Both error appears (i guess) when Mat() is called but i cannot find how to fix this.
I should really use some helps or tips here! Thanks for reading this and sorry for my bad english!