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
0
  /** 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);
      }
    }
  }
예제 #3
0
 static {
   Loader.load();
 }
예제 #4
0
 static {
   Loader.load(BulletNative.class);
 }