Beispiel #1
0
  public static void process(double test, BufferedImage image, String[] args) {
    // 2) Transform
    if (test == 1) {
      SmartConsole.Print("Running Grayscale");

      Grayscale.compute(image);
    }

    if (test == 2) {
      SmartConsole.Print("Running Inverse");

      Inverse.compute(image);
    }

    if (test == 3) {
      int brightness = Integer.parseInt(args[3]);

      SmartConsole.Print("Running Brightness: " + brightness);

      Brightness.compute(image, brightness);
    }

    if (test == 4) {
      int treshold = Integer.parseInt(args[3]);

      SmartConsole.Print("Running Treshold: " + treshold);

      Treshold.compute(image, treshold);
    }

    if (test == 5.1) {
      SmartConsole.Print("Running Histogram Expension ALL");

      HistogramExpension.compute_all(image);
    }
    if (test == 5.2) {
      SmartConsole.Print("Running Histogram Expension AVG");

      HistogramExpension.compute_avg(image);
    }

    // Convolution Filter

    if (test == 6.1) {
      SmartConsole.Print("Running HighPass Filter");

      HighPass.compute(image);
    }

    if (test == 6.2) {
      SmartConsole.Print("Running LowPass Filter");

      LowPass.compute(image);
    }
    if (test == 6.3) {
      SmartConsole.Print("Running Gaussian Filter");

      GaussianFilter.compute(image);
    }
    if (test == 6.4) {
      SmartConsole.Print("Running Sobel Filter");

      SobelFilter.compute(image);
    }

    if (test == 7) {
      SmartConsole.Print("Running Finding Pupil");

      Pupil.compute(image);
    }
    if (test == 8) {
      SmartConsole.Print("Running KMM");

      KMM.compute(image);
    }
    if (test == 9) {
      SmartConsole.Print("Running FeatureExtraction");

      FeatureExtraction.compute(image);
    }
  }
Beispiel #2
0
 public static void usage() {
   SmartConsole.Print("java Main TestCase InputFilename OutputFileName");
 }