Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No implementation found for native Lcom .n_Mat

Hello,

I'm using OpenCV through Cordova for, given some metrics about exercise, predict wich type of exercise you are doing. I've a XML file with trainning information but I'm having problems importing my exercise params. This is what I'm doing

 Scalar scalar = new Scalar(metricas);  //metricas is my array with parameters from physical exercise

                 **Mat mat = new Mat(1, 15, 6, scalar); //this is where it crashes, when I try to load my results from physical activity to preassign this values to the matrix "mat"** 

                CvSVM cvsm = new CvSVM(); //Create machine

                cvsm.load("modeloSVMSinHR.xml", "modeloSinHR"); //load XML with "trained params"

                float resultado = cvsm.predict(mat, false);    //predict wich type of activity you're doing

The error given is the following:

03-21 11:21:07.138: W/dalvikvm(30556): No implementation found for native Lcom/opencv/avr/Mat;.n_Mat (IIIDDDD)J
    03-21 11:21:07.138: W/System.err(30556): java.lang.UnsatisfiedLinkError: n_Mat
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.Mat.n_Mat(Native Method)
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.Mat.<init>(Mat.java:541)
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.OpenCV.execute(OpenCV.java:35)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:227)
    03-21 11:21:07.138: W/System.err(30556):    at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:653)
    03-21 11:21:07.138: W/System.err(30556):    at android.os.Handler.dispatchMessage(Handler.java:99)
    03-21 11:21:07.138: W/System.err(30556):    at android.os.Looper.loop(Looper.java:137)
    03-21 11:21:07.138: W/System.err(30556):    at android.app.ActivityThread.main(ActivityThread.java:4517)
    03-21 11:21:07.138: W/System.err(30556):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-21 11:21:07.138: W/System.err(30556):    at java.lang.reflect.Method.invoke(Method.java:511)
    03-21 11:21:07.138: W/System.err(30556):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:985)
    03-21 11:21:07.138: W/System.err(30556):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:752)
    03-21 11:21:07.138: W/System.err(30556):    at dalvik.system.NativeStart.main(Native Method)

Can anyone help me please??

click to hide/show revision 2
retagged

updated 2015-03-21 06:03:05 -0600

berak gravatar image

No implementation found for native Lcom .n_Mat

Hello,

I'm using OpenCV through Cordova for, given some metrics about exercise, predict wich type of exercise you are doing. I've a XML file with trainning information but I'm having problems importing my exercise params. This is what I'm doing

 Scalar scalar = new Scalar(metricas);  //metricas is my array with parameters from physical exercise

                 **Mat mat = new Mat(1, 15, 6, scalar); //this is where it crashes, when I try to load my results from physical activity to preassign this values to the matrix "mat"** 

                CvSVM cvsm = new CvSVM(); //Create machine

                cvsm.load("modeloSVMSinHR.xml", "modeloSinHR"); //load XML with "trained params"

                float resultado = cvsm.predict(mat, false);    //predict wich type of activity you're doing

The error given is the following:

03-21 11:21:07.138: W/dalvikvm(30556): No implementation found for native Lcom/opencv/avr/Mat;.n_Mat (IIIDDDD)J
    03-21 11:21:07.138: W/System.err(30556): java.lang.UnsatisfiedLinkError: n_Mat
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.Mat.n_Mat(Native Method)
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.Mat.<init>(Mat.java:541)
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.OpenCV.execute(OpenCV.java:35)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
    03-21 11:21:07.138: W/System.err(30556):    at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:227)
    03-21 11:21:07.138: W/System.err(30556):    at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:653)
    03-21 11:21:07.138: W/System.err(30556):    at android.os.Handler.dispatchMessage(Handler.java:99)
    03-21 11:21:07.138: W/System.err(30556):    at android.os.Looper.loop(Looper.java:137)
    03-21 11:21:07.138: W/System.err(30556):    at android.app.ActivityThread.main(ActivityThread.java:4517)
    03-21 11:21:07.138: W/System.err(30556):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-21 11:21:07.138: W/System.err(30556):    at java.lang.reflect.Method.invoke(Method.java:511)
    03-21 11:21:07.138: W/System.err(30556):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:985)
    03-21 11:21:07.138: W/System.err(30556):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:752)
    03-21 11:21:07.138: W/System.err(30556):    at dalvik.system.NativeStart.main(Native Method)

Can anyone help me please??

No implementation found for native Lcom .n_Mat

Hello,

I'm using OpenCV through Cordova for, given some metrics about exercise, predict wich type of exercise you are doing. I've a XML file with trainning information but I'm having problems importing my exercise params.

This is what I'm doing

 Scalar doing (I've manually put line numbers in brackets after changing the code with @berak comments)

[33]CvSVM cvsm = new CvSVM(); //Create machine [34]Scalar scalar = new Scalar(metricas); //metricas is my array with parameters from physical exercise **Mat [35]Mat mat = new Mat(1, 15, 6, scalar); //this is where it crashes, when I try to load my results from physical activity to preassign this values to the matrix "mat"** CvSVM cvsm = new CvSVM(); //Create machine cvsm.load("modeloSVMSinHR.xml", [36]cvsm.load("modeloSVMSinHR.xml", "modeloSinHR"); //load XML with "trained params" float [37]float resultado = cvsm.predict(mat, false); //predict wich type of activity you're doing

The error given is doing

With these changes in the following:code I'm getting this error

I changed the order of methods and it certainly changed this behaviour. Now I'm getting this error:

03-21 11:21:07.138: W/dalvikvm(30556): 03-23 08:13:55.220: W/dalvikvm(2581): No implementation found for native Lcom/opencv/avr/Mat;.n_Mat (IIIDDDD)J
    03-21 11:21:07.138: W/System.err(30556): Lcom/opencv/avr/CvSVM;.CvSVM_0 ()J
03-23 08:13:55.220: W/System.err(2581): java.lang.UnsatisfiedLinkError: n_Mat
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.Mat.n_Mat(Native CvSVM_0
03-23 08:13:55.220: W/System.err(2581):     at com.opencv.avr.CvSVM.CvSVM_0(Native Method)
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.Mat.<init>(Mat.java:541)
    03-21 11:21:07.138: W/System.err(30556):    at com.opencv.avr.OpenCV.execute(OpenCV.java:35)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at com.opencv.avr.CvSVM.<init>(CvSVM.java:63)
03-23 08:13:55.220: W/System.err(2581):     at com.opencv.avr.OpenCV.execute(OpenCV.java:33)
03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:227)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:653)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at android.os.Handler.dispatchMessage(Handler.java:99)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at android.os.Looper.loop(Looper.java:137)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.220: W/System.err(2581):     at android.app.ActivityThread.main(ActivityThread.java:4517)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.230: W/System.err(2581):     at java.lang.reflect.Method.invokeNative(Native Method)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.230: W/System.err(2581):     at java.lang.reflect.Method.invoke(Method.java:511)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.230: W/System.err(2581):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:985)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.230: W/System.err(2581):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:752)
    03-21 11:21:07.138: W/System.err(30556): 03-23 08:13:55.230: W/System.err(2581):     at dalvik.system.NativeStart.main(Native Method)

Can anyone help me please??It seems like constructor CvSVM cvsm = new CvSVM() wasn't well implemented but it's one picked right from "CsSVM" class...

Thank you!

No implementation found for native Lcom .n_Mat

Hello,

I'm using OpenCV through Cordova for, given some metrics about exercise, predict wich type of exercise you are doing. I've a XML file with trainning information but I'm having problems importing my exercise params.

This is what I'm doing (I've manually put line numbers in brackets after changing the code with @berak comments)

[33]CvSVM cvsm = new CvSVM(); //Create machine
[34]Scalar scalar = new Scalar(metricas); //metricas is my array with parameters from physical exercise
[35]Mat mat = new Mat(1, 15, 6, scalar); //this is where it crashes, when I try to load my results from physical activity to preassign this values to the matrix "mat"**
[36]cvsm.load("modeloSVMSinHR.xml", "modeloSinHR"); //load XML with "trained params"
[37]float resultado = cvsm.predict(mat, false); //predict wich type of activity you're doing

doing

With these changes in the code I'm getting this error

I changed the order of methods and it certainly changed this behaviour. Now I'm getting this error:

03-23 08:13:55.220: W/dalvikvm(2581): No implementation found for native Lcom/opencv/avr/CvSVM;.CvSVM_0 ()J
03-23 08:13:55.220: W/System.err(2581): java.lang.UnsatisfiedLinkError: CvSVM_0
03-23 08:13:55.220: W/System.err(2581):     at com.opencv.avr.CvSVM.CvSVM_0(Native Method)
03-23 08:13:55.220: W/System.err(2581):     at com.opencv.avr.CvSVM.<init>(CvSVM.java:63)
03-23 08:13:55.220: W/System.err(2581):     at com.opencv.avr.OpenCV.execute(OpenCV.java:33)
03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
03-23 08:13:55.220: W/System.err(2581):     at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:227)
03-23 08:13:55.220: W/System.err(2581):     at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:653)
03-23 08:13:55.220: W/System.err(2581):     at android.os.Handler.dispatchMessage(Handler.java:99)
03-23 08:13:55.220: W/System.err(2581):     at android.os.Looper.loop(Looper.java:137)
03-23 08:13:55.220: W/System.err(2581):     at android.app.ActivityThread.main(ActivityThread.java:4517)
03-23 08:13:55.230: W/System.err(2581):     at java.lang.reflect.Method.invokeNative(Native Method)
03-23 08:13:55.230: W/System.err(2581):     at java.lang.reflect.Method.invoke(Method.java:511)
03-23 08:13:55.230: W/System.err(2581):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:985)
03-23 08:13:55.230: W/System.err(2581):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:752)
03-23 08:13:55.230: W/System.err(2581):     at dalvik.system.NativeStart.main(Native Method)

It seems like constructor CvSVM cvsm = new CvSVM() wasn't well implemented but it's one picked right from "CsSVM" class...

Thank you!