OpenCV Android camera app running problem

asked 2013-08-20 05:15:55 -0500

Honer gravatar image

updated 2013-08-20 06:10:27 -0500

I just started another camera app based on OpenCV while running an OpenCV camera app yet on Android,and then have a problem.

First,I started an OpenCV camera app (App-One) on my Android device, and it working fine, everything was OK. Then, I started an other OpenCV camera app (App-Two) on my Android device, and it working fine too, the App-One was Pause, but no quit. Finally, I quit the App-Two, and the system return me to App-One.

Everything sounds OK,but when I return to App-One, I found it(App-One) was not working, and there is a dialog says "It seems that you device does not support camera (or it is locked). Application will be closed."

I had started the App-One,and it was OK. But I just open an other ,and return to App-One,it tell me is not OK. How do I solve this?

T_T Help me.

edit retag flag offensive close merge delete

Comments

1

May you do not correctly disable the view/camera when the app is paused?

Moster gravatar imageMoster ( 2013-08-20 06:11:23 -0500 )edit

Like @Moster said, when switching apps, you should manually delete the VideoCapture object, to make sure that your camera is released, then recreate the camera capture once it is recreated. Else your first app will keep working in the background, which it should not do.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-08-20 06:17:59 -0500 )edit