Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I finally solved it! Apparently OpenCV crashes every time it's functions are called in the UI, so I did..

Something like this :

 public class Face extends Activity {
 private Bitmap bitmap;
 private int f = Crop.k;
 private ImageView tv;
 Mat m;
 private static final String    TAG                 = "OCVSample::Activity";

  private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
public void onManagerConnected(int status) {
    switch (status) {
        case LoaderCallbackInterface.SUCCESS:
            Log.i(TAG, "OpenCV loaded successfully");
            m=new Mat();
        } break;
        } break;

I would suggest you execute whatever function you're trying in an AsyncTask like in my project. Mat functions however can be declared without the risk of the UnsatisfiedLinkError exception in OpenCV functions. Functions called in the UI however experience this. At least this is what I've seen.