Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

Code in Question:

package com.example.wmmc88.traffictracker;

import android.Manifest; import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.SurfaceView; import android.view.WindowManager;

import org.opencv.android.BaseLoaderCallback; import org.opencv.android.CameraBridgeViewBase; import org.opencv.android.LoaderCallbackInterface; import org.opencv.android.OpenCVLoader; import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat;

public class CameraActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 { private static final String TAG = CameraActivity.class.getSimpleName();

public static final int CAMERA_PERMISSION_REQUEST = 1;

private Mat mRgba;
private Mat mRgbaT;
private Mat mRgbaF;

private CameraBridgeViewBase mOpenCvCameraView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(R.layout.activity_camera);

}


private boolean permissionsGranted() {
    Log.d(TAG, "checkpermissionsGranted");

    if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_REQUEST);
        return false;
    }
    return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    Log.d(TAG, "onRequestPermissionsResult");

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    switch (requestCode) {
        case CAMERA_PERMISSION_REQUEST: {
            if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                Log.i(TAG, "Permissions Granted!");
                loadOpenCVView();
            } else {
                Log.w(TAG, "Permissions Denied!");
                this.finish();
            }
            return;
        }

        //other permission request cases
    }
}

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        Log.d(TAG, "onManagerConnected");
        switch (status) {
            case LoaderCallbackInterface.SUCCESS: {
                Log.i(TAG, "OpenCV loaded successfully");
                if (permissionsGranted()) {
                    loadOpenCVView();
                }
            }
            break;
            default: {
                super.onManagerConnected(status);
            }
            break;
        }
    }
};

private void loadOpenCVView() {
    Log.d(TAG, "loadOpenCVView");

    mOpenCvCameraView = findViewById(R.id.cbvb_camera);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);
    mOpenCvCameraView.enableView();
}


@Override
public void onResume() {
    super.onResume();
    OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION, this, mLoaderCallback);
}


@Override
public void onPause() {
    Log.d(TAG, "onPause");

    super.onPause();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onDestroy() {
    Log.d(TAG, "onDestroy");

    super.onDestroy();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onCameraViewStarted(int width, int height) {
    Log.d(TAG, "onCameraViewStarted");

    mRgba = new Mat(height, width, CvType.CV_8UC4);
}

public void onCameraViewStopped() {
    Log.d(TAG, "onCameraViewStopped");

    mRgba.release();
}

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    Log.d(TAG, "onCameraFrame");

    mRgba = inputFrame.rgba();
    Core.rotate(mRgba, mRgba, 90);
    return mRgba;
}

}

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

Code in Question:

package com.example.wmmc88.traffictracker;

import android.Manifest; import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.SurfaceView; import android.view.WindowManager;

import org.opencv.android.BaseLoaderCallback; import org.opencv.android.CameraBridgeViewBase; import org.opencv.android.LoaderCallbackInterface; import org.opencv.android.OpenCVLoader; import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat;

public class CameraActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 { private static final String TAG = CameraActivity.class.getSimpleName();

public static final int CAMERA_PERMISSION_REQUEST = 1;

private Mat mRgba;
private Mat mRgbaT;
private Mat mRgbaF;

private CameraBridgeViewBase mOpenCvCameraView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(R.layout.activity_camera);

}


private boolean permissionsGranted() {
    Log.d(TAG, "checkpermissionsGranted");

    if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_REQUEST);
        return false;
    }
    return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    Log.d(TAG, "onRequestPermissionsResult");

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    switch (requestCode) {
        case CAMERA_PERMISSION_REQUEST: {
            if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                Log.i(TAG, "Permissions Granted!");
                loadOpenCVView();
            } else {
                Log.w(TAG, "Permissions Denied!");
                this.finish();
            }
            return;
        }

        //other permission request cases
    }
}

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        Log.d(TAG, "onManagerConnected");
        switch (status) {
            case LoaderCallbackInterface.SUCCESS: {
                Log.i(TAG, "OpenCV loaded successfully");
                if (permissionsGranted()) {
                    loadOpenCVView();
                }
            }
            break;
            default: {
                super.onManagerConnected(status);
            }
            break;
        }
    }
};

private void loadOpenCVView() {
    Log.d(TAG, "loadOpenCVView");

    mOpenCvCameraView = findViewById(R.id.cbvb_camera);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);
    mOpenCvCameraView.enableView();
}


@Override
public void onResume() {
    super.onResume();
    OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION, this, mLoaderCallback);
}


@Override
public void onPause() {
    Log.d(TAG, "onPause");

    super.onPause();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onDestroy() {
    Log.d(TAG, "onDestroy");

    super.onDestroy();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onCameraViewStarted(int width, int height) {
    Log.d(TAG, "onCameraViewStarted");

    mRgba = new Mat(height, width, CvType.CV_8UC4);
}

public void onCameraViewStopped() {
    Log.d(TAG, "onCameraViewStopped");

    mRgba.release();
}

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    Log.d(TAG, "onCameraFrame");

    mRgba = inputFrame.rgba();
    Core.rotate(mRgba, mRgba, 90);
    return mRgba;
}

}

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

Code in Question:

package Question: ```package com.example.wmmc88.traffictracker;

import android.Manifest; import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.SurfaceView; import android.view.WindowManager;

import org.opencv.android.BaseLoaderCallback; import org.opencv.android.CameraBridgeViewBase; import org.opencv.android.LoaderCallbackInterface; import org.opencv.android.OpenCVLoader; import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat;

public class CameraActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 { private static final String TAG = CameraActivity.class.getSimpleName();

public static final int CAMERA_PERMISSION_REQUEST = 1;

private Mat mRgba;
private Mat mRgbaT;
private Mat mRgbaF;

private CameraBridgeViewBase mOpenCvCameraView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(R.layout.activity_camera);

}


private boolean permissionsGranted() {
    Log.d(TAG, "checkpermissionsGranted");

    if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_REQUEST);
        return false;
    }
    return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    Log.d(TAG, "onRequestPermissionsResult");

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    switch (requestCode) {
        case CAMERA_PERMISSION_REQUEST: {
            if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                Log.i(TAG, "Permissions Granted!");
                loadOpenCVView();
            } else {
                Log.w(TAG, "Permissions Denied!");
                this.finish();
            }
            return;
        }

        //other permission request cases
    }
}

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        Log.d(TAG, "onManagerConnected");
        switch (status) {
            case LoaderCallbackInterface.SUCCESS: {
                Log.i(TAG, "OpenCV loaded successfully");
                if (permissionsGranted()) {
                    loadOpenCVView();
                }
            }
            break;
            default: {
                super.onManagerConnected(status);
            }
            break;
        }
    }
};

private void loadOpenCVView() {
    Log.d(TAG, "loadOpenCVView");

    mOpenCvCameraView = findViewById(R.id.cbvb_camera);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);
    mOpenCvCameraView.enableView();
}


@Override
public void onResume() {
    super.onResume();
    OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION, this, mLoaderCallback);
}


@Override
public void onPause() {
    Log.d(TAG, "onPause");

    super.onPause();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onDestroy() {
    Log.d(TAG, "onDestroy");

    super.onDestroy();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onCameraViewStarted(int width, int height) {
    Log.d(TAG, "onCameraViewStarted");

    mRgba = new Mat(height, width, CvType.CV_8UC4);
}

public void onCameraViewStopped() {
    Log.d(TAG, "onCameraViewStopped");

    mRgba.release();
}

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    Log.d(TAG, "onCameraFrame");

    mRgba = inputFrame.rgba();

    Core.flip(mRgba, mRgba, 1); //Works

    Core.rotate(mRgba, mRgba, 90);
90); //Errors

    return mRgba;
}

}}```

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

Code in Question: ```package Question:

{ package com.example.wmmc88.traffictracker;

import android.Manifest; import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.SurfaceView; import android.view.WindowManager;

import org.opencv.android.BaseLoaderCallback; import org.opencv.android.CameraBridgeViewBase; import org.opencv.android.LoaderCallbackInterface; import org.opencv.android.OpenCVLoader; import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat;

public class CameraActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 { private static final String TAG = CameraActivity.class.getSimpleName();

public static final int CAMERA_PERMISSION_REQUEST = 1;

private Mat mRgba;

private CameraBridgeViewBase mOpenCvCameraView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(R.layout.activity_camera);

}


private boolean permissionsGranted() {
    Log.d(TAG, "checkpermissionsGranted");

    if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_REQUEST);
        return false;
    }
    return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    Log.d(TAG, "onRequestPermissionsResult");

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    switch (requestCode) {
        case CAMERA_PERMISSION_REQUEST: {
            if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                Log.i(TAG, "Permissions Granted!");
                loadOpenCVView();
            } else {
                Log.w(TAG, "Permissions Denied!");
                this.finish();
            }
            return;
        }

        //other permission request cases
    }
}

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        Log.d(TAG, "onManagerConnected");
        switch (status) {
            case LoaderCallbackInterface.SUCCESS: {
                Log.i(TAG, "OpenCV loaded successfully");
                if (permissionsGranted()) {
                    loadOpenCVView();
                }
            }
            break;
            default: {
                super.onManagerConnected(status);
            }
            break;
        }
    }
};

private void loadOpenCVView() {
    Log.d(TAG, "loadOpenCVView");

    mOpenCvCameraView = findViewById(R.id.cbvb_camera);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);
    mOpenCvCameraView.enableView();
}


@Override
public void onResume() {
    super.onResume();
    OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION, this, mLoaderCallback);
}


@Override
public void onPause() {
    Log.d(TAG, "onPause");

    super.onPause();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onDestroy() {
    Log.d(TAG, "onDestroy");

    super.onDestroy();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onCameraViewStarted(int width, int height) {
    Log.d(TAG, "onCameraViewStarted");

    mRgba = new Mat(height, width, CvType.CV_8UC4);
}

public void onCameraViewStopped() {
    Log.d(TAG, "onCameraViewStopped");

    mRgba.release();
}

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    Log.d(TAG, "onCameraFrame");

    mRgba = inputFrame.rgba();

    Core.flip(mRgba, mRgba, 1); //Works

    Core.rotate(mRgba, mRgba, 90); //Errors

    return mRgba;
}

}```}

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

Code in Question:

{ package com.example.wmmc88.traffictracker;

import android.Manifest; import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.SurfaceView; import android.view.WindowManager;

import org.opencv.android.BaseLoaderCallback; import org.opencv.android.CameraBridgeViewBase; import org.opencv.android.LoaderCallbackInterface; import org.opencv.android.OpenCVLoader; import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat;

public class CameraActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 { private static final String TAG = CameraActivity.class.getSimpleName();

public static final int CAMERA_PERMISSION_REQUEST = 1;

private Mat mRgba;

private CameraBridgeViewBase mOpenCvCameraView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(R.layout.activity_camera);

}


private boolean permissionsGranted() {
    Log.d(TAG, "checkpermissionsGranted");

    if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_REQUEST);
        return false;
    }
    return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    Log.d(TAG, "onRequestPermissionsResult");

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    switch (requestCode) {
        case CAMERA_PERMISSION_REQUEST: {
            if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                Log.i(TAG, "Permissions Granted!");
                loadOpenCVView();
            } else {
                Log.w(TAG, "Permissions Denied!");
                this.finish();
            }
            return;
        }

        //other permission request cases
    }
}

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        Log.d(TAG, "onManagerConnected");
        switch (status) {
            case LoaderCallbackInterface.SUCCESS: {
                Log.i(TAG, "OpenCV loaded successfully");
                if (permissionsGranted()) {
                    loadOpenCVView();
                }
            }
            break;
            default: {
                super.onManagerConnected(status);
            }
            break;
        }
    }
};

private void loadOpenCVView() {
    Log.d(TAG, "loadOpenCVView");

    mOpenCvCameraView = findViewById(R.id.cbvb_camera);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);
    mOpenCvCameraView.enableView();
}


@Override
public void onResume() {
    super.onResume();
    OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION, this, mLoaderCallback);
}


@Override
public void onPause() {
    Log.d(TAG, "onPause");

    super.onPause();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onDestroy() {
    Log.d(TAG, "onDestroy");

    super.onDestroy();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onCameraViewStarted(int width, int height) {
    Log.d(TAG, "onCameraViewStarted");

    mRgba = new Mat(height, width, CvType.CV_8UC4);
}

public void onCameraViewStopped() {
    Log.d(TAG, "onCameraViewStopped");

    mRgba.release();
}

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    Log.d(TAG, "onCameraFrame");

    mRgba = inputFrame.rgba();

    Core.flip(mRgba, mRgba, 1); //Works

    Core.rotate(mRgba, mRgba, 90); //Errors

    return mRgba;
}
test

}

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

Code in Question:

public class CameraActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 { private static final String TAG = CameraActivity.class.getSimpleName();

testpublic static final int CAMERA_PERMISSION_REQUEST = 1;

private Mat mRgba;

private CameraBridgeViewBase mOpenCvCameraView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    Log.d(TAG, "onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    setContentView(R.layout.activity_camera);

}


private boolean permissionsGranted() {
    Log.d(TAG, "checkpermissionsGranted");

    if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
        ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_REQUEST);
        return false;
    }
    return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    Log.d(TAG, "onRequestPermissionsResult");

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    switch (requestCode) {
        case CAMERA_PERMISSION_REQUEST: {
            if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                Log.i(TAG, "Permissions Granted!");
                loadOpenCVView();
            } else {
                Log.w(TAG, "Permissions Denied!");
                this.finish();
            }
            return;
        }

        //other permission request cases
    }
}

private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
    @Override
    public void onManagerConnected(int status) {
        Log.d(TAG, "onManagerConnected");
        switch (status) {
            case LoaderCallbackInterface.SUCCESS: {
                Log.i(TAG, "OpenCV loaded successfully");
                if (permissionsGranted()) {
                    loadOpenCVView();
                }
            }
            break;
            default: {
                super.onManagerConnected(status);
            }
            break;
        }
    }
};

private void loadOpenCVView() {
    Log.d(TAG, "loadOpenCVView");

    mOpenCvCameraView = findViewById(R.id.cbvb_camera);
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
    mOpenCvCameraView.setCvCameraViewListener(this);
    mOpenCvCameraView.enableView();
}


@Override
public void onResume() {
    super.onResume();
    OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION, this, mLoaderCallback);
}


@Override
public void onPause() {
    Log.d(TAG, "onPause");

    super.onPause();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onDestroy() {
    Log.d(TAG, "onDestroy");

    super.onDestroy();
    if (mOpenCvCameraView != null)
        mOpenCvCameraView.disableView();
}

public void onCameraViewStarted(int width, int height) {
    Log.d(TAG, "onCameraViewStarted");

    mRgba = new Mat(height, width, CvType.CV_8UC4);
}

public void onCameraViewStopped() {
    Log.d(TAG, "onCameraViewStopped");

    mRgba.release();
}

public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
    Log.d(TAG, "onCameraFrame");

    mRgba = inputFrame.rgba();

    Core.flip(mRgba, mRgba, 1); //Works

    Core.rotate(mRgba, mRgba, 90); //Errors

    return mRgba;
}

}

OpenCV4Android OpenCVManager missing java wrapper implementations

I've installed OpenCV4Android and OpenCVManager. I'm using OpenCV4Android 3.4.1 and OpenCVManager has downloaded both libopencv_java.so (2.4) and libopencv_java3.so (3.0).

When I make calls to Core.flip or create instances of Mat, it works as intended; however, when i make calls to Core.rotate, i get the following error:

07-25 17:15:10.252 5914-6018/com.example.wmmc88.traffictracker E/art: 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) 07-25 17:15:10.253 5914-6018/com.example.wmmc88.traffictracker E/AndroidRuntime: FATAL EXCEPTION: Thread-3396 Process: com.example.wmmc88.traffictracker, PID: 5914 java.lang.UnsatisfiedLinkError: 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) at org.opencv.core.Core.rotate_0(Native Method) at org.opencv.core.Core.rotate(Core.java:2043) at com.example.wmmc88.traffictracker.CameraActivity.onCameraFrame(CameraActivity.java:163) at org.opencv.android.CameraBridgeViewBase.deliverAndDrawFrame(CameraBridgeViewBase.java:392) at org.opencv.android.JavaCameraView$CameraWorker.run(JavaCameraView.java:373) at java.lang.Thread.run(Thread.java:818)

When I use static initialization of the OpenCV library, it no longer gives me this error. It seems to me like the OpenCV Manager hasn't properly implemented some of the Core module's methods?

Code in Question:

public class CameraActivity extends AppCompatActivity implements CameraBridgeViewBase.CvCameraViewListener2 {
    private static final String TAG = CameraActivity.class.getSimpleName();

CameraActivity.class.getSimpleName();


    public static final int CAMERA_PERMISSION_REQUEST = 1;

 private Mat mRgba;

 private CameraBridgeViewBase mOpenCvCameraView;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
     Log.d(TAG, "onCreate");
     super.onCreate(savedInstanceState);
     getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
     setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
     setContentView(R.layout.activity_camera);

}


    }


    private boolean permissionsGranted() {
     Log.d(TAG, "checkpermissionsGranted");

     if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
         ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, CAMERA_PERMISSION_REQUEST);
         return false;
    }
    }
        return true;
}

    }

    @Override
 public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
     Log.d(TAG, "onRequestPermissionsResult");

     super.onRequestPermissionsResult(requestCode, permissions, grantResults);
     switch (requestCode) {
         case CAMERA_PERMISSION_REQUEST: {
             if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                 Log.i(TAG, "Permissions Granted!");
                 loadOpenCVView();
             } else {
                 Log.w(TAG, "Permissions Denied!");
                 this.finish();
            }
    }
                return;
        }

    }

            //other permission request cases
    }
}

    }
    }

    private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
     @Override
     public void onManagerConnected(int status) {
         Log.d(TAG, "onManagerConnected");
         switch (status) {
             case LoaderCallbackInterface.SUCCESS: {
                 Log.i(TAG, "OpenCV loaded successfully");
                 if (permissionsGranted()) {
                     loadOpenCVView();
                }
            }
    }
                }
                break;
             default: {
                 super.onManagerConnected(status);
            }
    }
                break;
        }
    }
    }
        }
    };

 private void loadOpenCVView() {
     Log.d(TAG, "loadOpenCVView");

     mOpenCvCameraView = findViewById(R.id.cbvb_camera);
     mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);
     mOpenCvCameraView.setCvCameraViewListener(this);
     mOpenCvCameraView.enableView();
}


    }


    @Override
 public void onResume() {
     super.onResume();
     OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION, this, mLoaderCallback);
}


    }


    @Override
 public void onPause() {
     Log.d(TAG, "onPause");

     super.onPause();
     if (mOpenCvCameraView != null)
         mOpenCvCameraView.disableView();
}

    }

    public void onDestroy() {
     Log.d(TAG, "onDestroy");

     super.onDestroy();
     if (mOpenCvCameraView != null)
         mOpenCvCameraView.disableView();
}

    }

    public void onCameraViewStarted(int width, int height) {
     Log.d(TAG, "onCameraViewStarted");

     mRgba = new Mat(height, width, CvType.CV_8UC4);
}

    }

    public void onCameraViewStopped() {
     Log.d(TAG, "onCameraViewStopped");

     mRgba.release();
}

    }

    public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {
     Log.d(TAG, "onCameraFrame");

     mRgba = inputFrame.rgba();

     Core.flip(mRgba, mRgba, 1); //Works

     Core.rotate(mRgba, mRgba, 90); //Errors

     return mRgba;
    }
}

}