0
を介して作成することができない私は、次の変数を持つクラスました:、しかしOpenCVのJavaのMatOfFloat4オブジェクトはコンストラクタ
Imgproc.fitLine(tmpPoints, horizonLine, Imgproc.CV_DIST_L1, 0, 0.01, 0.01);
:
private MatOfFloat4 horizonLine = new MatOfFloat4();
次のように私は後で関数に渡します
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 org.opencv.core.MatOfFloat4.<init>(MatOfFloat4.java:12)
at obstacleDetector.HorizonDetector.<init>(HorizonDetector.java:327)
at obstacleDetector.HorizonDetector.getInstance(HorizonDetector.java:59)
at obstacleDetector.Detector.<clinit>(Detector.java:28)
私は変数の初期化を指示します。 OpenCVがこの変数を初期化できないのはなぜですか?なにが問題ですか?
P.S:それが重要ならば、私はこの変数を配置するクラスは、シングルトンクラスです:
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;
}
任意の考え?