我在将位图转换为Mat(通过highgui)
时遇到问题我通过使用内置的Android相机API获得了图像。我需要做的是从相机捕获图像,将该位图更改为Mat,然后应用rgb2gray。如果我只使用highgui,那么执行异步初始化的正确和推荐方法是什么?
堆栈追踪:
03-05 21:47:44.918: E/AndroidRuntime(29461): FATAL EXCEPTION: main
03-05 21:47:44.918: E/AndroidRuntime(29461): java.lang.UnsatisfiedLinkError: Native method not found: org.opencv.highgui.highgui.imread_1:(Ljava/lang/String;)J
03-05 21:47:44.918: E/AndroidRuntime(29461): at org.opencv.highgui.Highgui.imread_1(Native Method)
03-05 21:47:44.918: E/AndroidRuntime(29461): at org.opencv.highgui.Highgui.imread(Highgui.java:349)
03-05 21:47:44.918: E/AndroidRuntime(29461): at com.example.finalcameraapi.Main.onActivityResult(Main.java:110)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.app.Activity.dispatchActivityResult(Activity.java:5293)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.app.ActivityThread.deliverResults(ActivityThread.java:3315)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3362)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.app.ActivityThread.access$1100(ActivityThread.java:141)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1282)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.os.Handler.dispatchMessage(Handler.java:99)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.os.Looper.loop(Looper.java:137)
03-05 21:47:44.918: E/AndroidRuntime(29461): at android.app.ActivityThread.main(ActivityThread.java:5041)
03-05 21:47:44.918: E/AndroidRuntime(29461): at java.lang.reflect.Method.invokeNative(Native Method)
03-05 21:47:44.918: E/AndroidRuntime(29461): at java.lang.reflect.Method.invoke(Method.java:511)
03-05 21:47:44.918: E/AndroidRuntime(29461): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-05 21:47:44.918: E/AndroidRuntime(29461): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
03-05 21:47:44.918: E/AndroidRuntime(29461): at dalvik.system.NativeStart.main(Native Method)