0

I am investigating about OpenCV for an image processing Android app. In the process, I came across the OpenCV manager as well. On the website, it is stated that:

OpenCV Manager is an Android service targeted to manage OpenCV library binaries on end users devices. It allows sharing the OpenCV dynamic libraries between applications on the same device.

So, my understanding is that one can build Android apps that use OpenCV but don't require OpenCV manager to be installed. Am I correct? My confusion originates from the fact that I came across some amateur apps on the Play store that require OpenCV manager.

If not necessary, is it preferable (for performance maybe) to have your OpenCv Andorid app to require OpenCV manager to be installed on the user's device?

Zhubarb
  • 11,432
  • 18
  • 75
  • 114
  • visit http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html#application-development-with-static-initialization – Jitesh Upadhyay Feb 11 '14 at 10:25
  • `...all OpenCV binaries are included into your application package. It is designed mostly for development purposes. This approach is deprecated for the production code, release package is recommended to communicate with OpenCV Manager via the async initialization described above.` So, the release package requires OpenCV on the device? I am new to Android development and will go the OpenCV route and read all tutorials if someone could confirm that the app user need not have OpenCV manager (approx 6.5 MB) installed on the device. – Zhubarb Feb 11 '14 at 10:36
  • 2
    please read my answer at http://stackoverflow.com/questions/20259309/how-to-integrate-opencv-manager-in-android-app/20259621#20259621 – Chintan Rathod Feb 11 '14 at 11:08
  • @Chintan Rathod, thank you very much and sorry for not seeing your response earlier. So, it is possible to make the app not require the manager! One thing I saw people say is that it increases the app size. Are there any disadvantages to it? Is it advisable? – Zhubarb Feb 11 '14 at 11:13
  • 1
    @Zhubarb what i understand with user's point of view is that they will not going to download any dependency themselves if you provide. They will ignore it to download. That was first reason. Second is if you provide dependency to download manager, it will also get increase size on disk ( your app + manager ). Third. It will not increase size so much high because, those libraries are `.so` files which are already compact version. I will just suggest that, you will go for using libraries inside app without any problem of increasing size of application. If will provide great user experience. :) – Chintan Rathod Feb 11 '14 at 11:16
  • @Chintan Rathod, Great! that was what I wanted to hear. So, you suggest that it is actually better to go the Static Initialization of OpenCV route. If you could copy paste your two comments as the answer, I will happily accept it (and link it to your original answer.) – Zhubarb Feb 11 '14 at 11:20
  • alternate answer with screenshots: made for novices: http://stackoverflow.com/a/35135495/5611377 – ssimm May 14 '16 at 12:03

2 Answers2

2

Here I have given the answer to your question. Please read.

How to integrate OpenCV Manager in Android App

One thing I saw people say is that it increases the app size. Are there any disadvantages to it? Is it advisable?

I understand with user's point of view is that

  1. they will not going to download any dependency themselves if you provide. They will ignore it to download. That was first reason.
  2. Second is if you provide dependency to download manager, it will also get increase size on disk ( your app + manager ).
  3. Third. It will not increase size so much high because, those libraries are .so files which are already compact version.

I will just suggest that, you will go for using libraries inside app without any problem of increasing size of application. It will provide great user experience. :)

Community
  • 1
  • 1
Chintan Rathod
  • 25,864
  • 13
  • 83
  • 93
1

Both "static initialization" and using OpenCV Manager have advantages/disadvantages. So quite a few things can be added to Chintan Rathod's answer.

OpenCV Manager advantages:

  • If you have several OpenCV based apps, they will actually occupy less space, rough example:

    • app-size = 500K; opencv-library-size = 5MB; X = 2;

    • app + manager or app + static-opencv is roughly the same size, unlike what it was said.

    • X apps space with OpenCV Manager: X * app-size + manager-size = 6MB;

    • X apps space without Manager: X * (app-size + opencv-library-size) = 11MB;

  • When a new OpenCV version gets released, all it is needed for all the opencv apps to start using the new version (assuming no compatibility problems) is one simple Play Store update for OpenCV Manager made by the user. Otherwise apps are only updated if its developer submits an updated version to the Play store; this means all opencv apps need to be updated.

  • It is the easiest way to get started and the OpenCV developers recommended way.

OpenCV Manager disadvantages:

  • The first time the user installs an OpenCV based app, it will prompt the user to download the OpenCV Manager. This will happen once.
  • User might say no to that prompt, app will not work but he will be prompted again.
Rui Marques
  • 8,567
  • 3
  • 60
  • 91
  • Thanks for good explanation , So from now its compulsory for the user to download OpenCV manager for using our applications ? even if we use static way ? – ARG Mar 16 '15 at 23:33
  • if the user updates the version of opencv the app might stop working, no? for example, opencv 3 is completely different from opencv2. On my opinion, I prefer to use static initialization, especially not to bother the user with the installation of openCV Manager. – mlg May 08 '16 at 20:41