this is where i get error.I loaded correctly opencv library but i get this error.If i go in the ximgproc all native methods are red marked with "Cannot resolve corresponding jni function name_function".How can i resolve?
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {
Uri uri = data.getData();
try {
Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uri);
//Log.i("prova",uri.toString());
ImageView imageView = (ImageView) findViewById(R.id.imageView);
// imageView.setImageBitmap(bitmap);
Mat g=new Mat(bitmap.getHeight(),bitmap.getWidth(), CvType.CV_8UC1);
Utils.bitmapToMat(bitmap,g,true);
SuperpixelSLIC x=Ximgproc.createSuperpixelSLIC(g,Ximgproc.SLIC,100,3);
} catch (IOException e) {
e.printStackTrace();
}
}
}
and this is the error that i get:
06-07 19:24:01.370 21090-21090/com.example.jt1995.provaemo E/art: No implementation found for long org.opencv.ximgproc.Ximgproc.createSuperpixelSLIC_0(long, int, int, float) (tried Java_org_opencv_ximgproc_Ximgproc_createSuperpixelSLIC_10 and Java_org_opencv_ximgproc_Ximgproc_createSuperpixelSLIC_10__JIIF)
06-07 19:24:01.370 21090-21090/com.example.jt1995.provaemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.jt1995.provaemo, PID: 21090
java.lang.UnsatisfiedLinkError: No implementation found for long org.opencv.ximgproc.Ximgproc.createSuperpixelSLIC_0(long, int, int, float) (tried Java_org_opencv_ximgproc_Ximgproc_createSuperpixelSLIC_10 and Java_org_opencv_ximgproc_Ximgproc_createSuperpixelSLIC_10__JIIF)
at org.opencv.ximgproc.Ximgproc.createSuperpixelSLIC_0(Native Method)
at org.opencv.ximgproc.Ximgproc.createSuperpixelSLIC(Ximgproc.java:452)
at com.example.jt1995.provaemo.MainActivity.onActivityResult(MainActivity.java:108)
at android.app.Activity.dispatchActivityResult(Activity.java:6303)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3818)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3865)
at android.app.ActivityThread.access$1700(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5569)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:931)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:726)