.10 Loại trừ nhiễu tín hiệu noissi2d với mức ngưỡng = 4;30

Một phần của tài liệu Nghiên cứu phương pháp loại trừ nhiễu ứng dụng lý thuyết wavelet (Trang 75 - 99)

74

3.3 Đánh giá kết quả

Quy trình khử nhiễu được thực hiện đối với tín hiệu bất kì trong đó nguồn nhiễu có phân bố chuẩn Gaussian. Thuật tốn khử nhiễu bằng biến đổi Wavelet có hiệu quả cao khi mà tín hiệu gốc có một vài các hệ số khác khơng. Với tín hiệu có chiều dài ngắn, khả năng khử nhiễu là tương đối tốt.

Thông qua kết quả mô phỏng của phép khử nhiễu áp dụng lý thuyết Wavelet. Lấy ngưỡng mềm và luật khử nhiễu Heuristic Sure sử dụng họ Wavelet Symlet cho thấy sai số của tín hiệu sau khi khử nhiễu so với tín hiệu gốc là thấp nhất.

Khi so sánh ngưỡng cứng và ngưỡng mềm, kết quả khử nhiễu phụ thuộc vào luật chọn ngưỡng, dạng nhiễu thêm vào. Sai số lớn nhất cho mọi dạng nhiễu với lấy ngưỡng mềm được đưa ra bởi các phương pháp Sqtwolog và Minimax còn với lấy ngưỡng cứng là Rigsure và Heuristic Sure. Nói chung phương pháp lấy ngưỡng mềm cho hiệu quả tốt hơn.

Kết luận: chương 3 đã thực hiện việc mơ phỏng khử nhiễu tín hiệu sử dụng

phân tích Wavelet và kỹ thuật lấy ngưỡng. Kết quả và hiệu quả khử nhiễu được thể hiện trực quan bằng hình ảnh biểu diễn tín hiệu trước và sau khi khử nhiễu.

75

KẾT LUẬN VÀ KIẾN NGHỊ

Bản luận văn đã nêu ra những nét tổng quan về phương pháp phân tích tín hiệu miền thời gian-tần số thông qua các phương pháp biến đổi Wavelet, đã đánh giá được ưu điểm vượt trội của phép biểu diễn tín hiệu thơng qua các hệ số biến đổi Wavelet. Bản luận văn cũng đã đề cập tới hệ thống lý thuyết cơ bản nhất về biến đổi Wavelet, các khái niệm và thuật toán chi tiết và đặc biệt xây dựng chương trình mơ phỏng ứng dụng để khử nhiễu. Chương trình mơ phỏng đầu vào gồm những dạng tín hiệu khác nhau; có sự so sánh giữa phương pháp chọn ngưỡng cứng, ngưỡng mềm, kiểm tra tác động của một số họ Wavelet cùng với tác động của nhiễu tới kết quả đầu ra. Kết quả cho thấy khả năng rất mạnh của biến đổi Wavelet trong xử lý tín hiệu. Kết quả nghiên cứu có thể đươc ứng dụng trong ngành xử lý tín hiệu hiện nay cụ thể như truyền và lưu trữ hình ảnh.

Hướng phát triển nghiên cứu

+ Có thể phát triển kết quả nghiên cứu cho lĩnh vực xử lý ảnh viễn thám, ảnh y sinh…

+ Để nâng cao hơn hiệu quả khử nhiễu có thể kết hợp phương pháp đặt ngưỡng tối ưu với ảnh nén.

+ Kết quả trong đề tài chỉ áp dụng cho tín hiệu 1 chiều (1D) và ảnh 2D tức là ảnh đen trắng. Vì thế có thể nghiên cứu phát triển lên ảnh 3D ( ảnh màu ).

Do hạn chế về mặt thời gian cũng như điều kiện nghiên cứu và các tài liệu tham khảo, nội dung của bản luận văn khơng tránh khỏi nhiều sai sót, Em rất mong nhận được sự góp ý của các thầy cơ,bạn bè và các đồng nghiệp để bản luận văn thực sự hữu ích cho người đọc.

Một lần nữa em xin chân thành cám ơn PGS.TS Nguyễn Văn Khang đã tận tình hướng dẫn, tạo điều kiện cho em trong quá trình làm luận

76

TÀI LIỆU THAM KHẢO

[1] Nguyễn Quốc Trung, “Xử lý tín hiệu và lọc số - Tập 1” , Nhà xuất bản Khoa học và Kỹ thuật , 1999.

[2] Nguyễn Quốc Trung, “Xử lý tín hiệu và lọc số - Tập 2” , Nhà xuất bản Khoa học và Kỹ thuật , 2001.

[3] Alfred Mertins, “Signal analyis. Wavelets, filter banks, time-frequency transform and applications” ,John Wiley & Son Ltd , 1999.

[4] Amara Graps, An Introduction to Wavelets, 1996

[5] Alyson Kerry Fletcher, Denoising via Recursive Wavelet Thresholding,2001 [6] Junhui Quian, Denoising by wavelet transform,2003

[7] Michel Misiti, Yves Misiti, Georges Oppenheim,Jean-Michel Poggi, Wavelet Toolbox, 2004

[8] V.Balakrishnan, Nash Borges, Luke parchment, Wavelet denoising and speech Enhancement, 2000

77

PHỤ LỤC

Nội dung code mô tả loại trừ nhiễu 1D

function varargout = loaitrunhieu1D(varargin)

% LOAITRUNHIEU1D M-file for loaitrunhieu1D.fig

% LOAITRUNHIEU1D, by itself, creates a new LOAITRUNHIEU1D or raises the existing

% singleton*. %

% H = LOAITRUNHIEU1D returns the handle to a new LOAITRUNHIEU1D or the handle to

% the existing singleton*. %

% LOAITRUNHIEU1D('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in LOAITRUNHIEU1D.M with the given input arguments.

%

% LOAITRUNHIEU1D('Property','Value',...) creates a new LOAITRUNHIEU1D or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before loaitrunhieu1D_OpeningFunction gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to loaitrunhieu1D_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 loaitrunhieu1D

78

% Last Modified by GUIDE v2.5 09-Oct-2011 12:46:55

% Begin initialization code - DO NOT EDIT gui_Singleton = 1;

gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ...

'gui_OpeningFcn', @loaitrunhieu1D_OpeningFcn, ... 'gui_OutputFcn', @loaitrunhieu1D_OutputFcn, ... 'gui_LayoutFcn', [] , ...

'gui_Callback', []);

if nargin && ischar(varargin{1})

gui_State.gui_Callback = str2func(varargin{1});

end

if nargout

[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});

else

gui_mainfcn(gui_State, varargin{:});

end

% End initialization code - DO NOT EDIT

% --- Executes just before loaitrunhieu1D is made visible.

function loaitrunhieu1D_OpeningFcn(hObject, eventdata, handles, varargin)

% This function has no output args, see OutputFcn. % hObject handle to figure

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% varargin command line arguments to loaitrunhieu1D (see VARARGIN)

% Choose default command line output for loaitrunhieu1D handles.output = hObject;

79

% Update handles structure guidata(hObject, handles);

% UIWAIT makes loaitrunhieu1D wait for user response (see UIRESUME) % uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.

function varargout = loaitrunhieu1D_OutputFcn(hObject, eventdata, handles)

% varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure varargout{1} = handles.output;

% --- Executes on selection change in wpopup.

function wpopup_Callback(hObject, eventdata, handles)

set(handles.dbtxt,'string',''); switch get(handles.wpopup,'value') case 1 set(handles.dbpopup,'visible','off'); set(handles.sympopup,'visible','off'); set(handles.coifpopup,'visible','off'); set(handles.biorpopup,'visible','off'); set(handles.wtxt,'string',''); case 2 set(handles.dbpopup,'visible','off'); set(handles.sympopup,'visible','off'); set(handles.coifpopup,'visible','off');

80 set(handles.biorpopup,'visible','off'); set(handles.wtxt,'string','haar'); case 3 set(handles.dbpopup,'visible','on'); set(handles.sympopup,'visible','off'); set(handles.coifpopup,'visible','off'); set(handles.biorpopup,'visible','off'); set(handles.wtxt,'string','db'); case 4 set(handles.dbpopup,'visible','off'); set(handles.sympopup,'visible','on'); set(handles.coifpopup,'visible','off'); set(handles.biorpopup,'visible','off'); set(handles.wtxt,'string','sym'); case 5 set(handles.dbpopup,'visible','off'); set(handles.sympopup,'visible','off'); set(handles.coifpopup,'visible','on'); set(handles.biorpopup,'visible','off'); set(handles.wtxt,'string','coif'); case 6 set(handles.dbpopup,'visible','off'); set(handles.sympopup,'visible','off'); set(handles.coifpopup,'visible','off'); set(handles.biorpopup,'visible','on'); set(handles.wtxt,'string','bior'); case 7 set(handles.dbpopup,'visible','off'); set(handles.sympopup,'visible','off'); set(handles.coifpopup,'visible','off'); set(handles.biorpopup,'visible','off');

81 set(handles.wtxt,'string','dmey');

end

% hObject handle to wpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns wpopup contents as cell array % contents{get(hObject,'Value')} returns selected item from wpopup

% --- Executes during object creation, after setting all properties.

function wpopup_CreateFcn(hObject, eventdata, handles)

% hObject handle to wpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in dbpopup.

function dbpopup_Callback(hObject, eventdata, handles)

set(handles.dbtxt,'string',''); switch get(handles.dbpopup,'value') case 1 set(handles.dbtxt,'string',''); case 2 set(handles.dbtxt,'string','1');

82 case 3 set(handles.dbtxt,'string','2'); case 4 set(handles.dbtxt,'string','3'); case 5 set(handles.dbtxt,'string','4'); case 6 set(handles.dbtxt,'string','5'); case 7 set(handles.dbtxt,'string','6'); case 8 set(handles.dbtxt,'string','7'); case 9 set(handles.dbtxt,'string','8'); case 10 set(handles.dbtxt,'string','9'); case 11 set(handles.dbtxt,'string','10'); end

% hObject handle to dbpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns dbpopup contents as cell array % contents{get(hObject,'Value')} returns selected item from dbpopup

% --- Executes during object creation, after setting all properties.

function dbpopup_CreateFcn(hObject, eventdata, handles)

% hObject handle to dbpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

83

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in sympopup.

function sympopup_Callback(hObject, eventdata, handles)

set(handles.dbtxt,'string',''); switch get(handles.sympopup,'value') case 1 set(handles.dbtxt,'string',''); case 2 set(handles.dbtxt,'string','2'); case 3 set(handles.dbtxt,'string','3'); case 4 set(handles.dbtxt,'string','4'); case 5 set(handles.dbtxt,'string','5'); case 6 set(handles.dbtxt,'string','6'); case 7 set(handles.dbtxt,'string','7'); case 8 set(handles.dbtxt,'string','8'); end

84

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns sympopup contents as cell array % contents{get(hObject,'Value')} returns selected item from sympopup

% --- Executes during object creation, after setting all properties.

function sympopup_CreateFcn(hObject, eventdata, handles)

% hObject handle to sympopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in coifpopup.

function coifpopup_Callback(hObject, eventdata, handles)

set(handles.dbtxt,'string',''); switch get(handles.coifpopup,'value') case 1 set(handles.dbtxt,'string',''); case 2 set(handles.dbtxt,'string','1'); case 3 set(handles.dbtxt,'string','2'); case 4

85 set(handles.dbtxt,'string','3'); case 5 set(handles.dbtxt,'string','4'); case 6 set(handles.dbtxt,'string','5'); end

% hObject handle to coifpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns coifpopup contents as cell array % contents{get(hObject,'Value')} returns selected item from coifpopup

% --- Executes during object creation, after setting all properties.

function coifpopup_CreateFcn(hObject, eventdata, handles)

% hObject handle to coifpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in biorpopup.

function biorpopup_Callback(hObject, eventdata, handles)

set(handles.dbtxt,'string','');

86 case 1 set(handles.dbtxt,'string',''); case 2 set(handles.dbtxt,'string','1.1'); case 3 set(handles.dbtxt,'string','1.3'); case 4 set(handles.dbtxt,'string','1.5'); case 5 set(handles.dbtxt,'string','2.2'); case 6 set(handles.dbtxt,'string','2.4'); case 7 set(handles.dbtxt,'string','2.6'); case 8 set(handles.dbtxt,'string','2.8'); case 9 set(handles.dbtxt,'string','3.1'); case 10 set(handles.dbtxt,'string','3.3'); case 11 set(handles.dbtxt,'string','3.5'); case 12 set(handles.dbtxt,'string','3.7'); case 13 set(handles.dbtxt,'string','3.9'); case 14 set(handles.dbtxt,'string','4.4'); case 15 set(handles.dbtxt,'string','5.5'); case 16

87 set(handles.dbtxt,'string','6.8');

end

% hObject handle to biorpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns biorpopup contents as cell array % contents{get(hObject,'Value')} returns selected item from biorpopup

% --- Executes during object creation, after setting all properties.

function biorpopup_CreateFcn(hObject, eventdata, handles)

% hObject handle to biorpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in dbpopup.

function popupmenu7_Callback(hObject, eventdata, handles)

% hObject handle to dbpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

88

% contents{get(hObject,'Value')} returns selected item from dbpopup

% --- Executes during object creation, after setting all properties.

function popupmenu7_CreateFcn(hObject, eventdata, handles)

% hObject handle to dbpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in popupmenu11.

function popupmenu11_Callback(hObject, eventdata, handles)

% hObject handle to popupmenu11 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns popupmenu11 contents as cell array % contents{get(hObject,'Value')} returns selected item from popupmenu11

% --- Executes during object creation, after setting all properties.

function popupmenu11_CreateFcn(hObject, eventdata, handles)

% hObject handle to popupmenu11 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

89

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on selection change in popupmenu12.

function popupmenu12_Callback(hObject, eventdata, handles)

% hObject handle to popupmenu12 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns popupmenu12 contents as cell array % contents{get(hObject,'Value')} returns selected item from popupmenu12

% --- Executes during object creation, after setting all properties.

function popupmenu12_CreateFcn(hObject, eventdata, handles)

% hObject handle to popupmenu12 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on button press in radiobutton1.

90 % hObject handle to radiobutton1 (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of radiobutton1

% --- Executes on selection change in funpopup.

function funpopup_Callback(hObject, eventdata, handles)

set(handles.funtxt,'string',''); switch get(handles.funpopup,'value') case 1 set(handles.funtxt,'string',''); case 2 set(handles.funtxt,'string','1'); case 3 set(handles.funtxt,'string','2'); case 4 set(handles.funtxt,'string','3'); case 5 set(handles.funtxt,'string','4'); case 6 set(handles.funtxt,'string','5'); case 7 set(handles.funtxt,'string','6'); end

% hObject handle to funpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

91

% contents{get(hObject,'Value')} returns selected item from funpopup

% --- Executes during object creation, after setting all properties.

function funpopup_CreateFcn(hObject, eventdata, handles)

% hObject handle to funpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

function SNtxt_Callback(hObject, eventdata, handles)

% hObject handle to SNtxt (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 SNtxt as text

% str2double(get(hObject,'String')) returns contents of SNtxt as a double % --- Executes during object creation, after setting all properties.

function SNtxt_CreateFcn(hObject, eventdata, handles)

% hObject handle to SNtxt (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.

92

if ispc && isequal(get(hObject,'BackgroundColor'),

get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');

end

% --- Executes on button press in sradio.

function sradio_Callback(hObject, eventdata, handles)

st= get(handles.sradio,'value'); if st==1 set (handles.hradio,'value',0) set (handles.sorhtxt,'string','s') %else % set (handles.sorhtxt,'string','') else set (handles.hradio,'value',1) set (handles.sorhtxt,'string','h') end

% hObject handle to sradio (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of sradio

% --- Executes on button press in hradio.

function hradio_Callback(hObject, eventdata, handles)

st1= get(handles.hradio,'value');

if st1==1

set (handles.sradio,'value',0) set (handles.sorhtxt,'string','h')

93 %else %set (handles.sorhtxt,'string','') else set (handles.sradio,'value',1) set (handles.sorhtxt,'string','s') end

% hObject handle to hradio (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of hradio

% --- Executes on selection change in tptrpopup.

function tptrpopup_Callback(hObject, eventdata, handles) switch get(handles.tptrpopup,'value') case 1 set(handles.tptrtxt,'string',''); case 2 set(handles.tptrtxt,'string','rigrsure'); case 3 set(handles.tptrtxt,'string','heursure'); case 4 set(handles.tptrtxt,'string','sqtwolog'); case 5 set(handles.tptrtxt,'string','minimaxi'); end

% hObject handle to tptrpopup (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

94

% Hints: contents = get(hObject,'String') returns tptrpopup contents as cell array % contents{get(hObject,'Value')} returns selected item from tptrpopup

Một phần của tài liệu Nghiên cứu phương pháp loại trừ nhiễu ứng dụng lý thuyết wavelet (Trang 75 - 99)

Tải bản đầy đủ (PDF)

(99 trang)