本文整理汇总了Java中com.googlecode.javacpp.Loader.load方法的典型用法代码示例。如果您正苦于以下问题:Java Loader.load方法的具体用法?Java Loader.load怎么用?Java Loader.load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.googlecode.javacpp.Loader
的用法示例。
在下文中一共展示了Loader.load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.avutil.class);
Loader.load(com.googlecode.javacv.cpp.avcodec.class);
Loader.load(com.googlecode.javacv.cpp.avformat.class);
Loader.load(com.googlecode.javacv.cpp.swscale.class);
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception)t;
} else {
throw loadingException = new Exception("Failed to load " + FFmpegFrameRecorder.class, t);
}
}
}
}
示例2: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.avutil.class);
Loader.load(com.googlecode.javacv.cpp.avcodec.class);
Loader.load(com.googlecode.javacv.cpp.avformat.class);
Loader.load(com.googlecode.javacv.cpp.swscale.class);
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception)t;
} else {
throw loadingException = new Exception("Failed to load " + NewFFmpegFrameRecorder.class, t);
}
}
}
}
示例3: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.avutil.class);
Loader.load(com.googlecode.javacv.cpp.avcodec.class);
Loader.load(com.googlecode.javacv.cpp.avformat.class);
Loader.load(com.googlecode.javacv.cpp.avdevice.class);
Loader.load(com.googlecode.javacv.cpp.swscale.class);
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception)t;
} else {
throw loadingException = new Exception("Failed to load " + FFmpegFrameGrabber.class, t);
}
}
}
}
示例4: FaceView
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public FaceView(FacePreview context) throws IOException {
super(context);
// Load the classifier file from Java resources.
File classifierFile = Loader.extractResource(getClass(),
"/com/googlecode/javacv/facepreview/haarcascade_frontalface_alt.xml",
context.getCacheDir(), "classifier", ".xml");
if (classifierFile == null || classifierFile.length() <= 0) {
throw new IOException("Could not extract the classifier file from Java resource.");
}
// Preload the opencv_objdetect module to work around a known bug.
Loader.load(opencv_objdetect.class);
classifier = new CvHaarClassifierCascade(cvLoad(classifierFile.getAbsolutePath()));
classifierFile.delete();
if (classifier.isNull()) {
throw new IOException("Could not load the classifier file.");
}
storage = CvMemStorage.create();
}
示例5: init
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
@Override public void init() {
try {
// Load the classifier file from Java resources.
String classiferName = "haarcascade_frontalface_alt.xml";
File classifierFile = Loader.extractResource(classiferName, null, "classifier", ".xml");
if (classifierFile == null || classifierFile.length() <= 0) {
throw new IOException("Could not extract \"" + classiferName + "\" from Java resources.");
}
// Preload the opencv_objdetect module to work around a known bug.
Loader.load(opencv_objdetect.class);
classifier = new CvHaarClassifierCascade(cvLoad(classifierFile.getAbsolutePath()));
classifierFile.delete();
if (classifier.isNull()) {
throw new IOException("Could not load the classifier file.");
}
storage = CvMemStorage.create();
} catch (Exception e) {
if (exception == null) {
exception = e;
repaint();
}
}
}
示例6: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.avutil.class);
Loader.load(com.googlecode.javacv.cpp.avcodec.class);
Loader.load(com.googlecode.javacv.cpp.avformat.class);
Loader.load(com.googlecode.javacv.cpp.swscale.class);
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception) t;
} else {
throw loadingException = new Exception("Failed to load " + FFmpegFrameRecorder.class, t);
}
}
}
}
示例7: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.avutil.class);
Loader.load(com.googlecode.javacv.cpp.avcodec.class);
Loader.load(com.googlecode.javacv.cpp.avformat.class);
Loader.load(com.googlecode.javacv.cpp.avdevice.class);
Loader.load(com.googlecode.javacv.cpp.swscale.class);
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception)t;
} else {
throw loadingException = new Exception(t);
}
}
}
}
示例8: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.freenect.class);
} catch (Throwable t) {
throw loadingException = new Exception("Failed to load " + OpenKinectFrameGrabber.class, t);
}
}
}
示例9: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.videoInputLib.class);
} catch (Throwable t) {
throw loadingException = new Exception("Failed to load " + VideoInputFrameGrabber.class, t);
}
}
}
示例10: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.opencv_highgui.class);
} catch (Throwable t) {
throw loadingException = new Exception("Failed to load " + OpenCVFrameGrabber.class, t);
}
}
}
示例11: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.PGRFlyCapture.class);
} catch (Throwable t) {
throw loadingException = new Exception("Failed to load " + FlyCaptureFrameGrabber.class, t);
}
}
}
示例12: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.dc1394.class);
} catch (Throwable t) {
throw loadingException = new Exception("Failed to load " + DC1394FrameGrabber.class, t);
}
}
}
示例13: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.opencv_highgui.class);
} catch (Throwable t) {
throw loadingException = new Exception("Failed to load " + OpenCVFrameRecorder.class, t);
}
}
}
示例14: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.freenect.class);
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception)t;
} else {
throw loadingException = new Exception(t);
}
}
}
}
示例15: tryLoad
import com.googlecode.javacpp.Loader; //导入方法依赖的package包/类
public static void tryLoad() throws Exception {
if (loadingException != null) {
throw loadingException;
} else {
try {
Loader.load(com.googlecode.javacv.cpp.videoInputLib.class);
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception)t;
} else {
throw loadingException = new Exception(t);
}
}
}
}