No implementation found for void org.opencv.core.Core.rotate_0

て烟熏妆下的殇ゞ 提交于 2019-12-11 14:28:17

问题


I build the OpenCVLib taught by here and done necessarily stuff in the OpenCVLib to call this in mavenLocal.

Then I publish it as mavenLocal but I didn't take the libs to put into my app folder as I already have mavenLocal.

I have tried converting bitmap to mat without a problem.

But I can't rotate the Mat.

public Bitmap rotateMat(Bitmap bitmap, int i){
        Mat mat = helper.bitmapToMat(bitmap);
        switch (i) {
            case 1:
                Core.rotate(mat, mat, 0);
                break;
            case 2:
                Core.rotate(mat, mat, 2);
                break;
            case 3:
                Core.rotate(mat, mat, 1);
                break;
            default:
                System.out.println("================= No Rotation");
        }
        return helper.matToBitmap(mat);
    }
E/zygote64: No implementation found for void org.opencv.core.Core.rotate_0(long, long, int) (tried Java_org_opencv_core_Core_rotate_10 and Java_org_opencv_core_Core_rotate_10__JJI)

This is cause by Core.rotate(mat, mat, 0);


回答1:


Solution

  1. Add the libs to OpenCV library and rename it to jniLibs
  2. Lastly, publish it as MavenLocal


来源:https://stackoverflow.com/questions/56864764/no-implementation-found-for-void-org-opencv-core-core-rotate-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!