Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Trying to run OpenCV samples on Samsung Galaxy S4: dark screen

I am trying to run OpenCV samples from Eclipse on a brand new Samsung Galaxy S4. I tried a couple of them: 15-puzzle, face detection and image manipulation, and in all cases the behavior is the same: the app seems to be running, since I get each sample's menu, but the screen is dark. Did not see any error messages in logcat or console when I launched them. Do I need to change certain settings of the project and/or on the device?

Thanks

Trying to run OpenCV samples on Samsung Galaxy S4: dark screen

I am trying to run OpenCV samples from Eclipse on a brand new Samsung Galaxy S4. I tried a couple of them: 15-puzzle, face detection and image manipulation, and in all cases the behavior is the same: the app seems to be running, since I get each sample's menu, but the screen is dark. Did not see any error messages in logcat or console when I launched them. Do I need to change certain settings of the project and/or on the device?

Thanks

Here's logcat dump:

D/CameraBridge(9347): call surfaceChanged event
I/OCVSample::Activity(9347): called onCreateOptionsMenu
I/OCVSample::Activity(9347): called onOptionsItemSelected; selected item: Canny
W/Choreographer(9347): Already have a pending vsync event.  There should only be one at a time.
E/ViewRootImpl(9347): sendUserActionEvent() mView == null
W/IInputConnectionWrapper(9347): showStatusIcon on inactive InputConnection
E/ActivityThread(9347): Activity      org.opencv.samples.imagemanipulations.ImageManipulationsActivity has leaked ServiceConnection org.opencv.android.AsyncServiceHelper$1@42d8bcb8 that was originally bound here
E/ActivityThread(9347): android.app.ServiceConnectionLeaked: Activity org.opencv.samples.imagemanipulations.ImageManipulationsActivity has leaked ServiceConnection org.opencv.android.AsyncServiceHelper$1@42d8bcb8 that was originally bound here
E/ActivityThread(9347):     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:979)
E/ActivityThread(9347):     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:873)
E/ActivityThread(9347):     at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:1818)
E/ActivityThread(9347):     at android.app.ContextImpl.bindService(ContextImpl.java:1806)
E/ActivityThread(9347):     at android.content.ContextWrapper.bindService(ContextWrapper.java:503)
E/ActivityThread(9347):     at org.opencv.android.AsyncServiceHelper.initOpenCV(AsyncServiceHelper.java:24)
E/ActivityThread(9347):     at org.opencv.android.OpenCVLoader.initAsync(OpenCVLoader.java:60)
E/ActivityThread(9347):     at org.opencv.samples.imagemanipulations.ImageManipulationsActivity.onResume(ImageManipulationsActivity.java:114)
E/ActivityThread(9347):     at    android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1209)
E/ActivityThread(9347):     at android.app.Activity.performResume(Activity.java:5450)
E/ActivityThread(9347):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2909)
E/ActivityThread(9347):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2948)
E/ActivityThread(9347):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
E/ActivityThread(9347):     at android.os.Handler.dispatchMessage(Handler.java:99)
E/ActivityThread(9347):     at android.os.Looper.loop(Looper.java:137)
E/ActivityThread(9347):     at android.app.ActivityThread.main(ActivityThread.java:5419)
E/ActivityThread(9347):     at java.lang.reflect.Method.invokeNative(Native Method)
E/ActivityThread(9347):     at java.lang.reflect.Method.invoke(Method.java:525)
E/ActivityThread(9347):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
E/ActivityThread(9347):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E/ActivityThread(9347):     at dalvik.system.NativeStart.main(Native Method)

Trying to run OpenCV samples on Samsung Galaxy S4: dark screen

I am trying to run OpenCV samples from Eclipse on a brand new Samsung Galaxy S4. I tried a couple of them: 15-puzzle, face detection and image manipulation, and in all cases the behavior is the same: the app seems to be running, since I get each sample's menu, but the screen is dark. Did not see any error messages in logcat or console when I launched them. Do I need to change certain settings of the project and/or on the device?

Thanks

Here's logcat dump:UPDATE: Just tried image manipulation on S3 (Android 4.1.3) and it seems to be working fine, or at least it's not giving me the dark screen. So does look like some sort of problem with the S4 device and/or with Android 4.3.

D/CameraBridge(9347): call surfaceChanged event
I/OCVSample::Activity(9347): called onCreateOptionsMenu
I/OCVSample::Activity(9347): called onOptionsItemSelected; selected item: Canny
W/Choreographer(9347): Already have a pending vsync event.  There should only be one at a time.
E/ViewRootImpl(9347): sendUserActionEvent() mView == null
W/IInputConnectionWrapper(9347): showStatusIcon on inactive InputConnection
E/ActivityThread(9347): Activity      org.opencv.samples.imagemanipulations.ImageManipulationsActivity has leaked ServiceConnection org.opencv.android.AsyncServiceHelper$1@42d8bcb8 that was originally bound here
E/ActivityThread(9347): android.app.ServiceConnectionLeaked: Activity org.opencv.samples.imagemanipulations.ImageManipulationsActivity has leaked ServiceConnection org.opencv.android.AsyncServiceHelper$1@42d8bcb8 that was originally bound here
E/ActivityThread(9347):     at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:979)
E/ActivityThread(9347):     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:873)
E/ActivityThread(9347):     at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:1818)
E/ActivityThread(9347):     at android.app.ContextImpl.bindService(ContextImpl.java:1806)
E/ActivityThread(9347):     at android.content.ContextWrapper.bindService(ContextWrapper.java:503)
E/ActivityThread(9347):     at org.opencv.android.AsyncServiceHelper.initOpenCV(AsyncServiceHelper.java:24)
E/ActivityThread(9347):     at org.opencv.android.OpenCVLoader.initAsync(OpenCVLoader.java:60)
E/ActivityThread(9347):     at org.opencv.samples.imagemanipulations.ImageManipulationsActivity.onResume(ImageManipulationsActivity.java:114)
E/ActivityThread(9347):     at    android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1209)
E/ActivityThread(9347):     at android.app.Activity.performResume(Activity.java:5450)
E/ActivityThread(9347):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2909)
E/ActivityThread(9347):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2948)
E/ActivityThread(9347):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
E/ActivityThread(9347):     at android.os.Handler.dispatchMessage(Handler.java:99)
E/ActivityThread(9347):     at android.os.Looper.loop(Looper.java:137)
E/ActivityThread(9347):     at android.app.ActivityThread.main(ActivityThread.java:5419)
E/ActivityThread(9347):     at java.lang.reflect.Method.invokeNative(Native Method)
E/ActivityThread(9347):     at java.lang.reflect.Method.invoke(Method.java:525)
E/ActivityThread(9347):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
E/ActivityThread(9347):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
E/ActivityThread(9347):     at dalvik.system.NativeStart.main(Native Method)