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); } } } }
/** normalized to 120*120 PGM files.. */ public void normalize(String sampleImagePath, String trainedOutput) throws Exception { Loader.load(opencv_objdetect.class); String srcPath = sampleImagePath; String destPath = trainedOutput; File folder = new File(srcPath); File[] listOfFiles = folder.listFiles(); for (int i = 0; i < listOfFiles.length; i++) { if (listOfFiles[i].isFile()) { String files = listOfFiles[i].getName(); generatePGMFromPic(srcPath, files, destPath); } } }
static { Loader.load(); }
static { Loader.load(BulletNative.class); }