Package aist.science.aistcv
Class AistCVLoader
- java.lang.Object
-
- aist.science.aistcv.AistCVLoader
-
public class AistCVLoader extends Object
Loader which loads the native OpenCV dependencies for your platform
Currently we support 64bit Linux and Windows only!
Modified from OpenPnP OpenCV
- Author:
- Christoph Praschl, Jason von Nieda, adambenhamo, sirrrich, phrack
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcleanupShared()Removes the shared library path from theClassLoader.usr_pathsarray, as well as to thejava.library.pathsystem property.static voidloadLocally()Exactly once perClassLoader, extract the native binary from the classpath to a temporary location (which gets cleaned up on shutdown), and load that binary (viaSystem.load(String)).static voidloadShared()Exactly once perClassLoader, attempt to load the native library (viaSystem.loadLibrary(String)withCore.NATIVE_LIBRARY_NAME).
-
-
-
Method Detail
-
loadShared
public static void loadShared()
Exactly once perClassLoader, attempt to load the native library (viaSystem.loadLibrary(String)withCore.NATIVE_LIBRARY_NAME). If the first attempt fails, the native binary will be extracted from the classpath to a temporary location (which gets cleaned up on shutdown), that location is added to thejava.library.pathsystem property andClassLoader.usr_paths, and then another call to load the library is made. Note this method uses reflection to gain access to private memory inClassLoaderas there's no documented method to augment the library path at runtime. Spurious calls are safe.
-
cleanupShared
public static void cleanupShared()
Removes the shared library path from theClassLoader.usr_pathsarray, as well as to thejava.library.pathsystem property. Uses the reflection API to make the field accessible, and may be unsafe in environments with a security policy.
-
loadLocally
public static void loadLocally()
Exactly once perClassLoader, extract the native binary from the classpath to a temporary location (which gets cleaned up on shutdown), and load that binary (viaSystem.load(String)). Spurious calls are safe.
-
-