Error running Android application with OpenCV

0

I'm trying to open my application on my Smartphone (Motorola G4 Play), but I'm not successful. The following error is shown to me:

E/art: No implementation found for void org.opencv.imgproc.Imgproc.Canny_3(long, long, double, double) (tried Java_org_opencv_imgproc_Imgproc_Canny_13 and Java_org_opencv_imgproc_Imgproc_Canny_13__JJDD)
E/AndroidRuntime: FATAL EXCEPTION: Thread-5294
                  Process: com.tcc.diabetesmonitor, PID: 10148
                  java.lang.UnsatisfiedLinkError: No implementation found for void org.opencv.imgproc.Imgproc.Canny_3(long, long, double, double) (tried Java_org_opencv_imgproc_Imgproc_Canny_13 and Java_org_opencv_imgproc_Imgproc_Canny_13__JJDD)
                      at org.opencv.imgproc.Imgproc.Canny_3(Native Method)
                      at org.opencv.imgproc.Imgproc.Canny(Imgproc.java:1038)
                      at com.tcc.diabetesmonitor.MainActivity.onCameraFrame(MainActivity.java:127)
                      at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392)
                      at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:352)
                      at java.lang.Thread.run(Thread.java:818)

I put the following permissions on the AndroidManifest file:

<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.camera.front" android:required="false"/>
<uses-feature android:name="android.hardware.camera.front.autofocus" android:required="false"/>

I have seen in some forums that we need to instantiate a Mat object. I did so:

private BaseLoaderCallback mCallBack = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        switch (status){
            case BaseLoaderCallback.SUCCESS:
            {
                Log.i(TAG, "OpenCV loaded successfully");
                imageMat = new Mat();
                mOpenCvCameraView.enableView();
                break;
            }
            default:
            {
                super.onManagerConnected(status);
                break;
            }
        }
    }
};

What should I do?

    
asked by anonymous 11.04.2017 / 20:12

0 answers