【图像去噪】基于matlab图像去噪处理(低通、中值、均值和高斯滤波)【源码85期】

一、简介

基于matlab图像去噪处理(低通、中值、均值和高斯滤波),图像去噪是图像处理中的一个重要环节,其目的是为了从带有噪声的图像中恢复出原始、清晰的图像。MATLAB作为一种强大的数值计算和数据处理工具,提供了丰富的图像去噪算法和函数,其中中值滤波是一种常见且有效的去噪方法。本文将详细介绍MATLAB中中值滤波图像去噪的实现过程,并通过实例验证其有效性。

二、部分源码

function Untitled_5_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global im I0;
I0 = imnoise(im,'salt & pepper');
% 加入椒盐噪声并显示
axes(handles.axes2);
imshow(I0); 
h1=[handles.axes2 handles.text3];
set(h1,'visible','on');

% --------------------------------------------------------------------
function Untitled_6_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global im I0;
im1 = im2double(im);
I0 = imnoise(im1, 'gaussian');%加入高斯噪声
axes(handles.axes2);
imshow(I0);
h1=[ handles.axes2 handles.text4];
set(h1,'visible','on');

% --------------------------------------------------------------------
function Untitled_7_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% --------------------------------------------------------------------
function Untitled_8_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global I0 ; 
[B,A] = butter(6,0.2,'low');
I= filter(B,A,double(I0));
axes(handles.axes3);%低通
imshow(I,[]);
h1=[ handles.axes3 handles.text4];
set(h1,'visible','on');

% --------------------------------------------------------------------
function Untitled_9_Callback(hObject, eventdata, handles)
% hObject    handle to Untitled_9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global I0 ; 
I= medfilt2(I0);
axes(handles.axes3);%中值
imshow(I,[]);
h1=[ handles.axes3 handles.text4];
set(h1,'visible','on');

三、运行结果

 四、matlab版本

MATLAB R2019a

五、学习与交流

文中不足之处请大家多多指教,学习与交流可以联系企鹅:3752243968
文中部分源码仅供参考,若需要全部代码可以私信

  • 20
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值