org.javaopencvbook.GUI.processOperation()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(205)

本文整理了Java中org.javaopencvbook.GUI.processOperation()方法的一些代码示例,展示了GUI.processOperation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GUI.processOperation()方法的具体详情如下:
包路径:org.javaopencvbook.GUI
类名称:GUI
方法名:processOperation

GUI.processOperation介绍

暂无

代码示例

代码示例来源:origin: JavaOpenCVBook/code

public void actionPerformed(ActionEvent event) {
    operation = event.getActionCommand();
    processOperation();
  }
};

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    lowThreshold  = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    yOrder = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    yOrder = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    highThreshold  = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    lowThreshold  = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    level = (int)source.getValue();
    processOperation();
    
    updateView(image);
    
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    maxval = (int)source.getValue();
    processOperation();
    
    updateView(image);
    
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    
    constantC  = (int)source.getValue();
    
    processOperation();
    
    updateView(image);
    
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    highThreshold  = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    JSlider source = (JSlider)e.getSource();
    xOrder = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    if(apertureSlider.getValueIsAdjusting())
      return;
    JSlider source = (JSlider)e.getSource();
    aperture = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void actionPerformed(ActionEvent event) {
    operation = event.getActionCommand();
    enableDisableSliders();
    processOperation();
  }
};

代码示例来源:origin: JavaOpenCVBook/code

public void stateChanged(ChangeEvent e) {
    if(apertureSlider.getValueIsAdjusting())
      return;
    JSlider source = (JSlider)e.getSource();
    aperture = (int)source.getValue();
    processOperation();
    updateView(image);
  }
});

代码示例来源:origin: JavaOpenCVBook/code

public void actionPerformed(ActionEvent event) {
    operation = event.getActionCommand();
    enableDisableSliders();
    processOperation();
  }
};

代码示例来源:origin: JavaOpenCVBook/code

public GUI(String windowName, Mat newImage) {
  super();
  this.windowName = windowName;
  this.image = newImage;
  originalImage = newImage.clone();
  processOperation();
  updateView();
}

代码示例来源:origin: JavaOpenCVBook/code

private void resetImage() {
  image = originalImage.clone();
  processOperation();
  updateView();
}

代码示例来源:origin: JavaOpenCVBook/code

public GUI(String windowName, Mat newImage) {
  super();
  this.windowName = windowName;
  this.image = newImage;
  originalImage = newImage.clone();
  mask.create(new Size(image.cols()+2, image.rows()+2), CvType.CV_8UC1);
  mask.setTo(new Scalar(0));
  
  Imgproc.cvtColor(newImage, grayImage,Imgproc.COLOR_BGR2GRAY);
  
  processOperation();
}

代码示例来源:origin: JavaOpenCVBook/code

public GUI(String windowName, Mat newImage) {
  super();
  this.windowName = windowName;
  this.image = newImage;
  originalImage = newImage.clone();
  mask.create(new Size(image.cols()+2, image.rows()+2), CvType.CV_8UC1);
  mask.setTo(new Scalar(0));
  
  Imgproc.cvtColor(newImage, grayImage,Imgproc.COLOR_BGR2GRAY);
  
  processOperation();
}

代码示例来源:origin: JavaOpenCVBook/code

private void addNoise() {
  image = originalImage.clone();
  Mat grayRnd = new Mat(image.rows(), image.cols(), image.type());
  double noise = 128;
  grayRnd.setTo(new Scalar(noise/2, noise/2, noise/2));
  Core.subtract(image, grayRnd, image);
  Core.randu(grayRnd, 0, noise);
  Core.add(image, grayRnd, image);
  processOperation();
  updateView();
}

相关文章