首先,使用fspecial(T,P)产生一个laplace算子。
h1=fspecial('laplacian')%laplacian代表laplace滤波器
其次,进行滤波
A=imread('1.bmp');
B=imfilter(A,h1);
subplot(1,2,1),imshow(A);
subplot(1,2,2),imshow(B);
h1=fspecial('laplacian')%laplacian代表laplace滤波器
其次,进行滤波
A=imread('1.bmp');
B=imfilter(A,h1);
subplot(1,2,1),imshow(A);
subplot(1,2,2),imshow(B);
本文介绍如何使用 MATLAB 中的 fspecial 函数创建 Laplacian 算子,并将其应用于图像滤波。通过 imread 和 imfilter 函数读取图像并执行滤波操作,最后使用 subplot 和 imshow 展示原始图像与滤波后的效果。
1万+

被折叠的 条评论
为什么被折叠?



