Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Opencv Java MatOfFloat4 object cannot be created via constructor

$
0
0
I've a class which has the following variable: private MatOfFloat4 horizonLine = new MatOfFloat4(); which I later on pass into a function as follows: Imgproc.fitLine(tmpPoints, horizonLine, Imgproc.CV_DIST_L1, 0, 0.01, 0.01); However, I get an error saying that: 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.(Mat.java:24) at org.opencv.core.MatOfFloat4.(MatOfFloat4.java:12) at obstacleDetector.HorizonDetector.(HorizonDetector.java:327) at obstacleDetector.HorizonDetector.getInstance(HorizonDetector.java:59) at obstacleDetector.Detector.(Detector.java:28) which directs me to the initialization of the variable. Why can't OpenCV intialize this variable? What is wrong? **P.S:** If it matters, the class which I place this variable, is a Singleton class: public static HorizonDetector getInstance() { if (_instance == null) { _instance = new HorizonDetector(); } else { System.out.println("Same instance of the Horizon Detector-Singleton class already exists."); } return _instance; } Any thoughts?

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>