Skip to content

Commit

Permalink
OpenCV Library and Manager version incremented.
Browse files Browse the repository at this point in the history
OpenCV Version 2.4.6;
OpenCV Manager Version 2.8;
Doc fixes.
  • Loading branch information
asmorkalov committed Jun 27, 2013
1 parent bf6b119 commit e241c14
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 21 deletions.
14 changes: 7 additions & 7 deletions doc/tutorials/introduction/android_binary_package/O4A_SDK.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ The structure of package contents looks as follows:

::

OpenCV-2.4.5-android-sdk
OpenCV-2.4.6-android-sdk
|_ apk
| |_ OpenCV_2.4.5_binary_pack_armv7a.apk
| |_ OpenCV_2.4.5_Manager_2.7_XXX.apk
| |_ OpenCV_2.4.6_binary_pack_armv7a.apk
| |_ OpenCV_2.4.6_Manager_2.8_XXX.apk
|
|_ doc
|_ samples
Expand Down Expand Up @@ -157,10 +157,10 @@ Get the OpenCV4Android SDK

.. code-block:: bash
unzip ~/Downloads/OpenCV-2.4.5-android-sdk.zip
unzip ~/Downloads/OpenCV-2.4.6-android-sdk.zip
.. |opencv_android_bin_pack| replace:: :file:`OpenCV-2.4.5-android-sdk.zip`
.. _opencv_android_bin_pack_url: http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.5/OpenCV-2.4.5-android-sdk.zip/download
.. |opencv_android_bin_pack| replace:: :file:`OpenCV-2.4.6-android-sdk.zip`
.. _opencv_android_bin_pack_url: http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.6/OpenCV-2.4.6-android-sdk.zip/download
.. |opencv_android_bin_pack_url| replace:: |opencv_android_bin_pack|
.. |seven_zip| replace:: 7-Zip
.. _seven_zip: http://www.7-zip.org/
Expand Down Expand Up @@ -295,7 +295,7 @@ Well, running samples from Eclipse is very simple:
.. code-block:: sh
:linenos:
<Android SDK path>/platform-tools/adb install <OpenCV4Android SDK path>/apk/OpenCV_2.4.5_Manager_2.7_armv7a-neon.apk
<Android SDK path>/platform-tools/adb install <OpenCV4Android SDK path>/apk/OpenCV_2.4.6_Manager_2.8_armv7a-neon.apk
.. note:: ``armeabi``, ``armv7a-neon``, ``arm7a-neon-android8``, ``mips`` and ``x86`` stand for
platform targets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ Manager to access OpenCV libraries externally installed in the target system.
:guilabel:`File -> Import -> Existing project in your workspace`.

Press :guilabel:`Browse` button and locate OpenCV4Android SDK
(:file:`OpenCV-2.4.5-android-sdk/sdk`).
(:file:`OpenCV-2.4.6-android-sdk/sdk`).

.. image:: images/eclipse_opencv_dependency0.png
:alt: Add dependency from OpenCV library
:align: center

#. In application project add a reference to the OpenCV Java SDK in
:guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.5``.
:guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.6``.

.. image:: images/eclipse_opencv_dependency1.png
:alt: Add dependency from OpenCV library
Expand Down Expand Up @@ -101,7 +101,7 @@ See the "15-puzzle" OpenCV sample for details.
public void onResume()
{
super.onResume();
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_5, this, mLoaderCallback);
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_6, this, mLoaderCallback);
}
...
Expand All @@ -128,27 +128,27 @@ described above.
#. Add the OpenCV library project to your workspace the same way as for the async initialization
above. Use menu :guilabel:`File -> Import -> Existing project in your workspace`,
press :guilabel:`Browse` button and select OpenCV SDK path
(:file:`OpenCV-2.4.5-android-sdk/sdk`).
(:file:`OpenCV-2.4.6-android-sdk/sdk`).

.. image:: images/eclipse_opencv_dependency0.png
:alt: Add dependency from OpenCV library
:align: center

#. In the application project add a reference to the OpenCV4Android SDK in
:guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.5``;
:guilabel:`Project -> Properties -> Android -> Library -> Add` select ``OpenCV Library - 2.4.6``;

.. image:: images/eclipse_opencv_dependency1.png
:alt: Add dependency from OpenCV library
:align: center

#. If your application project **doesn't have a JNI part**, just copy the corresponding OpenCV
native libs from :file:`<OpenCV-2.4.5-android-sdk>/sdk/native/libs/<target_arch>` to your
native libs from :file:`<OpenCV-2.4.6-android-sdk>/sdk/native/libs/<target_arch>` to your
project directory to folder :file:`libs/<target_arch>`.

In case of the application project **with a JNI part**, instead of manual libraries copying you
need to modify your ``Android.mk`` file:
add the following two code lines after the ``"include $(CLEAR_VARS)"`` and before
``"include path_to_OpenCV-2.4.5-android-sdk/sdk/native/jni/OpenCV.mk"``
``"include path_to_OpenCV-2.4.6-android-sdk/sdk/native/jni/OpenCV.mk"``

.. code-block:: make
:linenos:
Expand Down Expand Up @@ -221,7 +221,7 @@ taken:

.. code-block:: make
include C:\Work\OpenCV4Android\OpenCV-2.4.5-android-sdk\sdk\native\jni\OpenCV.mk
include C:\Work\OpenCV4Android\OpenCV-2.4.6-android-sdk\sdk\native\jni\OpenCV.mk
Should be inserted into the :file:`jni/Android.mk` file **after** this line:

Expand Down Expand Up @@ -379,7 +379,7 @@ result.
public void onResume()
{
super.onResume();
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_3, this, mLoaderCallback);
OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_6, this, mLoaderCallback);
}
#. Defines that your activity implements ``CvViewFrameListener2`` interface and fix activity related
Expand Down
2 changes: 1 addition & 1 deletion modules/core/include/opencv2/core/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

#define CV_VERSION_EPOCH 2
#define CV_VERSION_MAJOR 4
#define CV_VERSION_MINOR 5
#define CV_VERSION_MINOR 6
#define CV_VERSION_REVISION 0

#define CVAUX_STR_EXP(__A) #__A
Expand Down
5 changes: 5 additions & 0 deletions modules/java/generator/src/java/android+OpenCVLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public class OpenCVLoader
*/
public static final String OPENCV_VERSION_2_4_5 = "2.4.5";

/**
* OpenCV Library version 2.4.6.
*/
public static final String OPENCV_VERSION_2_4_6 = "2.4.6";


/**
* Loads and initializes OpenCV library from current application package. Roughly, it's an analog of system.loadLibrary("opencv_java").
Expand Down
2 changes: 1 addition & 1 deletion platforms/android/service/doc/BaseLoaderCallback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ See the "15-puzzle" OpenCV sample for details.
super.onResume();
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_4, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_6, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
}
Expand Down
4 changes: 4 additions & 0 deletions platforms/android/service/doc/JavaHelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ OpenCV version constants
.. data:: OPENCV_VERSION_2_4_5

OpenCV Library version 2.4.5

.. data:: OPENCV_VERSION_2_4_6

OpenCV Library version 2.4.6
4 changes: 2 additions & 2 deletions platforms/android/service/engine/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine"
android:versionCode="27@ANDROID_PLATFORM_VERSION_CODE@"
android:versionName="2.7" >
android:versionCode="28@ANDROID_PLATFORM_VERSION_CODE@"
android:versionName="2.8" >

<uses-sdk android:minSdkVersion="@ANDROID_NATIVE_API_LEVEL@" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using namespace android;

const int OpenCVEngine::Platform = DetectKnownPlatforms();
const int OpenCVEngine::CpuID = GetCpuID();
const int OpenCVEngine::KnownVersions[] = {2040000, 2040100, 2040200, 2040300, 2040301, 2040302, 2040400, 2040500};
const int OpenCVEngine::KnownVersions[] = {2040000, 2040100, 2040200, 2040300, 2040301, 2040302, 2040400, 2040500, 2040600};

bool OpenCVEngine::ValidateVersion(int version)
{
Expand Down

0 comments on commit e241c14

Please sign in to comment.