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

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

本文整理了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

  1. /**
  2. * Perform an in place gaussian blur on the given Mat with a kernel of size kernel x kernel.
  3. *
  4. * @param mat
  5. * @param kernel
  6. * @return
  7. */
  8. public static Mat gaussianBlur(Mat mat, int kernel) {
  9. Imgproc.GaussianBlur(mat, mat, new Size(kernel, kernel), 0);
  10. return mat;
  11. }

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

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

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

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

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

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

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

  1. private void processOperation() {
  2. if(noneString.equals(filterMode)){
  3. output = image.clone();
  4. }
  5. else {
  6. output = new Mat(image.rows(), image.cols(), image.type());
  7. Size size = new Size(3.0, 3.0);
  8. if(blurString.equals(filterMode)){
  9. Imgproc.blur(image, output, size);
  10. }
  11. else if(gaussianString.equals(filterMode)){
  12. Imgproc.GaussianBlur(image, output, size, 0);
  13. }
  14. else if(medianString.equals(filterMode)){
  15. Imgproc.medianBlur(image, output, 3);
  16. }
  17. else if(bilateralString.equals(filterMode)){
  18. Imgproc.bilateralFilter(image, output, 9, 100, 100);
  19. }
  20. }
  21. }

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

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

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

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

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

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

相关文章

Imgproc类方法