1974年,法国工程师J.Morlet首先提出小波变换的概念,1986年著名数学家Y.Meyer偶然构造出一个真正的小波基,并与S.Mallat合作建立了构造小波基的多尺度分析之后,小波分析才开始蓬勃发展起来。小波分析的应用领域十分广泛,在数学方面,它已用于数值分析、构造快速数值方法、曲线曲面构造、微分方程求解、控制论等。在信号分析方面的滤波、去噪声、压缩、传递等。在图像处理方面的图像压缩、分类、识别与诊断,去噪声等。本章将着重阐述小波在图像中的应用分析。
1 小波变换原理
小波分析是一个比较难的分支,用户采用小波变换,可以实现图像压缩,振动信号的分解与重构等,因此在实际工程上应用较广泛。小波分析与Fourier变换相比,小波变换是空间域和频率域的局部变换,因而能有效地从信号中提取信息。小波变换通过伸缩和平移等基本运算,实现对信号的多尺度分解与重构,从而很大程度上解决了Fourier变换带来的很多难题。
小波分析作一个新的数学分支,它是泛函分析、Fourier分析、数值分析的完美结晶;小波分析也是一种“时间—尺度”分析和多分辨分析的新技术,它在信号分析、语音合成、图像压缩与识别、大气与海洋波分析等方面的研究,都有广泛的应用。
(1)小波分析用于信号与图像压缩。小波压缩的特点是压缩比高,压缩速度快,压缩后能保持信号与图像的特征不变,且在传递中能够抗干扰。基于小波分析的压缩方法很多,具体有小波压缩,小波包压缩,小波变换向量压缩等。
(2)小波也可以用于信号的滤波去噪、信号的时频分析、信噪分离与提取弱信号、求分形指数、信号的识别与诊断以及多尺度边缘检测等。
(3)小波分析在工程技术等方面的应用概括的包括计算机视觉、曲线设计、湍流、远程宇宙的研究与生物医学方面。
2 多尺度分析
3 图像的分解和量化
4 图像压缩编码
5 图像编码评价
function varargout = ImageProcessingGUI(varargin)
% IMAGEPROCESSINGGUI MATLAB code for ImageProcessingGUI.fig
% IMAGEPROCESSINGGUI, by itself, creates a new IMAGEPROCESSINGGUI or raises the existing
% singleton*.
%
% H = IMAGEPROCESSINGGUI returns the handle to a new IMAGEPROCESSINGGUI or the handle to
% the existing singleton*.
%
% IMAGEPROCESSINGGUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in IMAGEPROCESSINGGUI.M with the given input arguments.
%
% IMAGEPROCESSINGGUI('Property','Value',...) creates a new IMAGEPROCESSINGGUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ImageProcessingGUI_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ImageProcessingGUI_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 ImageProcessingGUI
% Last Modified by GUIDE v2.5 22-Apr-2021 17:38:13
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ImageProcessingGUI_OpeningFcn, ...
'gui_OutputFcn', @ImageProcessingGUI_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 ImageProcessingGUI is made visible.
function ImageProcessingGUI_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 ImageProcessingGUI (see VARARGIN)
% Choose default command line output for ImageProcessingGUI
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes ImageProcessingGUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = ImageProcessingGUI_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 button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)%(1)人脸渐变系统
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%读取原始图像和目标图像
originG = handles.SelectedImageOne;
targetG = handles.SelectedImageTwo;
axes(handles.axes1);
imshow(originG);
xlabel('原始图像');
axes(handles.axes2);
imshow(targetG);
xlabel('目标图像');
axes(handles.axes3);
l = 5;
N = 15;
P=N*l;
for k=0:P
I2=(1-k/P)*originG +(k/P)*targetG; %%线性叠加原理
image(I2);
axis off;
axis equal;
M=getframe;
end
movie(M,1,P);
imshow(I2);
xlabel('人脸渐变效果图');
guidata(hObject,handles);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles) %(2)图像拼接功能
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axes(handles.axes1);
img1 = handles.SelectedImageOne;
imshow(img1);
xlabel('左图像');
axes(handles.axes2);
img2 = handles.SelectedImageTwo;
imshow(img2);
xlabel('右图像');
axes(handles.axes3);
img0 = imMosaic(img2,img1,1); %调用图像拼接函数
imshow(img0);
xlabel('图像拼接效果图');
guidata(hObject,handles);%更新结构体
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles) %(3)图像聚焦融合功能
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%载入左图像
A=handles.SelectedImageOne;
X2=rgb2gray(A);
%显示聚焦图像
axes(handles.axes1);
xlabel('左聚焦图像');
axis square
%载入右图像
I=handles.SelectedImageTwo;
X1=rgb2gray(I);
%显示聚焦图像
axes(handles.axes2);
xlabel('右聚焦图像');
axis square
%融合
[c1,s1]=wavedec2(X1,2,'sym4');
sizec1=size(c1);
for I=1:sizec1(2)
c1(I)=1.2*c1(I);
end
[c2,s2]=wavedec2(X2,2,'sym4');
c=c1+c2;
c=0.5*c;
s=s1+s2;
s=0.5*s;
xx=waverec2(c,s,'sym4');
%显示融合后的图像
axes(handles.axes3);
imshow(xx,[]),xlabel('融合图像');
axis square
guidata(hObject,handles);
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles) %关闭图像功能
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axes(handles.axes1);
cla reset;
axes(handles.axes2);
cla reset;
axes(handles.axes3);
cla reset;
guidata(hObject,handles);
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles) %退出系统功能
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close;
完整代码或者代写添加QQ 912100926