Commit 51f6127e authored by Andrey Kamaev's avatar Andrey Kamaev

Merged the recent fixes from 2.4 branch

parent 4128d578
......@@ -89,5 +89,6 @@ add_custom_command(
DEPENDS "${OpenCV_BINARY_DIR}/bin/.classes.jar.dephelper" "${PACKAGE_DIR}/res/values/strings.xml" "${PACKAGE_DIR}/res/drawable/icon.png" ${camera_wrappers} opencv_java
)
install(FILES "${APK_NAME}" DESTINATION "apk/" COMPONENT main)
add_custom_target(android_package ALL SOURCES "${APK_NAME}" )
add_dependencies(android_package opencv_java)
\ No newline at end of file
android/package/res/drawable/icon.png

5.63 KB | W: | H:

android/package/res/drawable/icon.png

1.95 KB | W: | H:

android/package/res/drawable/icon.png
android/package/res/drawable/icon.png
android/package/res/drawable/icon.png
android/package/res/drawable/icon.png
  • 2-up
  • Swipe
  • Onion skin
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">OCV @OPENCV_VERSION_MAJOR@.@OPENCV_VERSION_MINOR@ binary pack for @ANDROID_PACKAGE_PLATFORM_NAME@</string>
<string name="app_name">OCV @OPENCV_VERSION_MAJOR@.@OPENCV_VERSION_MINOR@ pack @ANDROID_PACKAGE_PLATFORM_NAME@</string>
</resources>
\ No newline at end of file
*******************************************
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
\ No newline at end of file
***************************************
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
.. _Android_OpenCV_Manager_Intro:
************
Introduction
************
......
......@@ -38,10 +38,6 @@ boolean initAsync()
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
......
********************
Native OpenCV Helper
********************
.. highlight:: cpp
\ No newline at end of file
*********************************
Java OpenCV OpenCVEngineInterface
*********************************
.. highlight:: java
.. module:: org.opencv.engine
:platform: Android
:synopsis: Defines OpenCV Manager interface for Android.
.. Class:: OpenCVEngineInterface
OpenCVEngineInterface class provides Java interface to OpenCV Manager Service. Is synchronous with native OpenCVEngine class
.. note:: Do not use this class directly. Use OpenCVLoader instead!
int getEngineVersion()
----------------------
.. method:: int GetEngineVersion()
Get OpenCV Manager version
:rtype: int
:return: Return OpenCV Manager version
String getLibPathByVersion()
----------------------------
.. method:: String GetLibPathByVersion(String version)
Find already installed OpenCV library
:param version: OpenCV library version
:rtype: String
:return: Return path to OpenCV native libs or empty string if OpenCV was not found
String getLibraryList()
-----------------------
.. method:: String GetLibraryList(String version)
Get list of OpenCV native libraries in loading order separated by ";" symbol
:param version: OpenCV library version
:rtype: String
:return: Return OpenCV libraries names separated by symbol ";" in loading order
boolean installVersion()
------------------------
.. method:: boolean InstallVersion(String version)
Try to install defined version of OpenCV from Google Play (Android Market).
:param version: OpenCV library version
:rtype: String
:return: Return true if installation was successful or OpenCV package has been already installed
\ No newline at end of file
************************************
Java Static OpenCV Helper (internal)
************************************
.. highlight:: java
.. module:: org.opencv.android
:platform: Android
:synopsis: Implements Android dependent Java classes
.. Class:: StaticHelper
Helper class provides implementation of static OpenCV initialization. All OpenCV libraries must be included to application package.
.. note:: This is internal class. Does not use it directly. Use OpenCVLoader.initDebug() instead!
int initOpenCV()
----------------
.. method:: int initOpenCV()
Tries to init OpenCV library using libraries from application package. Method uses libopencv_info.so library for getting
list of libraries in loading order. Method loads libopencv_java.so, if info library is not present.
:rtype: boolean
:return: Return true if initialization was successful
\ No newline at end of file
.. _Android_OpenCV_Manager:
***********************
Android OpenCV Manager
***********************
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.opencv.engine"
android:versionCode="1"
android:versionName="1.0" >
android:versionCode="11"
android:versionName="1.1" >
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<application
android:icon="@drawable/icon"
......
......@@ -8,14 +8,14 @@
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="About:"
android:text="About"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This application allows you to manage OpenCV library on your device."
android:text="OpenCV library (www.opencv.org) is used by other applications for image enhancement, panorama stitching, object detection, recognition and tracking and so on. OpenCV Manager provides the best version of the OpenCV for your hardware."
android:textAppearance="?android:attr/textAppearanceMedium" />
<LinearLayout
......@@ -47,7 +47,7 @@
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Device information:"
android:text="Device information"
android:textAppearance="?android:attr/textAppearanceLarge" android:layout_marginTop="20dp"/>
<LinearLayout
......@@ -101,7 +101,7 @@
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Installed packages:"
android:text="Installed packages"
android:textAppearance="?android:attr/textAppearanceLarge" android:layout_marginTop="15dp"/>
<ListView
......@@ -114,6 +114,6 @@
android:id="@+id/CheckEngineUpdate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Check Manager update" />
android:text="Check for update" />
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
No preview for this file type
No preview for this file type
......@@ -6,36 +6,34 @@
Using C++ OpenCV code with Android binary package
*************************************************
The Android way is writing all your code in Java. But somethimes it is not enough and you need to go to a native level and write part of your application in C/C++.
This is important when you already have some computer vision functionality which is written in C++ and uses OpenCV, and you want to use it in your Android application,
The Android way is writing all your code in Java. But sometimes it is not enough and you need to go to the native level and write some parts of your application in C/C++.
This is especially important when you already have some computer vision code which is written in C++ and uses OpenCV, and you want to reuse it in your Android application,
but do not want to rewrite the C++ code to Java.
In this case the only way is to use JNI mechanism.
It means, that you should add a class with native methods wrapping your C++ functionality into the Java part of your Android application.
In this case the only way is to use JNI - a Java framework for interaction with native code.
It means, that you should add a Java class with native methods exposing your C++ functionality to the Java part of your Android application.
This tutorial describes a fast way how to create and build Android applications containing OpenCV code written in C++. It shows how to build an application which uses OpenCV inside its JNI calls.
This tutorial describes a fast way to create and build Android applications containing OpenCV code written in C++. It shows how to build an application which uses OpenCV inside its JNI calls. Tutorial 3 and 4 from the OpenCV for Android SDK can be used as examples. OpenCV Sample "face-detect" also contain a call to C++ class.
Please note that before starting this tutorial you should fulfill all the steps, described in the tutorial :ref:`Android_Binary_Package`.
This tutorial was tested using Ubuntu 10.04 and Windows 7 SP1 operating systems.
Nevertheless, it should also work on Mac OS X. If you encounter errors after following the steps described here, feel free to contact us via
`android-opencv <https://groups.google.com/group/android-opencv/>`_ discussion group and we will try to help you.
Nevertheless, it should also work on Mac OS X.
If you encounter errors after following the steps described here, feel free to contact us via
`OpenCV4Android <https://groups.google.com/group/android-opencv/>`_ discussion group or
OpenCV `Q&A forum <http://answers.opencv.org>`_ and we will try to help you.
Prerequisites: Setup NDK
========================
Prerequisites: Setup Android NDK
================================
To compile C++ code for Android platform you need ``Android Native Development Kit`` (*NDK*).
You can get the latest version of NDK from the `download page <http://developer.android.com/sdk/ndk/index.html>`_.
To install Android NDK just extract the archive to some folder on your computer. (Here is `installation instructions <http://developer.android.com/sdk/ndk/index.html#installing>`_ on the NDK home page.)
You can get the latest version of NDK from the `download page <http://developer.android.com/sdk/ndk/index.html>`_. To install Android NDK just extract the archive to some folder on your computer. Here are `installation instructions <http://developer.android.com/sdk/ndk/index.html#installing>`_.
.. note:: Before start you can read official Android NDK documentation which is in the Android NDK archive, in the folder :file:`docs/`.
The main article about using Android NDK build system you can read in the file :file:`ANDROID-MK.html`.
The main article about using Android NDK build system is in the :file:`ANDROID-MK.html` file.
Also some additional useful information you can read in the files
:file:`APPLICATION-MK.html`, :file:`NDK-BUILD.html`, and in the files :file:`CPU-ARM-NEON.html`, :file:`CPLUSPLUS-SUPPORT.html`, :file:`PREBUILTS.html`.
Some additional information you can find in the :file:`APPLICATION-MK.html`, :file:`NDK-BUILD.html` files, and :file:`CPU-ARM-NEON.html`, :file:`CPLUSPLUS-SUPPORT.html`, :file:`PREBUILTS.html`.
Theory: Android application structure
=====================================
......@@ -71,24 +69,24 @@ where
These scripts control the C++ build process (they are written in Makefile language).
Also the root folder should contain the following files
Also the root folder should contain the following files:
* :file:`AndroidManifest.xml` file presents essential information about application to the Android system
(name of the Application, name of main application's package, components of the application, required permissions, etc)
(name of the Application, name of main application's package, components of the application, required permissions, etc).
It can be created using Eclipse wizard or :command:`android` tool from Android SDK
It can be created using Eclipse wizard or :command:`android` tool from Android SDK.
* :file:`project.properties` is a text file containing information about target Android platform and other build details.
This file is generated by Eclipse or can be created with :command:`android` tool from Android SDK
This file is generated by Eclipse or can be created with :command:`android` tool from Android SDK.
.. note:: Both files (:file:`AndroidManifest.xml` and :file:`project.properties`) are required to compile the C++ part of the application (NDK build system uses information from these files). If any of these files does not exist, compile the Java part of the project before the C++ part.
.. _NDK_build_cli:
Theory: How to build Android application having C++ native part (from command line)
===================================================================================
Theory: Building application with C++ native part from command line
===================================================================
Here is the standard way to compile C++ part of an Android application:
......@@ -98,7 +96,7 @@ Here is the standard way to compile C++ part of an Android application:
cd <root folder of the project>/
.. note:: Alternatively you can go to the folder :file:`jni` of Android project but samples from OpenCV binary package are configured for building from project root level (because of relative path to the OpenCV library).
.. note:: Alternatively you can go to the :file:`jni` folder of Android project. But samples from OpenCV binary package are configured for building from the project root level (because of relative path to the OpenCV library).
#. Run the following command
......@@ -106,7 +104,7 @@ Here is the standard way to compile C++ part of an Android application:
<path_where_NDK_is_placed>/ndk-build
.. note:: On Windows we recomend use of ``ndk-build.cmd`` in standard Windows console (``cmd.exe``) rather than the similar ``bash`` script in ``Cygwin`` shell.
.. note:: On Windows we recommend to use ``ndk-build.cmd`` in standard Windows console (``cmd.exe``) rather than the similar ``bash`` script in ``Cygwin`` shell.
.. image:: images/ndk_build.png
:alt: NDK build
......@@ -134,20 +132,20 @@ After that the Java part of the application can be (re)compiled (using either *E
.. _Android_NDK_integration_with_Eclipse:
Theory: How to build Android application having C++ native part (from *Eclipse*)
================================================================================
Theory: Building application with C++ native part from *Eclipse*
================================================================
There are several possible ways to integrate compilation of C++ code by Android NDK into Eclipse compilation process.
We recommend the approach based on Eclipse :abbr:`CDT(C/C++ Development Tooling)` Builder.
.. important:: Make sure your Eclipse IDE has the :abbr:`CDT(C/C++ Development Tooling)` plugin installed. (Menu ``Help`` -> ``About Eclipse SDK`` -> ``Installation Details``)
.. important:: Make sure your Eclipse IDE has the :abbr:`CDT(C/C++ Development Tooling)` plugin installed. Menu :guilabel:`Help -> About Eclipse SDK` and push :guilabel:`Installation Details` button.
.. image:: images/eclipse_inst_details.png
:alt: Configure builders
:align: center
To install the `CDT plugin <http://eclipse.org/cdt/>`_ use menu ``Help`` -> ``Install New Software...``,
then paste the CDT 8.0 repository URL http://download.eclipse.org/tools/cdt/releases/indigo as shown on the picture below and click :guilabel:`Add...`, name it *CDT* and click :guilabel:`OK`.
To install the `CDT plugin <http://eclipse.org/cdt/>`_ use menu :guilabel:`Help -> Install New Software...`,
then paste the CDT 8.0 repository URL http://download.eclipse.org/tools/cdt/releases/indigo as shown in the picture below and click :guilabel:`Add...`, name it *CDT* and click :guilabel:`OK`.
.. image:: images/eclipse_inst_cdt.png
:alt: Configure builders
......@@ -160,9 +158,9 @@ then paste the CDT 8.0 repository URL http://download.eclipse.org/tools/cdt/rele
:align: center
.. important:: OpenCV 2.4.2 for Android package contains samples projects pre-configured to use CDT Builder for JNI part build via ``ndk-build``.
.. important:: OpenCV for Android 2.4.2 package contains sample projects pre-configured to use CDT Builder. It automatically builds JNI part via ``ndk-build``.
#. Define the ``NDKROOT`` environment variable containing the path to Android NDK in your system (e.g. **"X:\\Apps\\android-ndk-r8"** or **"/opt/android-ndk-r8"**)
#. Define the ``NDKROOT`` environment variable containing the path to Android NDK in your system (e.g. **"X:\\Apps\\android-ndk-r8"** or **"/opt/android-ndk-r8"**).
#. CDT Builder is configured for Windows hosts, on Linux or MacOS open `Project Properties` of the projects having JNI part (`face-detection`, `Tutorial 3` and `Tutorial 4`), select :guilabel:`C/C++ Build` in the left pane, remove **".cmd"** and leave ``"${NDKROOT}/ndk-build"`` in the :guilabel:`Build command` edit box and click :guilabel:`OK`.
......
......@@ -122,7 +122,7 @@ Then simply call create_csv.py with the path to the folder, just like this and y
at/s17/3.pgm;1
[...]
Please see the :ref:`appendix` for additional informations.
Please see the :ref:`appendixft` for additional informations.
Eigenfaces
==========
......@@ -516,7 +516,7 @@ Literature
.. [Zhao03] Zhao, W., Chellappa, R., Phillips, P., and Rosenfeld, A. Face recognition: A literature survey. ACM Computing Surveys (CSUR) 35, 4 (2003), 399–458.
.. _appendix:
.. _appendixft:
Appendix
========
......
......@@ -66,7 +66,7 @@ All images for this example were chosen to have a frontal face perspective. They
.. image:: ../img/tutorial/gender_classification/clooney_set.png
:align: center
You really don't want to create the CSV file by hand. And you really don't want scale, rotate & translate the images manually. I have prepared you two Python scripts ``create_csv.py`` and ``crop_face.py``, you can find them in the ``src`` folder coming with this documentation. You'll see how to use them in the :ref:`appendix`.
You really don't want to create the CSV file by hand. And you really don't want scale, rotate & translate the images manually. I have prepared you two Python scripts ``create_csv.py`` and ``crop_face.py``, you can find them in the ``src`` folder coming with this documentation. You'll see how to use them in the :ref:`appendixfgc`.
Fisherfaces for Gender Classification
--------------------------------------
......@@ -140,7 +140,7 @@ And the Fisherfaces reconstruction:
I hope this gives you an idea how to approach gender classification and the other image classification tasks.
.. _appendix:
.. _appendixfgc:
Appendix
--------
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OpenCV Library-2.4.2</name>
<name>OpenCV Library - 2.4.2</name>
<comment></comment>
<projects>
</projects>
......
......@@ -85,10 +85,10 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
truth = new DMatch[] {
new DMatch(0, 0, 0, 1.049694f),
new DMatch(1, 0, 0, 1.098605f),
new DMatch(1, 0, 0, 1.066820f),
new DMatch(2, 1, 0, 0.494587f),
new DMatch(3, 1, 0, 0.484352f),
new DMatch(4, 0, 0, 1.083795f)
new DMatch(3, 0, 0, 1.141826f),
new DMatch(4, 0, 0, 1.084099f)
};
super.setUp();
......@@ -206,7 +206,6 @@ public class BruteForceDescriptorMatcherTest extends OpenCVTestCase {
matcher.add(Arrays.asList(train));
matcher.match(query, matches);
assertArrayDMatchEquals(truth, matches.toArray(), EPS);
}
......
......@@ -84,11 +84,11 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
matSize = 100;
truth = new DMatch[] {
new DMatch(0, 1, 0, 6.9202342f),
new DMatch(1, 1, 0, 6.1675916f),
new DMatch(2, 1, 0, 2.6798589f),
new DMatch(3, 1, 0, 2.6545324f),
new DMatch(4, 0, 0, 6.1294847f)
new DMatch(0, 1, 0, 6.9202332f),
new DMatch(1, 0, 0, 6.0567350f),
new DMatch(2, 1, 0, 2.6798587f),
new DMatch(3, 0, 0, 5.8991642f),
new DMatch(4, 0, 0, 6.1321812f)
};
super.setUp();
}
......@@ -183,7 +183,6 @@ public class BruteForceL1DescriptorMatcherTest extends OpenCVTestCase {
matcher.add(Arrays.asList(train));
matcher.match(query, matches);
assertArrayDMatchEquals(truth, matches.toArray(), EPS);
}
......
......@@ -89,11 +89,11 @@ public class BruteForceSL2DescriptorMatcherTest extends OpenCVTestCase {
matSize = 100;
truth = new DMatch[] {
new DMatch(0, 0, 0, 1.1018577f),
new DMatch(1, 0, 0, 1.2069331f),
new DMatch(0, 0, 0, 1.1018578f),
new DMatch(1, 0, 0, 1.1381058f),
new DMatch(2, 1, 0, 0.2446168f),
new DMatch(3, 1, 0, 0.2345972f),
new DMatch(4, 0, 0, 1.1746116f)
new DMatch(3, 0, 0, 1.3037685f),
new DMatch(4, 0, 0, 1.1752719f)
};
super.setUp();
......@@ -189,7 +189,9 @@ public class BruteForceSL2DescriptorMatcherTest extends OpenCVTestCase {
matcher.add(Arrays.asList(train));
matcher.match(query, matches);
OpenCVTestRunner.Log(matches);
OpenCVTestRunner.Log(matches);
OpenCVTestRunner.Log(matches);
assertArrayDMatchEquals(truth, matches.toArray(), EPS);
}
......
......@@ -159,10 +159,10 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
truth = new DMatch[] {
new DMatch(0, 0, 0, 1.049694f),
new DMatch(1, 0, 0, 1.098605f),
new DMatch(1, 0, 0, 1.066820f),
new DMatch(2, 1, 0, 0.494587f),
new DMatch(3, 1, 0, 0.484352f),
new DMatch(4, 0, 0, 1.083795f)
new DMatch(3, 0, 0, 1.141826f),
new DMatch(4, 0, 0, 1.084099f)
};
super.setUp();
......@@ -283,9 +283,8 @@ public class FlannBasedDescriptorMatcherTest extends OpenCVTestCase {
assertArrayDMatchEquals(truth, matches.toArray(), EPS);
// OpenCVTestRunner.Log("matches found: " + matches.size());
// for (DMatch m : matches)
// OpenCVTestRunner.Log(m.toString());
// OpenCVTestRunner.Log(matches.toString());
// OpenCVTestRunner.Log(matches);
}
public void testMatchMatMatListOfDMatchMat() {
......
......@@ -47,25 +47,18 @@ public class SURFDescriptorExtractorTest extends OpenCVTestCase {
Mat truth = new Mat(1, 128, CvType.CV_32FC1) {
{
put(0, 0,
/*
0, 0, 0, 0, 0.011540107, 0.0029440077, 0.095483348, 0.018144149, 0.00014820647, 0, 0.00014820647, 0, 0, 0, 0, 0, 0, -0.00014820647,
0, 0.00014820647, 0.10196275, 0.0099145742, 0.57075155, 0.047922116, 0, 0, 0, 0, 0, 0, 0, 0, 0.0029440068, -0.011540107, 0.018144149,
0.095483348, 0.085385554, -0.054076977, 0.34105155, 0.47911066, 0.023395451, -0.11012388, 0.088196531, 0.50863767, 0.0031790689,
-0.019882837, 0.0089476965, 0.054817006, -0.0033560959, -0.0011770058, 0.0033560959, 0.0011770058, 0.019882834, 0.0031790687,
0.054817006, 0.0089476984, 0, 0, 0, 0, -0.0011770058, 0.0033560959, 0.0011770058, 0.0033560959
*/
0, 0, 0, 0, 0, 0, 0, 0, 0.045382127, 0.075976953, -0.031969212, 0.035002094, 0.012224297, 0.012286193,
-0.0088025155, 0.0088025155, 0.00017225844, 0.00017225844, 0, 0, 8.2743405e-05, 8.2743405e-05, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 8.2743405e-05, 8.2743405e-05, -0.00017225844, 0.00017225844, 0, 0, 0.31723264,
0.42715758, -0.19872268, 0.23621935, 0.033304065, 0.033918764, -0.021780485, 0.021780485, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.0088025145, 0.0088025145, 0.012224296, 0.012286192, -0.045382123,
0.075976953, 0.031969212, 0.035002094, 0.10047197, 0.21463872, -0.0012294546, 0.18176091, -0.075555265,
0.35627601, 0.01270232, 0.20058797, -0.037658721, 0.037658721, 0.064850949, 0.064850949, -0.27688536,
0.44229308, 0.14888979, 0.14888979, -0.0031531656, 0.0031531656, 0.0068481555, 0.0072466261, -0.034193151,
0.040314503, 0.01108359, 0.023398584, -0.00071876607, 0.00071876607, -0.0031819802, 0.0031819802, 0, 0,
-0.0013680183, 0.0013680183, 0.034193147, 0.040314503, -0.01108359, 0.023398584, 0.006848156, 0.0072466265,
-0.0031531656, 0.0031531656, 0, 0, 0, 0, 0, 0, 0, 0, -0.0013680183, 0.0013680183, 0, 0, 0.00071876607,
0.00071876607, 0.0031819802, 0.0031819802
-0.0041138371, 0.0041138371, 0, 0, 0, 0, 0.0014427509, 0.0014427509, -0.0081971241, 0.034624498, 0.032569118,
0.032569118, -0.007222258, 0.0076424959, 0.0033254174, 0.0033254174, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.10815519, 0.38033518, 0.24314292, 0.24314292, -0.068393648, 0.068393648,
0.039715949, 0.039715949, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8.7263528e-05, 8.7263528e-05, -6.0081031e-05,
6.0081031e-05, -0.00012158759, 0.00012158759, 0.0033254174, 0.0033254174, -0.007222258, 0.0076424964,
0.0081971241, 0.034624498, -0.032569118, 0.032569118, -0.077379324, 0.27552885, 0.14366581, 0.31175563,
-0.013609707, 0.24329227, -0.091054246, 0.17476201, 0.022970313, 0.022970313, -0.035123408, 0.035771687,
0.1907353, 0.3838968, -0.31571922, 0.31571922, 0.0092833797, 0.0092833797, -0.012892088, 0.012957365,
0.029558292, 0.073337689, -0.043703932, 0.043703932, 0.0014427509, 0.0014427509, 0, 0, 0.0041138371,
0.0041138371, 0, 0, -0.02955829, 0.073337704, 0.043703932, 0.043703932, -0.012892087, 0.012957364,
0.0092833797,0.0092833797, 6.0081031e-05, 6.0081031e-05, 0.00012158759, 0.00012158759, -8.7263528e-05,
8.7263528e-05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
);
}
};
......
......@@ -57,16 +57,10 @@ public class SURFFeatureDetectorTest extends OpenCVTestCase {
matSize = 100;
truth = new KeyPoint[] {
/*
new KeyPoint(55.775577545166016f, 44.224422454833984f, 16, 9.754629f, 8617.863f, 1, -1),
new KeyPoint(44.224422454833984f, 44.224422454833984f, 16, 99.75463f, 8617.863f, 1, -1),
new KeyPoint(44.224422454833984f, 55.775577545166016f, 16, 189.7546f, 8617.863f, 1, -1),
new KeyPoint(55.775577545166016f, 55.775577545166016f, 16, 279.75464f, 8617.863f, 1, -1)
*/
new KeyPoint(55.7755f, 44.2244f, 16, 9.754f, 8617.863f, 0, -1),
new KeyPoint(44.2244f, 44.2244f, 16, 99.754f, 8617.863f, 0, -1),
new KeyPoint(44.2244f, 55.7755f, 16, 189.754f, 8617.863f, 0, -1),
new KeyPoint(55.7755f, 55.7755f, 16, 279.754f, 8617.863f, 0, -1)
new KeyPoint(55.775578f, 55.775578f, 16, 80.245735f, 8617.8633f, 0, -1),
new KeyPoint(44.224422f, 55.775578f, 16, 170.24574f, 8617.8633f, 0, -1),
new KeyPoint(44.224422f, 44.224422f, 16, 260.24573f, 8617.8633f, 0, -1),
new KeyPoint(55.775578f, 44.224422f, 16, 350.24573f, 8617.8633f, 0, -1)
};
super.setUp();
......
......@@ -56,7 +56,7 @@ class AsyncServiceHelper
private LoaderCallbackInterface mUserAppCallback = Callback;
public String getPackageName()
{
return "OpenCV Manager Service";
return "OpenCV Manager";
}
public void install() {
Log.d(TAG, "Trying to install OpenCV Manager via Google Play");
......
......@@ -8,14 +8,9 @@ import android.content.Context;
public class OpenCVLoader
{
/**
* OpenCV Library version 2.4.0
* OpenCV Library version 2.4.2
*/
public static final String OPEN_CV_VERSION_2_4_0 = "2.4.0";
/**
* OpenCV Library version 2.4.0
*/
public static final String OPEN_CV_VERSION_2_4_2 = "2.4.2";
public static final String OPENCV_VERSION_2_4_2 = "2.4.2";
/**
* Load and initialize OpenCV library from current application package. Roughly it is analog of system.loadLibrary("opencv_java")
......
......@@ -94,10 +94,9 @@ public class puzzle15Activity extends Activity
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
......
......@@ -86,12 +86,10 @@ public class ColorBlobDetectionActivity extends Activity {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
}
\ No newline at end of file
......@@ -25,7 +25,6 @@
<tool id="org.eclipse.cdt.build.core.settings.holder.1894181736" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1575527821" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
</option>
......@@ -37,7 +36,6 @@
<tool id="org.eclipse.cdt.build.core.settings.holder.303359177" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.373249505" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
</option>
......@@ -49,7 +47,6 @@
<tool id="org.eclipse.cdt.build.core.settings.holder.1156172258" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.149918263" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
</option>
......
......@@ -107,10 +107,9 @@ public class FdActivity extends Activity {
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
......
......@@ -109,10 +109,9 @@ public class ImageManipulationsActivity extends Activity {
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
......
......@@ -91,10 +91,9 @@ public class Sample1Java extends Activity {
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
......
......@@ -97,10 +97,9 @@ public class Sample2NativeCamera extends Activity {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
......
......@@ -25,7 +25,6 @@
<tool id="org.eclipse.cdt.build.core.settings.holder.1350943194" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1884803530" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
</option>
......@@ -37,7 +36,6 @@
<tool id="org.eclipse.cdt.build.core.settings.holder.982773030" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.332905639" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
</option>
......@@ -49,7 +47,6 @@
<tool id="org.eclipse.cdt.build.core.settings.holder.472513352" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1490236166" name="Include Paths" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
</option>
......
......@@ -88,10 +88,9 @@ public class Sample3Native extends Activity {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
}
......@@ -28,9 +28,8 @@
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1028672579" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native\jni\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1470189286" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
......@@ -40,7 +39,6 @@
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1772035264" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
</option>
......@@ -52,9 +50,8 @@
</option>
<option id="org.eclipse.cdt.build.core.settings.holder.incpaths.1841493632" superClass="org.eclipse.cdt.build.core.settings.holder.incpaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/platforms/android-9/arch-arm/usr/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${NDKROOT}/sources/cxx-stl/gnu-libstdc++/include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native\jni\include&quot;"/>
<listOptionValue builtIn="false" value="&quot;${ProjDirPath}/../../sdk/native/jni/include&quot;"/>
</option>
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.608739504" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
</tool>
......
......@@ -98,10 +98,9 @@ public class Sample4Mixed extends Activity {
requestWindowFeature(Window.FEATURE_NO_TITLE);
Log.i(TAG, "Trying to load OpenCV library");
if (!OpenCVLoader.initAsync(OpenCVLoader.OPEN_CV_VERSION_2_4_0, this, mOpenCVCallBack))
if (!OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_2, this, mOpenCVCallBack))
{
Log.e(TAG, "Cannot connect to OpenCV Manager");
finish();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment