欢迎光临散文网 会员登陆 & 注册

【图像去噪】基于维纳滤波实现图像去噪含Matlab源码

2022-05-18 23:54 作者:Matlab工程师  | 我要投稿

1 简介

分析了几种常见的图像去噪方法的去噪原理和缺点后,主要研究了维纳滤波算法的去噪原理和其在实际应用中对高斯噪声的去除优点,通过实验对比维纳滤波算法和其他几种常见的图像去噪方法对高斯噪声的去噪效果,并分析不同参数对维纳滤波去噪效果的影响.实验结果表明,综合主观视觉效果和客观PSNR值而言,在去除高斯噪声时,维纳滤波可以取得更好的去噪效果,提高所获取图像的质量.

2 部分代码

function varargout = wiener_filter(varargin)% WIENER_FILTER M-file for wiener_filter.fig%      WIENER_FILTER, by itself, creates a new WIENER_FILTER or raises the existing%      singleton*.%%      H = WIENER_FILTER returns the handle to a new WIENER_FILTER or the handle to%      the existing singleton*.%%      WIENER_FILTER('CALLBACK',hObject,eventData,handles,...) calls the local%      function named CALLBACK in WIENER_FILTER.M with the given input arguments.%%      WIENER_FILTER('Property','Value',...) creates a new WIENER_FILTER or raises the%      existing singleton*.  Starting from the left, property value pairs are%      applied to the GUI before wiener_filter_OpeningFunction gets called.  An%      unrecognized property name or invalid value makes property application%      stop.  All inputs are passed to wiener_filter_OpeningFcn via varargin.%%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one%      instance to run (singleton)".%% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help wiener_filter% Last Modified by GUIDE v2.5 20-May-2009 10:04:40% Hint: popupmenu controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));end% --- Executes on selection change in image_pop_menu.%function image_pop_menu_Callback(hObject, eventdata, handles)% hObject    handle to image_pop_menu (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)%LEN = str2num(get(handles.len_edit,'string'));%THETA = str2num(get(handles.theta_edit,'string'));variance = str2num(get(handles.variance_edit,'string'));val = get(hObject,'value');str = get(hObject,'string');switch str{val}    case 'Lena'        lena = [];        lena = imread('lena.bmp');        img = lena;    case 'Saturn'        saturn = [];        load imdemos saturn        img = saturn;    case 'Quarter'        quarter = [];        load imdemos quarter        img = quarter;    case 'Flower'        flower = [];        load imdemos flower        img = flower;    case 'Circuit'  e to theta_edit (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction theta_edit_Callback(hObject, eventdata, handles)% hObject    handle to theta_edit (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of theta_edit as text%        str2double(get(hObject,'String')) returns contents of theta_edit as a double% --- Executes during object creation, after setting all properties.function variance_edit_CreateFcn(hObject, eventdata, handles)% hObject    handle to variance_edit (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.%       See ISPC and COMPUTER.if ispc    set(hObject,'BackgroundColor','white');else    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction variance_edit_Callback(hObject, eventdata, handles)% hObject    handle to variance_edit (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of variance_edit as text%        str2double(get(hObject,'String')) returns contents of variance_edit as a double% --- Executes on button press in close_button.function close_button_Callback(hObject, eventdata, handles)% hObject    handle to close_button (see GCBO)% eventdata  reserved - to be defined in a future version of MATLAB% handles    structure with handles and user data (see GUIDATA)close(wiener_filter);

3 仿真结果

4 参考文献

[1]张东, 覃凤清, 曹磊,等. 基于维纳滤波的高斯含噪图像去噪[J]. 宜宾学院学报, 2013, 13(12):4.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。



【图像去噪】基于维纳滤波实现图像去噪含Matlab源码的评论 (共 条)

分享到微博请遵守国家法律