【发布时间】:2016-05-07 13:28:02
【问题描述】:
我正在为adaptiveThreshold 使用 OpenCV。我使用 OpenCV 进行图像处理的代码是这样的:
imageMat=new Mat();
Utils.bitmapToMat(bmp, imageMat);
Imgproc.cvtColor(imageMat, imageMat, Imgproc.COLOR_BGR2GRAY);
Imgproc.GaussianBlur(imageMat, imageMat, new Size(3, 3), 0);
Imgproc.adaptiveThreshold(imageMat, imageMat, 255,Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY_INV, 5, 4);
但我在声明 Mat 时遇到错误:
No implementation found for long org.opencv.core.Mat.n_Mat() (tried Java_org_opencv_core_Mat_n_1Mat and Java_org_opencv_core_Mat_n_1Mat__)
at org.opencv.core.Mat.n_Mat(Native Method)
at org.opencv.core.Mat.<init>(Mat.java:24)
at com.example.pial_pc.instantbookreview.ImageCapture$3.onPictureTaken(ImageCapture.java:105)
由于我是 OpenCV 的新手,我并不清楚这个错误。这段代码所属的整个Java类是here。
我应该怎么做才能消除错误?
【问题讨论】: