I started learning OpenCV using the JAVA language. I tried to run a very simple code, borrowed from http://docs.opencv.org/2.4.4-beta/doc/tutorials/introduction/desktop_java/java_dev_intro.html
and using eclipse (JUNO). When I run the following codes
import org.opencv.core.Core; import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Point; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.highgui.Highgui; import org.opencv.objdetect.CascadeClassifier;
I get
Hello, OpenCV Running DetectFaceDemo Exception in thread "main" java.lang.NullPointerException at DetectFaceDemo.run(HelloOpenCV.java:20) at HelloOpenCV.main(HelloOpenCV.java:48)
where **
20 CascadeClassifier faceDetector = new CascadeClassifier(getClass().getResource("lbpcascade_frontalface.xml").getPath()); 48 new DetectFaceDemo().run();
**
I am new to this area and do not know how to get to this error. I need your help.
Hamid source share