Beispiel #1
0
  private void processOperation() {
    Mat output = image.clone();
    if (erodeString.equals(currentOperation)) {

      output = imageProcessor.erode(image, kernelSize, currentShape);
    } else if (dilateString.equals(currentOperation)) {
      output = imageProcessor.dilate(image, kernelSize, currentShape);
    } else if (openString.equals(currentOperation)) {
      output = imageProcessor.open(image, kernelSize, currentShape);
    } else if (closeString.equals(currentOperation)) {
      output = imageProcessor.close(image, kernelSize, currentShape);
    }
    updateView(output);
  }
Beispiel #2
0
 private void updateView(Mat newMat) {
   Image outputImage = imageProcessor.toBufferedImage(newMat);
   imageView.setIcon(new ImageIcon(outputImage));
 }