mirror of
https://github.com/opencv/opencv.git
synced 2025-06-09 10:40:46 +08:00
Removed info lib handling in OpenCV initialization on Android.
This commit is contained in:
parent
70e55fd7c6
commit
1bf4f2386a
@ -13,30 +13,10 @@ class StaticHelper {
|
|||||||
String libs = "";
|
String libs = "";
|
||||||
|
|
||||||
if(InitCuda)
|
if(InitCuda)
|
||||||
{
|
Log.w(TAG, "CUDA support was removed!");
|
||||||
loadLibrary("cudart");
|
|
||||||
loadLibrary("nppc");
|
|
||||||
loadLibrary("nppi");
|
|
||||||
loadLibrary("npps");
|
|
||||||
loadLibrary("cufft");
|
|
||||||
loadLibrary("cublas");
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.d(TAG, "Trying to get library list");
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
System.loadLibrary("opencv_info");
|
|
||||||
libs = getLibraryList();
|
|
||||||
}
|
|
||||||
catch(UnsatisfiedLinkError e)
|
|
||||||
{
|
|
||||||
Log.e(TAG, "OpenCV error: Cannot load info library for OpenCV");
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.d(TAG, "Library list: \"" + libs + "\"");
|
|
||||||
Log.d(TAG, "First attempt to load libs");
|
Log.d(TAG, "First attempt to load libs");
|
||||||
if (initOpenCVLibs(libs))
|
if (loadLibrary("opencv_java4"))
|
||||||
{
|
{
|
||||||
Log.d(TAG, "First attempt to load libs is OK");
|
Log.d(TAG, "First attempt to load libs is OK");
|
||||||
String eol = System.getProperty("line.separator");
|
String eol = System.getProperty("line.separator");
|
||||||
@ -74,30 +54,6 @@ class StaticHelper {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean initOpenCVLibs(String Libs)
|
|
||||||
{
|
|
||||||
Log.d(TAG, "Trying to init OpenCV libs");
|
|
||||||
|
|
||||||
boolean result = true;
|
|
||||||
|
|
||||||
if ((null != Libs) && (Libs.length() != 0))
|
|
||||||
{
|
|
||||||
Log.d(TAG, "Trying to load libs by dependency list");
|
|
||||||
StringTokenizer splitter = new StringTokenizer(Libs, ";");
|
|
||||||
while(splitter.hasMoreTokens())
|
|
||||||
{
|
|
||||||
result &= loadLibrary(splitter.nextToken());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// If dependencies list is not defined or empty.
|
|
||||||
result = loadLibrary("opencv_java4");
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final String TAG = "OpenCV/StaticHelper";
|
private static final String TAG = "OpenCV/StaticHelper";
|
||||||
|
|
||||||
private static native String getLibraryList();
|
private static native String getLibraryList();
|
||||||
|
Loading…
Reference in New Issue
Block a user