【圖像去噪】基于維納濾波實(shí)現(xiàn)圖像去噪含Matlab源碼
1 簡(jiǎn)介
分析了幾種常見(jiàn)的圖像去噪方法的去噪原理和缺點(diǎn)后,主要研究了維納濾波算法的去噪原理和其在實(shí)際應(yīng)用中對(duì)高斯噪聲的去除優(yōu)點(diǎn),通過(guò)實(shí)驗(yàn)對(duì)比維納濾波算法和其他幾種常見(jiàn)的圖像去噪方法對(duì)高斯噪聲的去噪效果,并分析不同參數(shù)對(duì)維納濾波去噪效果的影響.實(shí)驗(yàn)結(jié)果表明,綜合主觀視覺(jué)效果和客觀PSNR值而言,在去除高斯噪聲時(shí),維納濾波可以取得更好的去噪效果,提高所獲取圖像的質(zhì)量.
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'));
end
function 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'));
end
function 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 仿真結(jié)果

4 參考文獻(xiàn)
[1]張東, 覃鳳清, 曹磊,等. 基于維納濾波的高斯含噪圖像去噪[J]. 宜賓學(xué)院學(xué)報(bào), 2013, 13(12):4.
博主簡(jiǎn)介:擅長(zhǎng)智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)、信號(hào)處理、元胞自動(dòng)機(jī)、圖像處理、路徑規(guī)劃、無(wú)人機(jī)等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問(wèn)題可私信交流。
部分理論引用網(wǎng)絡(luò)文獻(xiàn),若有侵權(quán)聯(lián)系博主刪除。
