opencv学习之图像滤波预处理 #201906101646

`#include <opencv2/opencv.hpp>

using namespace cv;
using namespace std;

int main(){

Mat pic_src = imread("/Users/leung/Documents/imgs/lena.jpg");
Mat logo_src = imread("/Users/leung/Desktop/right.jpg");

Mat pic,pic_half,pic_gray1,pic_gray2,pic_median,pic_blur;
GaussianBlur(pic_src, pic, Size(5,5), 0);
medianBlur(pic_src, pic_median, 5);
blur(pic_src, pic_blur, Size(5,5));

// pyrDown(pic_src, pic_half);
// cvtColor(pic_half, pic_gray1, COLOR_BGR2GRAY);

//threshold(pic_gray1, pic_gray2, 170, 255, THRESH_BINARY);
imshow("pic_median", pic_median);
imshow("pic_blur", pic_blur);
imshow("pic", pic);

// imshow("gaussianblur",pic_src);
waitKey();

return 0;

}`

上一篇:vue中设置背景图片的方式


下一篇:python自动下载图片