Build info output for all android apps added.
authorAlexander Smorkalov <alexander.smorkalov@itseez.com>
Tue, 12 Feb 2013 07:10:34 +0000 (11:10 +0400)
committerAlexander Smorkalov <alexander.smorkalov@itseez.com>
Tue, 12 Feb 2013 07:19:05 +0000 (11:19 +0400)
OpenCV build information output to logcat added to OpenCV initialization code;
Documenation for cv::getBuildInformation() added.

modules/core/doc/utility_and_system_functions_and_macros.rst
modules/java/generator/src/java/android+AsyncServiceHelper.java
modules/java/generator/src/java/android+StaticHelper.java

index 30577c4..861f98b 100644 (file)
@@ -255,7 +255,7 @@ The function allocates the buffer of the specified size and returns it. When the
 
 
 fastFree
-------------
+--------
 Deallocates a memory buffer.
 
 .. ocv:function:: void fastFree(void* ptr)
@@ -280,6 +280,14 @@ The function acts like ``sprintf``  but forms and returns an STL string. It can
 :ocv:class:`Exception` constructor.
 
 
+getBuildInformation
+-------------------
+Returns full configuration time cmake output.
+
+.. ocv:function:: const std::string& getBuildInformation()
+
+Returned value is raw cmake output including version control system revision, compiler version, compiler flags, enabled modules and third party libraries, etc. Output format depends on target architecture.
+
 
 checkHardwareSupport
 --------------------
@@ -304,7 +312,7 @@ Returns true if the specified feature is supported by the host hardware.
 The function returns true if the host hardware supports the specified feature. When user calls ``setUseOptimized(false)``, the subsequent calls to ``checkHardwareSupport()`` will return false until ``setUseOptimized(true)`` is called. This way user can dynamically switch on and off the optimized code in OpenCV.
 
 getNumThreads
------------------
+-------------
 Returns the number of threads used by OpenCV.
 
 .. ocv:function:: int getNumThreads()
@@ -318,7 +326,7 @@ The function returns the number of threads that is used by OpenCV.
 
 
 getThreadNum
-----------------
+------------
 Returns the index of the currently executed thread.
 
 .. ocv:function:: int getThreadNum()
@@ -332,7 +340,7 @@ The function returns a 0-based index of the currently executed thread. The funct
 
 
 getTickCount
-----------------
+------------
 Returns the number of ticks.
 
 .. ocv:function:: int64 getTickCount()
@@ -346,7 +354,7 @@ It can be used to initialize
 
 
 getTickFrequency
---------------------
+----------------
 Returns the number of ticks per second.
 
 .. ocv:function:: double getTickFrequency()
@@ -363,7 +371,7 @@ That is, the following code computes the execution time in seconds: ::
 
 
 getCPUTickCount
-----------------
+---------------
 Returns the number of CPU ticks.
 
 .. ocv:function:: int64 getCPUTickCount()
@@ -417,7 +425,7 @@ The function sets the number of threads used by OpenCV in parallel OpenMP region
 
 
 setUseOptimized
------------------
+---------------
 Enables or disables the optimized code.
 
 .. ocv:function:: int cvUseOptimized( int on_off )
@@ -433,7 +441,7 @@ The function can be used to dynamically turn on and off optimized code (code tha
 By default, the optimized code is enabled unless you disable it in CMake. The current status can be retrieved using ``useOptimized``.
 
 useOptimized
------------------
+------------
 Returns the status of optimized code usage.
 
 .. ocv:function:: bool useOptimized()
index adf0e41..568f3da 100644 (file)
@@ -3,6 +3,7 @@ package org.opencv.android;
 import java.io.File;
 import java.util.StringTokenizer;
 
+import org.opencv.core.Core;
 import org.opencv.engine.OpenCVEngineInterface;
 
 import android.content.ComponentName;
@@ -85,7 +86,6 @@ class AsyncServiceHelper
                     {
                         mServiceInstallationProgress = true;
                         Log.d(TAG, "Package installation started");
-
                     }
                     else
                     {
@@ -299,6 +299,10 @@ class AsyncServiceHelper
                         if (initOpenCVLibs(path, libs))
                         {
                             Log.d(TAG, "First attempt to load libs is OK");
+                            String eol = System.getProperty("line.separator");
+                            for (String str : Core.getBuildInformation().split(eol))
+                                Log.i(TAG, str);
+
                             status = LoaderCallbackInterface.SUCCESS;
                         }
                         else
index 7d7b64d..8d0629c 100644 (file)
@@ -1,7 +1,8 @@
 package org.opencv.android;
 
-import java.util.StringTokenizer;
+import org.opencv.core.Core;
 
+import java.util.StringTokenizer;
 import android.util.Log;
 
 class StaticHelper {
@@ -28,6 +29,10 @@ class StaticHelper {
         if (initOpenCVLibs(libs))
         {
             Log.d(TAG, "First attempt to load libs is OK");
+            String eol = System.getProperty("line.separator");
+            for (String str : Core.getBuildInformation().split(eol))
+                Log.i(TAG, str);
+
             result = true;
         }
         else