#include <opencv2/opencv.hpp>
#include<opencv2/core/core.hpp>
#include"opencv2/highgui/highgui.hpp"
#include<opencv2/imgproc/imgproc.hpp>
#include<iostream>
#include<time.h>
#include<vector>
using namespace std;
using namespace cv;
int main()
{
Mat src, src_gray, dst, abs_dst;
src = imread("C:/Users/离子键/source/repos/Project8/1.jpg");
imshow("【原始图】图像Laplace变换", src);
GaussianBlur(src,src,Size(3,3),0,0,BORDER_DEFAULT);
cvtColor(src,src_gray,COLOR_RGB2BGRA);
Laplacian(src_gray,dst,CV_16S,3,1,0,BORDER_DEFAULT);
convertScaleAbs(dst,abs_dst);
imshow("【效果图】",abs_dst);
waitKey(0);
return 0;
}
运行结果如图:
原版介绍: