Ask Your Question

bdg26's profile - activity

2013-06-23 03:50:46 -0600 received badge  Teacher (source)
2013-03-18 23:19:41 -0600 received badge  Self-Learner (source)
2013-01-29 21:15:23 -0600 commented answer Hello OpenCV Android Sample Code - mview confusion

Thanks for your help, you were right I needed to just define mview towards the top of the HelloOpenCVActivity class, most of the other errors I got were solved by importing the correct libraries. I'm now able to compile the code completely, but it crashes when I move it to my device. I need to look into the errors, but I have a feeling I'm going to be back asking questions pretty shortly. Thanks for the quick helpful response

2013-01-29 21:13:47 -0600 received badge  Scholar (source)
2013-01-29 18:55:29 -0600 received badge  Supporter (source)
2013-01-29 18:51:58 -0600 asked a question Hello OpenCV Android Sample Code - mview confusion

Hi All, I'm trying the tutorial located here

I have compiled sample code for openCV without issues - so I'm sure I have all the necessary things installed for opencv. I've added the opencv library to my project and I'm compiling with java 1.6 (java 7 doesn't work with opencv4android right now AFAIK). I added the opencv library as a resource as well.

However, the sample code doesn't make sense to me once it gets to step 5 under Hello OpenCV example.

   public void onCreate (Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     mView = new HelloOpenCVView(this);
     setContentView (mView);
}

Is the code I'm talking about, I immediately get the error "mView cannot be resolved to a variable". I can resolve it by putting HelloOpenCVView mView = new HelloOpenCVView(this) but that just causes a bunch of other problems later on. Can someone tell me what I'm doing wrong? thanks

B

2013-01-29 18:48:30 -0600 answered a question Unfortunately, OCV T1 Add OpenCV has stopped (opencv4android)

Everything was resolved by changing from java 1.7 to 1.6. Thanks Ben

2013-01-27 17:45:36 -0600 asked a question Unfortunately, OCV T1 Add OpenCV has stopped (opencv4android)

Hi All, I'm trying to get just the sample programs to run in an emulator for opencv4android. I've followed the tutorial but continue to get errors when running the program. It compiles fine. I've installed OpenCV_2.4.3.2_Manager_2.4_armeabi.apk on my emulator, which is runnning android 3.0 (API 11). Whenever I install any sample program, for instance tutorial 1, I get errors similar to the following in logcat:

E/AndroidRuntime( 788): FATAL EXCEPTION: main

E/AndroidRuntime( 788): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.opencv.samples.tutorial1/org.opencv.samples.tutorial1.Sample1Java}: java.lang.ClassNotFoundException: org.opencv.samples.tutorial1.Sample1Java

E/AndroidRuntime( 788): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)

E/AndroidRuntime( 788): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)

E/AndroidRuntime( 788): at android.app.ActivityThread.access$600(ActivityThread.java:123)

E/AndroidRuntime( 788): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

E/AndroidRuntime( 788): at android.os.Handler.dispatchMessage(Handler.java:99)

E/AndroidRuntime( 788): at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 788): at android.app.ActivityThread.main(ActivityThread.java:4424)

E/AndroidRuntime( 788): at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 788): at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 788): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)

E/AndroidRuntime( 788): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)

E/AndroidRuntime( 788): at dalvik.system.NativeStart.main(Native Method)

E/AndroidRuntime( 788): Caused by: java.lang.ClassNotFoundException: org.opencv.samples.tutorial1.Sample1Java

E/AndroidRuntime( 788): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)

E/AndroidRuntime( 788): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)

E/AndroidRuntime( 788): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)

E/AndroidRuntime( 788): at android.app.Instrumentation.newActivity(Instrumentation.java:1023)

E/AndroidRuntime( 788): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)

E/AndroidRuntime( 788): ... 11 more

Does anyone have any sugggestions? Thanks!