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

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

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

GUI.updateView介绍

暂无

代码示例

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView(image);
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView();
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView(image);
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView(image);
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView(image);
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView(image);
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView();
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView();
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView();
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView();
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView(image);
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

private void initGUI() {
  JFrame frame = createJFrame(windowName);
  updateView();
  frame.pack();
  frame.setLocationRelativeTo(null);
  frame.setVisible(true);
}

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

protected void processOperation() {
  if(adaptiveMeanString.equals(thresholdMode)){
    Imgproc.adaptiveThreshold(originalImage, image, maxval, Imgproc.ADAPTIVE_THRESH_MEAN_C, Imgproc.THRESH_BINARY, blockSize, constantC);    
  }
  else if(noneString.equals(thresholdMode)){
    image = originalImage.clone();
  }
  else{
    Imgproc.threshold(originalImage, image, level, maxval, modeMap.get(thresholdMode));
  }
  
  updateView(image);
}

代码示例来源: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

protected void processOperation() {
  Imgproc.cvtColor(originalImage, grayImage, Imgproc.COLOR_RGB2GRAY);
  Imgproc.equalizeHist(grayImage, image);
  updateView();
}

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

private void resetImage() {
  image = originalImage.clone();
  mask.setTo(new Scalar(0));
  Imgproc.cvtColor(originalImage, grayImage,Imgproc.COLOR_BGR2GRAY);
  updateView();
}

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

private void resetImage() {
  image = originalImage.clone();
  Mat temp = new Mat();
  Imgproc.cvtColor(image, temp,Imgproc.COLOR_BGR2GRAY);
  Imgproc.threshold(temp, binary, imageThreshold, 255.0, Imgproc.THRESH_BINARY_INV);
  
  updateView();
}

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

private void resetImage() {
  image = originalImage.clone();
  mask.setTo(new Scalar(0));
  Imgproc.cvtColor(originalImage, grayImage,Imgproc.COLOR_BGR2GRAY);
  updateView();
}

代码示例来源: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();
}

相关文章