Ask Your Question
4

Building Android Manager from git repository

asked 2012-11-02 10:38:25 -0600

Simone gravatar image

updated 2012-11-02 11:04:25 -0600

Hello, I'm upgrading to the new version of OCV4Android and I see that now the library are managed in a different way with the OpenCv Library Manager and I understand the benefits of it. My device cannot connect to the Internet neither have google play so i guess i should proceed as described here

adb install OpenCV_2.4.2_Manager.apk
adb install OpenCV_2.4.2_binary_pack_armv7a.apk

My question is: say that I want to compile my own version of OpenCV4Android (eg using always the latest version from the repository or change something in the code), how can I generate the above Manager.apk and binarypack.apk? I successfully followed the instruction from here to compile the code but I cannot find those apk. Yet I can see the source code of the manager in the service folder. Is there any documentation about it somewhere?

Thank you!

Simone

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
4

answered 2012-11-02 14:00:47 -0600

Kirill Kornyakov gravatar image

This is duplicate of http://answers.opencv.org/question/3464, but it seems that we have to give the full explanation...

OpenCV Manager is the way of distributing the official OpenCV. It is reliable, binary compatible, hardware accelerated and so on and so forth. Some optimizations are closed-source, but included into the binaries on Google Play. That means that nobody except the official OpenCV team needs to build the OpenCV Manager. If you're changing something in OpenCV, it is actually not OpenCV, but OpenCV' :) So, if you really need to change something in OpenCV, you're actually creating your own library. And you can do whatever you want with it. You can link it statically, dynamically, but you'd better give it another name.

If you want to experiment with the library - try to use static initialization. This will help you to play with your own OpenCV build, but without building OpenCV Manager. Anyway, I would suggest you to create another library and use it as other C++ libraries on Android. Another way, if you want to contribute something to OpenCV for Android, make a pull request, and if your stuff is good, it will be added to the official version on Google Play.

So, you will never get instructions on how to build OpenCV Manager, simply because this is pointless activity. The only case you need to build the Manager, is if you want to help us develop it (as I mentioned, you can develop OpenCV without OpenCV Manager). But this is completely different story :)

edit flag offensive delete link more

Comments

Hi Kiril and thank you very much for your answer. Ok i get that i don't need to build the Manager, i can use the one from the binary build. And I have been perfectly fine so far working with static initialization of the library. On the other hand, since I'm working with several applications, all using the my own build of OpenCV, I was wondering if i can switch to the Manager way of handling the library with my own build, provided that the Manager can handle that. Therefore, just for the sake of the argument, what should I do to generate my apk? Shall i do a make install when building or what?

Thanks!

S.

Simone gravatar imageSimone ( 2012-11-02 18:36:06 -0600 )edit

PS My apps are just for research purpose, there won't be anything commercial or public (at least for the moment), so I don't think it's necessary to change the name to avoid any sort of conflicts with the "official" libraries.

Simone gravatar imageSimone ( 2012-11-02 18:37:28 -0600 )edit
1

answered 2015-01-01 04:16:36 -0600

shridutt kothari gravatar image

You can build your own OpenCV Manager with following steps:

1.First download and build OpenCV, using appropriate script from https://github.com/jayrambhia/Install... 2. Download android ndk and set ANDROID_NDK="your_NDK_directory" 3. Download android sdk and set ANDROID_SDK="your_SDK_directory" 4. Download Android source code and compile it as mentioned on https://source.android.com/source/ini... 5. Set -DANDROID_SOURCE="your_android__source_directory" in your_opencv_directory/platforms/scripts/cmake_android_service.sh 6. sh your_opencv_directory/platforms/scripts/cmake_android_service.sh 7. cd your_opencv_directory/platforms/build_android_service 8. make -j4

If you don't get any dependency issue, you will find OpenCVManager at your_opencv_directory/platforms/build_android_service/bin/opencv_engine.apk

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-11-02 10:38:25 -0600

Seen: 1,753 times

Last updated: Nov 02 '12