0

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);

Chung Yau
  • 97
  • 1
  • 9

1 Answers1

0

Solution

  1. Add the libs to OpenCV library and rename it to jniLibs
  2. Lastly, publish it as MavenLocal
Community
  • 1
  • 1
Chung Yau
  • 97
  • 1
  • 9