Ask Your Question

Android async initialization problem

asked 2013-09-12 08:56:56 -0500

advdk gravatar image

updated 2013-09-16 04:42:08 -0500


I try to use the recommended asynchronous initialization with OpenCV Manager. I follow this tutorial.

However, the callback onManagerConnected() seems to be never called. My application has several text controls, a touch event and a camera preview (I access the camera by standard Android API, not by OpenCV methods) When the application is started the initAsync() method (called in onResume()) returns true and then the whole UI except the camera preview freezes immediately. The behaviour of camera preview is random - sometimes it runs correctly, sometimes it does not appear at all.

Everything worked fine several days ago, and the problem appeared, when I reverted from some minor unsuccessful changes (unrelated with OpenCV) in Git. I also have similar problems with OCV samples provided with the library - onManagerConnected() is never called.

I use Android v4.0.3 (API 15), OpenCV4Andorid v2.4.6.2 rev 2 on HTC Evo3D. I'd like to be more specific about the issue, but I have no idea what else can be important.

Please help.


I switched back to OpenCV 2.4.5 but it doesn't work either. Could it be the issue with OpenCV Manager, like Moster suggests? Can I get an older version of OpenCV Manager?

There is only the latest version available on Play Store. I tried to uninnstall OCV manager from my device and run my application with OCV 2.4.5 version loaded. Then I get an usual prompt to install OCV Manager on my device, I accept it, but all I can get is still the same version (2.10) of the Manager.

edit retag flag offensive close merge delete


Wasnt there an update on the opencv manager? Maybe this fucked it up

Moster gravatar imageMoster ( 2013-09-13 12:30:56 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-09-13 12:36:38 -0500

It looks like some issue of new version of OpenCV. We've got several bug reports about hanging. I create issue on bug tracker. OpenCV dev team works on this. Manager will be updated ASAP.

edit flag offensive delete link more


A solution for the moment would be to use an old version of the manager. You could get it by downloading some 2.4.5 package from here:

Moster gravatar imageMoster ( 2013-09-13 12:40:45 -0500 )edit

Thanks for your responses. Please see the Update above.

advdk gravatar imageadvdk ( 2013-09-16 04:43:16 -0500 )edit

Use an old opencv package. They include old opencv managers for the different cpu abis.

Moster gravatar imageMoster ( 2013-09-16 13:48:48 -0500 )edit

answered 2013-09-17 02:33:36 -0500

advdk gravatar image

Finally it works. It really was the issue with OpenCV Manager. I loaded OpenCV version 2.4.5 and installed the manager from .apk provided with library. Thank you for your help.

edit flag offensive delete link more

Question Tools



Asked: 2013-09-12 08:56:56 -0500

Seen: 696 times

Last updated: Sep 17 '13