找不到长的org.opencv.core.Mat.n_Mat(int,int,int)的实现

时间:2016-09-18 11:31:32

标签: java android opencv

我正在尝试获取图像的宽度和高度,ImageView变量是 iv 。但似乎我总是低于错误。

java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.core.Mat.n_Mat(int, int, int) (tried Java_org_opencv_core_Mat_n_1Mat and Java_org_opencv_core_Mat_n_1Mat__III)
at org.opencv.core.Mat.n_Mat(Native Method)
at org.opencv.core.Mat.<init>(Mat.java:37)
at com.example.backup.contour_image.MainActivity.onTouch(MainActivity.java:56)

我的代码

public boolean onTouch(View v, MotionEvent event)
{
    Bitmap bm =((BitmapDrawable)iv.getDrawable()).getBitmap();

    int w = iv.getWidth();
    int h = iv.getHeight();

    mRgba = new Mat(w,h,CvType.CV_8UC4); <---- the error of line being described

    int cols = mRgba.cols();
    int rows = mRgba.rows();

    int x = (int)event.getX();
    int y = (int)event.getY();
}

0 个答案:

没有答案