接口:

blur(sourceImage,dstImage,Size(7,7)); // 图像模糊处理

示例代码:

#include <opencv.hpp>
#include <imgproc\imgproc.hpp>
#include <highgui.hpp>
using namespace std;
using namespace cv;
int main(void)
{
    //图像模糊操作
    Mat src = imread("002.jpg"); // 载入原始图像
    imshow("src image", src); // 显示原始图像
    Mat dst; // 构造目标类
    blur(src, dst,Size(5,5); // 进行均值滤波操作
    // size是以指定的长宽形状扫描
    imshow("dst image", dst); // 显示效果图
    waitKey(0); // 等待
    return 0;
}

 

  

相关文章:

  • 2021-10-09
  • 2021-05-05
  • 2021-12-19
  • 2022-12-23
  • 2021-11-07
  • 2021-04-08
  • 2021-08-20
  • 2021-12-13
猜你喜欢
  • 2021-11-15
  • 2021-05-08
  • 2022-12-23
  • 2021-09-28
  • 2021-10-25
  • 2021-09-04
  • 2021-12-08
相关资源
相似解决方案