Skip to content

Commit

Permalink
next(android): java3 -> java4
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Apr 10, 2018
1 parent 250941b commit c6aa97c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmake/OpenCVGenAndroidMK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if(ANDROID)
string(REPLACE "opencv_" "" OPENCV_MODULES_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")

if(BUILD_FAT_JAVA_LIB)
set(OPENCV_LIBS_CONFIGMAKE java3)
set(OPENCV_LIBS_CONFIGMAKE java4)
else()
set(OPENCV_LIBS_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Here is a simple Java wrapper for our JNI stuff:
public class NativeGLRenderer {
static
{
System.loadLibrary("opencv_java3"); // comment this when using OpenCV Manager
System.loadLibrary("opencv_java4"); // comment this when using OpenCV Manager
System.loadLibrary("JNIrender");
}

Expand Down Expand Up @@ -383,7 +383,7 @@ Unfortunately `UMat` keeps OpenCL _buffer_ internally, that can't be wrapped ove
path/to/cmake.exe -GNinja -DCMAKE_MAKE_PROGRAM="path/to/ninja.exe" -DCMAKE_TOOLCHAIN_FILE=path/to/opencv/platforms/android/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a with NEON" -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON path/to/opencv
path/to/ninja.exe install/strip
@endcode
To use your own modified `libopencv_java3.so` you have to keep inside your APK, not to use OpenCV Manager and load it manually via `System.loadLibrary("opencv_java3")`.
To use your own modified `libopencv_java4.so` you have to keep inside your APK, not to use OpenCV Manager and load it manually via `System.loadLibrary("opencv_java4")`.

Performance notes
-----------------
Expand Down
2 changes: 1 addition & 1 deletion modules/java/android_sdk/build.gradle.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
// - avoid using of "OpenCVLoader.initAsync()" approach - it is deprecated
// It may load library with different version (from OpenCV Android Manager, which is installed separatelly on device)
//
// - use "System.loadLibrary("opencv_java3")" or "OpenCVLoader.initDebug()"
// - use "System.loadLibrary("opencv_java4")" or "OpenCVLoader.initDebug()"
// TODO: Add accurate API to load OpenCV native library
//
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ private boolean initOpenCVLibs(String Path, String Libs)
else
{
// If the dependencies list is not defined or empty.
String AbsLibraryPath = Path + File.separator + "libopencv_java3.so";
String AbsLibraryPath = Path + File.separator + "libopencv_java4.so";
result = loadLibrary(AbsLibraryPath);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static boolean initOpenCVLibs(String Libs)
else
{
// If dependencies list is not defined or empty.
result = loadLibrary("opencv_java3");
result = loadLibrary("opencv_java4");
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class NativePart {
static
{
System.loadLibrary("opencv_java3");
System.loadLibrary("opencv_java4");
System.loadLibrary("JNIpart");
}

Expand Down

0 comments on commit c6aa97c

Please sign in to comment.