org.opencv.imgproc.Imgproc.GaussianBlur()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(420)

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

Imgproc.GaussianBlur介绍

[英]Blurs an image using a Gaussian filter.

The function convolves the source image with the specified Gaussian kernel. In-place filtering is supported.
[中]使用高斯滤波器模糊图像。
该函数使用指定的高斯核卷积源图像。支持就地筛选。

代码示例

代码示例来源:origin: openpnp/openpnp

/**
 * Perform an in place gaussian blur on the given Mat with a kernel of size kernel x kernel.
 * 
 * @param mat
 * @param kernel
 * @return
 */
public static Mat gaussianBlur(Mat mat, int kernel) {
  Imgproc.GaussianBlur(mat, mat, new Size(kernel, kernel), 0);
  return mat;
}

代码示例来源:origin: openpnp/openpnp

@Override
  public Result process(CvPipeline pipeline) throws Exception {
    Mat mat = pipeline.getWorkingImage();
    Imgproc.GaussianBlur(mat, mat, new Size(kernelSize, kernelSize), 0);
    return null;
  }
}

代码示例来源:origin: openpnp/openpnp

public FluentCv blurGaussian(int kernelSize, String... tag) {
  Imgproc.GaussianBlur(mat, mat, new Size(kernelSize, kernelSize), 0);
  return store(mat, tag);
}

代码示例来源:origin: ytai/IOIOPlotter

Imgproc.GaussianBlur(edgesImage_, edgesImage_, new Size(21, 21), blur);

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

private void processOperation() {
  if(noneString.equals(filterMode)){
    output = image.clone();
  }
  else {
    output = new Mat(image.rows(), image.cols(), image.type());
    Size size = new Size(3.0, 3.0);
    if(blurString.equals(filterMode)){
      Imgproc.blur(image, output, size);
    }
    else if(gaussianString.equals(filterMode)){
      Imgproc.GaussianBlur(image, output, size, 0);
    }
    else if(medianString.equals(filterMode)){
      Imgproc.medianBlur(image, output, 3);
    }
    else if(bilateralString.equals(filterMode)){
      Imgproc.bilateralFilter(image, output, 9, 100, 100);
    }
    
  }
  
}

代码示例来源:origin: ytai/IOIOPlotter

Imgproc.GaussianBlur(imageScaledToPreview_, previewImage_, new Size(), blur);
} else {
  imageScaledToPreview_.assignTo(previewImage_);

代码示例来源:origin: us.ihmc/ihmc-perception

Imgproc.GaussianBlur(thresholdMat, thresholdMat, new Size(13, 13), 2, 2);

代码示例来源:origin: us.ihmc/IHMCPerception

Imgproc.GaussianBlur(thresholdMat, thresholdMat, new Size(13, 13), 2, 2);

相关文章

Imgproc类方法