7

In my android application, i use static loading of OpenCV library i.e

OpenCVLoader.initDebug()

it will return true when run on emulator, but return false when run on (mobile) device.

if i use

OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_3, this, mLoaderCallback)

if OpenCV manager .apk alredy installed,then above code work fine in emulator and device. here i want run openCV realted app, with out intall OpenCV manager.apk.

please help me. thanks in advance.

  • possible duplicate of [How to integrate OpenCV Manager in Android App](http://stackoverflow.com/questions/20259309/how-to-integrate-opencv-manager-in-android-app) – kiranpradeep May 04 '15 at 04:45
  • Alternate answer: http://stackoverflow.com/a/35135495/5611377 – ssimm May 14 '16 at 12:05

2 Answers2

4

Ok what you are talking is Static initialization of the OpenCV library.

See this Official Opencv help regarding this matter.

Also have a look at these StackOverflow topic and try compiling your code.

Cheers.

BlueSword
  • 1,290
  • 12
  • 25
  • 1
    OpenCV related app is working fine with OpoenCV manager .apk , but i want without OpenCVmanager.apk. i said that **"without OpenCVManager.apk , my app is running fine in emulator, but in the device it gives 'forceclose error'"**. – challa sathish kumar Jan 08 '14 at 09:20
  • @sathishkumar.challa did you read the [Link1](http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html#application-development-with-static-initialization) completely ? Please do read every line; your answer is within that doc. ie.- w/o using Opencv manager. – BlueSword Jan 08 '14 at 09:26
  • Thank you very much, i got the solution (i.e in previous i did not copy the libs all files from native folder). – challa sathish kumar Jan 08 '14 at 09:42
0

For the Android Studio users out there, I made a blog post detailing what I did to get around the OpenCV Manager App Installation prompt:

http://usefuljavanotes.weebly.com/blog/how-to-use-opencv-without-opencv-manager

Here is a GitHub repo that includes the code I implemented in the blog post. Feel free to download it and test it on your system:

https://github.com/JamieLee629/OpenCVTest

The other OpenCV parts of the code not mentioned in the blog post were courtesy of Code Onion Blog:

http://blog.codeonion.com/2016/04/09/show-camera-on-android-app-using-opencv-for-android/

I compiled this answer using these sources: https://stackoverflow.com/a/45684065/6030520, https://stackoverflow.com/a/35135495/6030520, https://stackoverflow.com/a/20259621/6030520

Jamie
  • 397
  • 3
  • 11