c++
#include"all.h"
using namespace std;
using namespace cv;
void MyClass::day033() {
Mat img = read(PATH + "images\\test.jpg");
imshow("input", img);
Mat dst, blured;
GaussianBlur(img, blured, Size(3, 3), 0);
imshow("GuassianBlured", blured);
Laplacian(blured, dst, CV_32F, 1, 1.0, 127.0, BORDER_DEFAULT);
convertScaleAbs(dst, dst);
imshow("result", dst);
waitKey(0);
}
c++中新知识点:
Laplacian():实现Laplacian梯度挖掘,此处用该方法挖掘GaussianBlur模糊后的图像的梯度。
网友评论