*I am working with eclipse juno , opencv 2.4.3 on API 10 (2.3.3)*
This is my code .. i am trying to detect lines and edges from the image
stored in android phone in drawable folder
the following code is not running properly due to Highgui.imread()
*
here is the log along with code please help me to solve the error..*

package com.idag.edge;



import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.util.Log;
//import android.view.Menu;
import android.widget.TextView;



//import org.opencv.android.OpenCVLoader;
import org.opencv.core.Mat;
import org.opencv.highgui.Highgui;
//import org.opencv.samples.puzzle15.Puzzle15Activity;


public class MainActivity extends Activity {


TextView display;


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

try
{
Mat m = Highgui.imread("/rectangle");
if (m == null) {
AlertDialog ad = new AlertDialog.Builder(this).create();
ad.setMessage("Fatal error: can't open /image.jpg!");
}
}
catch(Exception e){
System.err.print("Error in the code");
Log.i("Error in imread", "Error in imread");
} finally {
Log.i("Image is not readable", "img is not readable");
}
}

}


LOG :

12-27 15:59:20.515: I/ApplicationPackageManager(12840): cscCountry is not
German : INU
12-27 15:59:20.617: W/dalvikvm(12840): No implementation found for native
Lorg/opencv/highgui/Highgui;.imread_1 (Ljava/lang/String;)J
12-27 15:59:20.617: I/Image is not readable(12840): img is not readable
12-27 15:59:20.617: D/AndroidRuntime(12840): Shutting down VM
12-27 15:59:20.617: W/dalvikvm(12840): threadid=1: thread exiting with
uncaught exception (group=0x40018578)
12-27 15:59:20.640: E/AndroidRuntime(12840): FATAL EXCEPTION: main
12-27 15:59:20.640: E/AndroidRuntime(12840):
java.lang.UnsatisfiedLinkError: imread_1
12-27 15:59:20.640: E/AndroidRuntime(12840): at
org.opencv.highgui.Highgui.imread_1(Native Method)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
org.opencv.highgui.Highgui.imread(Highgui.java:349)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
com.idag.edge.MainActivity.onCreate(MainActivity.java:33)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.os.Handler.dispatchMessage(Handler.java:99)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.os.Looper.loop(Looper.java:130)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
android.app.ActivityThread.main(ActivityThread.java:3687)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
java.lang.reflect.Method.invokeNative(Native Method)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
java.lang.reflect.Method.invoke(Method.java:507)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
12-27 15:59:20.640: E/AndroidRuntime(12840): at
dalvik.system.NativeStart.main(Native Method)


"The application is opening for 4 seconds and enexpectedly stops working"


--

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupandroid-opencv @
categoriesandroid
postedDec 28, '12 at 6:57a
activeDec 29, '12 at 11:58a
posts2
users2
websiteandroid.com

2 users in discussion

Deepak: 1 post Alexander Smorkalov: 1 post

People

Translate

site design / logo © 2017 Grokbase