资源简介
拉普拉斯边缘检测算子,matlab源程序,详细的源代码,效果经过实际检验.
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%读出要处理的图象
clear
clc
close all
bw=imread(‘e:\11.jpg‘);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%对图象进行预处理
%画出原始图象
bw1=rgb2gray(bw);
figure(1)
imshow(bw1)
title(‘原始图象‘)
%对图象进行均值滤波处理
bw2=filter2(fspecial(‘average‘3)bw1);
figure(2)
imshow(bw2)
title(‘均值滤波‘)
%对图象进行高斯滤波处理
bw3=filter2(fspecial(‘gaussian‘)bw2);
figure(3)
imshow(bw3)
title(‘高斯滤波‘)
%利用小波变换对图象进行降噪处理
[thrsorhkeepapp]=ddencmp(‘den‘‘wv‘bw3); %获得除噪的缺省参数
bw4=wdencmp(‘gbl‘bw3‘sym4‘2thrsorhkeepapp);%图象进行降噪处理
figure(4)
imshow(bw4)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
评论
共有 条评论