Ask Your Question
0

Android async initialization problem

asked Sep 12 '13

advdk gravatar image

updated Sep 16 '13

Hi,

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.

Update:

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.

Preview: (hide)

Comments

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

Moster gravatar imageMoster (Sep 13 '13)edit

2 answers

Sort by » oldest newest most voted
1

answered Sep 13 '13

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.

Preview: (hide)

Comments

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: http://opencv.org/downloads.html

Moster gravatar imageMoster (Sep 13 '13)edit

Thanks for your responses. Please see the Update above.

advdk gravatar imageadvdk (Sep 16 '13)edit

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

Moster gravatar imageMoster (Sep 16 '13)edit
0

answered Sep 17 '13

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.

Preview: (hide)

Question Tools

2 followers

Stats

Asked: Sep 12 '13

Seen: 870 times

Last updated: Sep 17 '13