Opencv Laplace算子

//通过拉普拉斯-锐化边缘
kernel = (Mat_<float>(3,3)<<1,1,1,1,-8,1,1,1,1);//Laplace算子
filter2D(img2, img_laplance, CV_32F,kernel, Point(-1, -1), 0, BORDER_DEFAULT);
img2.convertTo(img_sharp, CV_32F);
img3 = img_sharp - img_laplance;

img3.convertTo(img3, CV_8UC3);
img_laplance.convertTo(img_laplance, CV_8UC3);

imshow(win3, img3);

posted @ 2018-10-03 10:04  西北逍遥  阅读(467)  评论(0编辑  收藏  举报