Permalink
Browse files

merged Android Manager and new java layout

  • Loading branch information...
1 parent 680a441 commit 01570fa8006c5e2047e8fba563628afc07a2f058 Marina Kolpakova committed Jun 28, 2012
Showing with 34,149 additions and 113 deletions.
  1. +10 −0 CMakeLists.txt
  2. +2 −0 android/package/CMakeLists.txt
  3. +1 −0 android/package/info_lib/CMakeLists.txt
  4. +17 −0 android/package/info_lib/jni/Android.mk
  5. +2 −0 android/package/info_lib/jni/Application.mk
  6. +3 −0 android/package/info_lib/jni/include/info.h
  7. +31 −0 android/package/info_lib/jni/include/info_jni.h
  8. +18 −0 android/package/info_lib/jni/src/info.c
  9. +8 −0 android/refman.rst
  10. +8 −0 android/scripts/cmake_android_service.sh
  11. +2 −0 android/service/CMakeLists.txt
  12. +22 −0 android/service/ReadMe.txt
  13. BIN android/service/doc/AndroidAppUsageModel.dia
  14. +26 −0 android/service/doc/AsyncServiceHelper.rst
  15. +14 −0 android/service/doc/BaseLoaderCallback.rst
  16. +54 −0 android/service/doc/IOpenCVEngine.rst
  17. +35 −0 android/service/doc/InstallCallbackInterface.rst
  18. +37 −0 android/service/doc/Intro.rst
  19. +54 −0 android/service/doc/JavaHelper.rst
  20. BIN android/service/doc/LibInstallAproved.dia
  21. BIN android/service/doc/LibInstallCanceled.dia
  22. BIN android/service/doc/LibInstalled.dia
  23. +56 −0 android/service/doc/LoaderCallbackInterface.rst
  24. +89 −0 android/service/doc/Makefile
  25. +5 −0 android/service/doc/NativeHelper.rst
  26. BIN android/service/doc/NoService.dia
  27. +57 −0 android/service/doc/OpenCVEngineInterface.rst
  28. +24 −0 android/service/doc/StaticHelper.rst
  29. BIN android/service/doc/Structure.dia
  30. +29 −0 android/service/doc/UseCases.rst
  31. +23 −0 android/service/doc/build_uml.py
  32. BIN android/service/doc/img/AndroidAppUsageModel.dia.png
  33. BIN android/service/doc/img/LibInstallAproved.dia.png
  34. BIN android/service/doc/img/LibInstallCanceled.dia.png
  35. BIN android/service/doc/img/LibInstalled.dia.png
  36. BIN android/service/doc/img/LibIntsallAproved.dia.png
  37. BIN android/service/doc/img/LibIntsallCanceled.dia.png
  38. BIN android/service/doc/img/NoService.dia.png
  39. BIN android/service/doc/img/Structure.dia.png
  40. +15 −0 android/service/doc/index.rst
  41. +8 −0 android/service/engine/.classpath
  42. +33 −0 android/service/engine/.project
  43. +27 −0 android/service/engine/AndroidManifest.xml
  44. +37 −0 android/service/engine/CMakeLists.txt
  45. +78 −0 android/service/engine/jni/Android.mk
  46. +5 −0 android/service/engine/jni/Application.mk
  47. +74 −0 android/service/engine/jni/BinderComponent/BnOpenCVEngine.cpp
  48. +21 −0 android/service/engine/jni/BinderComponent/BnOpenCVEngine.h
  49. +71 −0 android/service/engine/jni/BinderComponent/BpOpenCVEngine.cpp
  50. +20 −0 android/service/engine/jni/BinderComponent/BpOpenCVEngine.h
  51. +179 −0 android/service/engine/jni/BinderComponent/HardwareDetector.cpp
  52. +35 −0 android/service/engine/jni/BinderComponent/HardwareDetector.h
  53. +225 −0 android/service/engine/jni/BinderComponent/OpenCVEngine.cpp
  54. +38 −0 android/service/engine/jni/BinderComponent/OpenCVEngine.h
  55. +31 −0 android/service/engine/jni/BinderComponent/ProcReader.cpp
  56. +27 −0 android/service/engine/jni/BinderComponent/ProcReader.h
  57. +93 −0 android/service/engine/jni/BinderComponent/StringUtils.cpp
  58. +13 −0 android/service/engine/jni/BinderComponent/StringUtils.h
  59. +53 −0 android/service/engine/jni/BinderComponent/TegraDetector.cpp
  60. +9 −0 android/service/engine/jni/BinderComponent/TegraDetector.h
  61. +25 −0 android/service/engine/jni/JNIWrapper/HardwareDetector_jni.cpp
  62. +48 −0 android/service/engine/jni/JNIWrapper/HardwareDetector_jni.h
  63. +176 −0 android/service/engine/jni/JNIWrapper/JavaBasedPackageManager.cpp
  64. +22 −0 android/service/engine/jni/JNIWrapper/JavaBasedPackageManager.h
  65. +70 −0 android/service/engine/jni/JNIWrapper/OpenCVEngine_jni.cpp
  66. +37 −0 android/service/engine/jni/JNIWrapper/OpenCVEngine_jni.h
  67. +42 −0 android/service/engine/jni/NativeClient/ClientMain.cpp
  68. +186 −0 android/service/engine/jni/NativeService/CommonPackageManager.cpp
  69. +34 −0 android/service/engine/jni/NativeService/CommonPackageManager.h
  70. +19 −0 android/service/engine/jni/NativeService/NativePackageManager.cpp
  71. +16 −0 android/service/engine/jni/NativeService/NativePackageManager.h
  72. +391 −0 android/service/engine/jni/NativeService/PackageInfo.cpp
  73. +52 −0 android/service/engine/jni/NativeService/PackageInfo.h
  74. +32 −0 android/service/engine/jni/NativeService/ServiceMain.cpp
  75. +155 −0 android/service/engine/jni/Tests/HardwareDetectionTest.cpp
  76. +101 −0 android/service/engine/jni/Tests/OpenCVEngineTest.cpp
  77. +127 −0 android/service/engine/jni/Tests/PackageInfoTest.cpp
  78. +18 −0 android/service/engine/jni/Tests/PackageManagerStub.cpp
  79. +17 −0 android/service/engine/jni/Tests/PackageManagerStub.h
  80. +100 −0 android/service/engine/jni/Tests/PackageManagmentTest.cpp
  81. +8 −0 android/service/engine/jni/Tests/TestMain.cpp
  82. +43 −0 android/service/engine/jni/Tests/Tests.mk
  83. +9,118 −0 android/service/engine/jni/Tests/gtest/gtest-all.cpp
  84. +19,537 −0 android/service/engine/jni/Tests/gtest/gtest.h
  85. +12 −0 android/service/engine/jni/include/EngineCommon.h
  86. +34 −0 android/service/engine/jni/include/IOpenCVEngine.h
  87. +17 −0 android/service/engine/jni/include/IPackageManager.h
  88. 0 modules/java/config/nonfree.filelist → android/service/engine/jni/include/OpenCVEngineHelper.h
  89. BIN android/service/engine/res/drawable/icon.png
  90. +61 −0 android/service/engine/res/layout/info.xml
  91. +119 −0 android/service/engine/res/layout/main.xml
  92. +4 −0 android/service/engine/res/values/strings.xml
  93. +26 −0 android/service/engine/src/org/opencv/engine/BinderConnector.java
  94. +46 −0 android/service/engine/src/org/opencv/engine/HardwareDetector.java
  95. +121 −0 android/service/engine/src/org/opencv/engine/MarketConnector.java
  96. +33 −0 android/service/engine/src/org/opencv/engine/OpenCVEngineInterface.aidl
  97. +42 −0 android/service/engine/src/org/opencv/engine/OpenCVEngineService.java
  98. +52 −0 android/service/engine/src/org/opencv/engine/manager/HardwareDetector.java
  99. +312 −0 android/service/engine/src/org/opencv/engine/manager/ManagerActivity.java
  100. +16 −0 android/service/engine/src/org/opencv/engine/manager/OpenCVPackageInfo.java
  101. +10 −0 android/service/engine_test/.classpath
  102. +34 −0 android/service/engine_test/.project
  103. +20 −0 android/service/engine_test/AndroidManifest.xml
  104. BIN android/service/engine_test/res/drawable-hdpi/ic_launcher.png
  105. BIN android/service/engine_test/res/drawable-ldpi/ic_launcher.png
  106. BIN android/service/engine_test/res/drawable-mdpi/ic_launcher.png
  107. +12 −0 android/service/engine_test/res/layout/main.xml
  108. +7 −0 android/service/engine_test/res/values/strings.xml
  109. +65 −0 android/service/engine_test/src/org/opencv/engine/test/EngineInterfaceTest.java
  110. +21 −0 android/service/push_native.py
  111. +32 −0 android/service/test_native.py
  112. +23 −4 cmake/OpenCVDetectAndroidSDK.cmake
  113. +113 −9 doc/tutorials/introduction/android_binary_package/android_binary_package.rst
  114. +1 −0 index.rst
  115. +21 −20 modules/java/CMakeLists.txt
  116. 0 modules/java/{android → android_lib}/.classpath
  117. +1 −1 modules/java/{android → android_lib}/.project
  118. +2 −2 modules/java/{android → android_lib}/AndroidManifest.xml
  119. 0 modules/java/{android → android_lib}/jni/Android.mk
  120. 0 modules/java/{android → android_lib}/jni/Application.mk
  121. +3 −1 modules/java/android_test/src/org/opencv/test/OpenCVTestRunner.java
  122. +0 −2 modules/java/config/core.filelist
  123. +0 −1 modules/java/config/features2d.filelist
  124. +2 −0 modules/java/generator/config/core.filelist
  125. +1 −0 modules/java/generator/config/features2d.filelist
  126. 0 modules/java/generator/config/nonfree.filelist
  127. +6 −6 modules/java/{ → generator}/gen_java.py
  128. +2 −2 modules/java/{ → generator}/gen_javadoc.py
  129. +4 −4 modules/java/{ → generator}/rst_parser.py
  130. 0 modules/java/{ → generator}/src/cpp/Mat.cpp
  131. 0 modules/java/{ → generator}/src/cpp/VideoCapture.cpp
  132. 0 modules/java/{ → generator}/src/cpp/converters.cpp
  133. 0 modules/java/{ → generator}/src/cpp/converters.h
  134. 0 modules/java/{ → generator}/src/cpp/core_manual.hpp
  135. 0 modules/java/{ → generator}/src/cpp/features2d_manual.hpp
  136. 0 modules/java/{ → generator}/src/cpp/jni_part.cpp
  137. 0 modules/java/{ → generator}/src/cpp/utils.cpp
  138. +279 −0 modules/java/generator/src/java/android+AsyncServiceHelper.java
  139. +126 −0 modules/java/generator/src/java/android+BaseLoaderCallback.java
  140. +21 −0 modules/java/generator/src/java/android+InstallCallbackInterface.java
  141. +44 −0 modules/java/generator/src/java/android+LoaderCallbackInterface.java
  142. +41 −0 modules/java/generator/src/java/android+OpenCVLoader.java
  143. +89 −0 modules/java/generator/src/java/android+StaticHelper.java
  144. +0 −5 modules/java/{ → generator}/src/java/android+Utils.java
  145. +7 −0 modules/java/generator/src/java/android+sync.py
  146. 0 modules/java/{ → generator}/src/java/core+CvException.java
  147. 0 modules/java/{ → generator}/src/java/core+CvType.java
  148. +0 −7 modules/java/{ → generator}/src/java/core+Mat.java
  149. 0 modules/java/{ → generator}/src/java/core+MatOfByte.java
  150. 0 modules/java/{ → generator}/src/java/core+MatOfDMatch.java
  151. 0 modules/java/{ → generator}/src/java/core+MatOfDouble.java
  152. 0 modules/java/{ → generator}/src/java/core+MatOfFloat.java
  153. 0 modules/java/{ → generator}/src/java/core+MatOfFloat4.java
  154. 0 modules/java/{ → generator}/src/java/core+MatOfFloat6.java
  155. 0 modules/java/{ → generator}/src/java/core+MatOfInt.java
  156. 0 modules/java/{ → generator}/src/java/core+MatOfInt4.java
  157. 0 modules/java/{ → generator}/src/java/core+MatOfKeyPoint.java
  158. 0 modules/java/{ → generator}/src/java/core+MatOfPoint.java
  159. 0 modules/java/{ → generator}/src/java/core+MatOfPoint2f.java
  160. 0 modules/java/{ → generator}/src/java/core+MatOfPoint3.java
  161. 0 modules/java/{ → generator}/src/java/core+MatOfPoint3f.java
  162. 0 modules/java/{ → generator}/src/java/core+MatOfRect.java
  163. 0 modules/java/{ → generator}/src/java/core+Point.java
  164. 0 modules/java/{ → generator}/src/java/core+Point3.java
  165. 0 modules/java/{ → generator}/src/java/core+Range.java
  166. 0 modules/java/{ → generator}/src/java/core+Rect.java
  167. 0 modules/java/{ → generator}/src/java/core+RotatedRect.java
  168. 0 modules/java/{ → generator}/src/java/core+Scalar.java
  169. 0 modules/java/{ → generator}/src/java/core+Size.java
  170. 0 modules/java/{ → generator}/src/java/core+TermCriteria.java
  171. +33 −0 modules/java/generator/src/java/engine+OpenCVEngineInterface.aidl
  172. 0 modules/java/{ → generator}/src/java/features2d+DMatch.java
  173. 0 modules/java/{ → generator}/src/java/features2d+KeyPoint.java
  174. +0 −6 modules/java/{ → generator}/src/java/highgui+VideoCapture.java
  175. +0 −6 modules/java/{ → generator}/src/java/utils+Converters.java
  176. +65 −19 samples/android/15-puzzle/src/org/opencv/samples/puzzle15/puzzle15Activity.java
  177. +1 −1 samples/android/face-detection/jni/Android.mk
  178. +55 −8 samples/android/face-detection/src/org/opencv/samples/fd/FdActivity.java
  179. +20 −9 ...oid/image-manipulations/src/org/opencv/samples/imagemanipulations/ImageManipulationsActivity.java
View
@@ -149,6 +149,8 @@ OCV_OPTION(BUILD_TESTS "Build accuracy & regression tests"
OCV_OPTION(BUILD_WITH_DEBUG_INFO "Include debug info into debug libs (not MSCV only)" ON )
OCV_OPTION(BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for staticaly linked OpenCV" ON IF MSVC )
OCV_OPTION(BUILD_FAT_JAVA_LIB "Create fat java wrapper containing the whole OpenCV library" ON IF ANDROID AND NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX )
+OCV_OPTION(BUILD_ANDROID_SERVICE "TBD" OFF IF ANDROID )
+OCV_OPTION(BUILD_ANDROID_PACKAGE "TBD" OFF IF ANDROID )
# 3rd party libs
OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 OR IOS OR APPLE )
@@ -417,6 +419,13 @@ if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES)
add_subdirectory(samples)
endif()
+if(BUILD_ANDROID_SERVICE)
+ add_subdirectory(android/service)
+endif()
+
+if(BUILD_ANDROID_PACKAGE)
+ add_subdirectory(android/package)
+endif()
# ----------------------------------------------------------------------------
# Finalization: generate configuration-based files
@@ -521,6 +530,7 @@ if(ANDROID)
endif()
status(" android tool:" ANDROID_EXECUTABLE THEN "${ANDROID_EXECUTABLE} (${ANDROID_TOOLS_Pkg_Desc})" ELSE NO)
status(" ant:" ANT_EXECUTABLE THEN "${ANT_EXECUTABLE} (ver ${ANT_VERSION})" ELSE NO)
+ status(" Build service:" BUILD_ANDROID_SERVICE THEN YES ELSE NO)
endif()
# ========================== GUI ==========================
@@ -0,0 +1,2 @@
+#tbd
+add_subdirectory(info_lib)
@@ -0,0 +1 @@
+#tbd
@@ -0,0 +1,17 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := \
+ src/info.c
+
+LOCAL_C_INCLUDES := \
+ $(LOCAL_PATH)/include \
+ $(TOP)/frameworks/base/core/jni
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_MODULE := libopencvinfo
+
+include $(BUILD_SHARED_LIBRARY)
@@ -0,0 +1,2 @@
+APP_ABI := armeabi-v7a x86
+APP_PLATFORM := android-8
@@ -0,0 +1,3 @@
+// Function return list of shared libs seporated with ";" symbol
+// in load order
+const char* GetLibraryList();
@@ -0,0 +1,31 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_opencv_android_OpenCVLoader */
+
+#ifndef _Included_org_opencv_android_OpenCVLoader
+#define _Included_org_opencv_android_OpenCVLoader
+#ifdef __cplusplus
+extern "C" {
+#endif
+#undef org_opencv_android_OpenCVLoader_Success
+#define org_opencv_android_OpenCVLoader_Success 0L
+#undef org_opencv_android_OpenCVLoader_NoService
+#define org_opencv_android_OpenCVLoader_NoService 1L
+#undef org_opencv_android_OpenCVLoader_RestartRequired
+#define org_opencv_android_OpenCVLoader_RestartRequired 2L
+#undef org_opencv_android_OpenCVLoader_MarketError
+#define org_opencv_android_OpenCVLoader_MarketError 3L
+#undef org_opencv_android_OpenCVLoader_InitFailed
+#define org_opencv_android_OpenCVLoader_InitFailed 255L
+/*
+ * Class: org_opencv_android_OpenCVLoader
+ * Method: GetLibraryList
+ * Signature: ()Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL Java_org_opencv_android_StaticHelper_getLibraryList
+ (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
@@ -0,0 +1,18 @@
+#include "info.h"
+#include <jni.h>
+
+#ifndef LIB_STRING
+ #define LIB_STRING "libtbb.so;libopencv_java.so"
+#endif
+
+const char* GetLibraryList()
+{
+ return LIB_STRING;
+}
+
+JNIEXPORT jstring JNICALL Java_org_opencv_android_StaticHelper_getLibraryList(JNIEnv* jenv, jclass clazz)
+{
+ jstring result = (*jenv)->NewStringUTF(jenv, LIB_STRING);
+
+ return result;
+}
View
@@ -0,0 +1,8 @@
+############################
+OpenCV4Android Reference
+############################
+
+.. toctree::
+ :maxdepth: 2
+
+ service/doc/index.rst
@@ -0,0 +1,8 @@
+#!/bin/sh
+cd `dirname $0`/..
+
+mkdir -p build_service
+cd build_service
+
+cmake -DCMAKE_TOOLCHAIN_FILE=../android.toolchain.cmake -DANDROID_USE_STLPORT=ON -DBUILD_ANDROID_SERVICE=ON -DANDROID_SOURCE_TREE=~/Projects/AndroidSource/2.2.2/ $@ ../..
+
@@ -0,0 +1,2 @@
+add_subdirectory(engine)
+#add_subdirectory(engine_test)
@@ -0,0 +1,22 @@
+***************
+Package Content
+***************
+
+The package provides new OpenCV SDK that uses OpenCV Manager for library initialization. OpenCV Manager provides the following benefits:
+
+* Less memory usage. All apps use the same binaries from service and do not keep native libs inside them self;
+* Hardware specific optimizations for all supported platforms;
+* Trusted OpenCV library source. All packages with OpenCV are published on Google Play service;
+* Regular updates and bug fixes;
+
+Package consists from Library Project for Java development with Eclipse, C++ headers and libraries for native application development, javadoc samples and prebuilt binaries for ARM and X86 platforms.
+To try new SDK on serial device with Google Play just install sample package and follow application messages (Google Play service access will be needed).
+TO start example on device without Google Play you need to install OpenCV manager package and OpenCV binary pack for your platform from apk folder before.
+See docs/doc/tutorials/introduction/android_binary_package/android_binary_package.html and docs/android/refmain.html for details about service.
+On-line documentation will be available at address: http://docs.opencv.org/trunk
+
+********
+Contacts
+********
+
+Please send all feedback to Alexander Smorkalov mailto: alexander.smorkalov@itseez.com
Binary file not shown.
@@ -0,0 +1,26 @@
+*******************************************
+Java Asynchronious OpenCV Helper (internal)
+*******************************************
+
+.. highlight:: java
+.. module:: org.opencv.android
+ :platform: Android
+ :synopsis: Implements Android dependent Java classes
+.. Class:: AsyncServiceHelper
+
+Helper class provides implementation of asynchronious OpenCV initialization with Android OpenCV Engine Service.
+
+.. note:: This is imternal class. Does not use it directly. Use OpenCVLoader.initAsync() instead!
+
+int initOpenCV()
+----------------
+
+.. method:: int initOpenCV(String Version, Context AppContext, LoaderCallbackInterface Callback)
+
+ Tries to init OpenCV library using OpenCV Engine Service. Callback method will be called, when initialisation finishes
+
+ :param Version: Version of OpenCV
+ :param AppContext: Application context for service connection
+ :param CallBack: Object that implements LoaderCallbackInterface. See Helper callback interface
+ :rtype: boolean
+ :return: Return true if initialization starts successfully
@@ -0,0 +1,14 @@
+*********************************************
+Base Loader Callback Interface implementation
+*********************************************
+
+.. highlight:: java
+.. module:: org.opencv.android
+ :platform: Android
+ :synopsis: Implements OpenCV initialization callback interface.
+.. class:: BaseLoaderCallback
+
+ Basic implementation of LoaderCallbackInterface. Implementation logic is described by diagram.
+
+.. image:: img/AndroidAppUsageModel.dia.png
+
@@ -0,0 +1,54 @@
+***************************************
+Native OpenCV Manager service interface
+***************************************
+
+.. highlight:: cpp
+.. module:: IOpenCVEngine.h
+ :platform: Android
+ :synopsis: Defines OpenCV Manager interface for Android Binder component
+.. Class:: OpenCVEngine
+
+OpenCVEngine class provides Binder interface to OpenCV Manager Service
+
+int getEngineVersion()
+----------------------
+
+.. method:: int GetEngineVersion()
+
+ Gets OpenCV Manager version
+
+ :rtype: int
+ :return: Returns OpenCV Manager version
+
+android::String16 getLibPathByVersion()
+---------------------------------------
+
+.. method:: android::String16 GetLibPathByVersion(android::String16 version)
+
+ Gets path to native OpenCV libraries
+
+ :param version: OpenCV Library version
+ :rtype: String;
+ :return: Returns path to OpenCV native libs or empty string if OpenCV was not found
+
+android::String16 getLibraryList()
+----------------------------------
+
+.. method:: android::String16 GetLibraryList(android::String16 version)
+
+ Gets list of OpenCV native libraries in loading order
+
+ :param version: OpenCV Library version
+ :rtype: String;
+ :return: Returns OpenCV libraries names separated by semicolon symbol in loading order
+
+boolean installVersion()
+------------------------
+
+.. method:: boolean InstallVersion(android::String16 version)
+
+ Trys to install defined version of OpenCV
+
+ :param version: OpenCV Library version
+ :rtype: String
+ :return: Returns true if installation successful or package has been already installed
@@ -0,0 +1,35 @@
+**************************
+Install Callback Interface
+**************************
+.. highlight:: java
+.. module:: org.opencv.android
+ :platform: Android
+ :synopsis: Defines callback interface for package management.
+
+.. class:: InstallCallbackInterface
+
+ Callback interface for package installation or update.
+
+String getPackageName()
+-----------------------
+
+.. method:: String getPackageName()
+
+ Get name of a package to be installed
+
+ :rtype: String
+ :return: Return package name, i.e. "OpenCV Manager Service" or "OpenCV library"
+
+void install()
+--------------
+
+.. method:: void install()
+
+ Installation of package is approved
+
+void cancel()
+-------------
+
+.. method:: void cancel()
+
+ Installation if package was canceled
@@ -0,0 +1,37 @@
+************
+Introduction
+************
+
+.. highlight:: java
+
+OpenCV Manager is an Android service targeted to manage OpenCV library binaries on end users devices. It allows sharing the OpenCV dynamic libraries of different versions between applications on the same device. The Manager provides the following benefits\:
+
+#. Less memory usage. All apps use the same binaries from service and do not keep native libs inside them self;
+#. Hardware specific optimizations for all supported platforms;
+#. Trusted OpenCV library source. All packages with OpenCV are published on Google Play service;
+#. Regular updates and bug fixes;
+
+Usage model for target user
+---------------------------
+
+.. image:: img/AndroidAppUsageModel.dia.png
+
+First OpenCV app\:
+
+#. User downloads app dependent from OpenCV from Google Play or installs it manually;
+#. User starts application. Application asks user to install OpenCV Manager;
+#. User installs OpenCV Manager from Google Play Service;
+#. User starts application. Application proposes to user to install OpenCV library for target device and runs Google Play;
+#. User runs app in the third time and gets what he or she wants.
+
+Next OpenCV app\:
+
+#. User downloads app dependent from OpenCV from Google Play or installs it manually;
+#. User starts application.
+#. If selected version is not installed Manager asks user to install OpenCV library package and runs Google Play;
+#. User runs app in the second time and gets what he or she wants.
+
+OpenCV Manager structure
+------------------------
+
+.. image:: img/Structure.dia.png
@@ -0,0 +1,54 @@
+******************
+Java OpenCV Loader
+******************
+
+.. highlight:: java
+.. module:: org.opencv.android
+ :platform: Android
+ :synopsis: Implements Android dependent Java classes.
+.. Class:: OpenCVLoader
+
+Helper class provides common initialization methods for OpenCV library
+
+boolean initDebug()
+-------------------
+
+.. method:: static boolean initDebug()
+
+ Load and initialize OpenCV library from current application package. Roughly it is analog of system.loadLibrary("opencv_java")
+
+ :rtype: boolean
+ :return: Return true if initialization of OpenCV was successful
+
+.. note:: This way is deprecated for production code. It is designed for experimantal and local development purposes only. If you want to publish your app use approach with async initialization
+
+boolean initAsync()
+-------------------
+
+.. method:: static boolean initAsync(String Version, Context AppContext, LoaderCallbackInterface Callback)
+
+ Load and initialize OpenCV library using OpenCV Manager service.
+
+ :param Version: OpenCV Library version
+ :param AppContext: Application context for connecting to service
+ :param Callback: Object, that implements LoaderCallbackInterface for handling Connection status. See BaseLoaderCallback.
+ :rtype: boolean
+ :return: Return true if initialization of OpenCV starts successfully
+
+OpenCV version constants
+-------------------------
+
+.. data:: OPENCV_VERSION_2_4_0
+
+ OpenCV Library version 2.4.0
+
+.. data:: OPENCV_VERSION_2_4_2
+
+ OpenCV Library version 2.4.2
+
+Other constatnts
+----------------
+
+.. data:: OPEN_CV_SERVICE_URL
+
+ Url for OpenCV Manager on Google Play (Android Market)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong. Retry.

0 comments on commit 01570fa

Please sign in to comment.