1 简介
基于LSB+DWT+DCT三种算法实现图像和音频水印嵌入提取。
1.1 LSB算法
根据LSB算法简单易实现的特点,结合在图像置乱技术中很好特性的Arnold变换。利用变化产生影子图像。通过LSB算法将影子图像嵌入到掩饰图像中,再利用LSB算法将图像的影子图像提取出来。将提取出来的影子图像经过文中设计的Arnold反变换恢复出原始。该方法不但有效地无损伤隐藏了图像,同样还保证了隐藏图像的安全性,无损伤性。
1.2 小波变换算法
**2 基于DWT的音频水印算法**
**2.1 水印嵌入**
本文研究的音频水印算法是基于离散小波变换 (DWT) , 音频信号通过DWT变换, 在变换域中嵌入水印信息, 再经过逆变换 (IDWT) 从而得到嵌入水印的音频信号。水印嵌入原理框图如图1所示。
假定水印为M1×M2的二维图像bw, 由于音频信号通常为一维向量, 故水印信息在嵌入音频信号之前需要将二维降至一维向量w, 即M=M1×M2。通常我们也可以将图像进行打乱加密, 增强水印隐蔽性。
假定语音信号为s, 长度为N, 则s={s1, s2, s3, …, sN}由于语音信号较长在处理中一般需要进行分段, 每段长度设为N1, 故该语音信号分为K=fix (N/N1) 段进行处理, 每段语音均嵌入一个水印信息。
小波变换是为了解决傅立叶变换的不足而提出的一种分析变换, 傅立叶变换的基函数是铺满整个时域的正弦信号, 对于突变信号以及变化的频率成分信息均不能较准确地表示。而小波变换是时间和频率的局部变换, 更能准确地表示音频信号的频域特征, 常用的小波基有Haar小波、Daubechies (db N) 小波、Marr小波等。本文采用的小波基是Haar小波, 它是支撑域在t∈[0, 1]范围内的矩形波, 定义如下:
图1 音频信号水印嵌入原理框图
图2 音频信号水印提取原理框图
取定Haar小波基后, 则语音信号s可以表示为:
其中Cj, k为离散小波系数, 将音频信号分解为低频的近似部分和高频的细节部分, 我们在水印信息的嵌入处理中, 主要针对代表低频近似部分的系数向量处理, 即将水印信号放入低频近似部分, 高频细节部分不变, 以保证语音质量基本不变。由于嵌入的水印为二值图像, 因此如果水印信息的值为1, 则将对应的低频系数增大, 相反如果值为0, 则将对应的低频系数降低。在DWT域嵌入水印信息后, 然后通过IDWT变换, 将语音信号变换成时域信号。
**2.2 水印提取**
为了保证信息安全, 在发送端发送嵌入水印的音频信号, 而在接收端为了确定音频信息的准确性, 我们通常需要提取水印以确保来源的真实性, 因此水印的提取技术也尤为重要。在水印提取过程中, 需要原始音频信号与嵌入水印的音频信号同时进行DWT, 再将两者参数进行分析比较提取出水印信息。水印提取原理框图如图2所示。
在前面所述的水印嵌入过程中, 将水印信息嵌入高频的细节部分, 因此在提取水印过程中, 我们也只需比较原始语音信号S的低频小波系数向量c A与嵌入水印的音频信号s1的低频小波系数向量c A1作比较, 若c A1>c A, 则水印信息为1;反之则为0, 再通过向量平均, 如此得到水印信息的一维向量, 最后通过升维得到二值图像.
1.3 DCT算法
在图像隐写分析中,这几个特征是比较经典的 图像隐写分析中DCT特征与Markov特征展现出了极大a的潜力,小波变换的奇异值分解(Wavelet Singular Value Decomposition , WSVD)特征也有奇效,本文实现前人论文的特征提取编程代码。 先说说理论知识 1 扩展DCT统计特征提取 大多数的隐密算法都是对JPEG图像的DCT系数进行操作,以此来嵌入秘密信息。DCT系数统计特征,旨在捕捉DCT系数的统计量的特征,以此来区分载体图像和隐密图像。 DCT系数统计算法由Fridrich【1】提出,其中包含了DCT系数直方图,共生矩阵,空域块间相关性等部分。首先用DCT系数替换相同位置的原始图像像素,使用dij(k) 来表示DCT系数矩阵,其中i,j=1, … ,8,k=1, … ,nB。而dij(k)则代表的是在第k个8×8 DCT块中处于(i,j)位置的DCT系数,而DCT块一共有nB 块。为了减少计算量和特征维度,在计算特征之前需要进行预处理,将所有DCT系数值范围限定在[-5,5]之间,大于和小于该范围内的值全部变换为-5到+5之间。 其中,Ir和Ic表示图像DCT系数块的两种排列方式,分别是行扫描顺序和列扫描顺序。 接下来的两个特征Bα是从解压的JPEG图像中计算,也是一种块间相关性的特征:
在DCT系数统计的隐密分析中,Fridrich首次提出了用于隐密分析的“校准”概念和计算原理:特征计算函数F,训练或测试图像J1,将图像J1解压到空域并沿各个方向裁剪四个像素,然后使用同J1相同的量化表压缩得到的图像J2。f表示最终获取的特征,而最后的特征由f=F(J1)-F(J2)计算得到。
采用如此计算方式的原理如下:裁剪之后的图像和原始图像内容上大体上完全一致,虽然裁剪之后的图像失去了原来的DCT分块,但是其统计特征应与原来相差不多。而这个过程会对嵌入的信息十分敏感,使裁剪前后的特征差别较大。经过实验证明,如此提取特征的方法非常有效果。
总结来说,DCT系数统计特征对DCT系数全局和局部进行了统计分析,并且捕获DCT系数的块间相关性和空域像素的相关性等特征。对于JPEG图像来说,所有隐密算法都是针对DCT系数进行修改,该算法确实是有一定的效果。实验中,该特征集展现了不错的分析效果,在0.2的嵌入率情况下可以达到平均95%的准确率,但是对MB算法的效果一般,尤其是MB2。
原始DCT统计特征已经有一定的检测效果,本文先对其进行扩展,加强特征的检测效果。对于全局直方图函数H,可以得到范围在[-5,+ 5]中的元素个数的差异,包括全局直方图和局部直方图,局部直方图选择的位置为{(1, 2),(2, 1),(3, 1),(2, 2),(1, 3)}。因此,直方图特征是: 如此的DCT扩展特征共有193维,其特征组成见下表。
2 部分代码
function varargout = watermark(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @watermark_OpeningFcn, ...
'gui_OutputFcn', @watermark_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 watermark is made visible.
function watermark_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 watermark (see VARARGIN)
% Choose default command line output for watermark
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
h = handles.output; %返回其句柄
newIcon = javax.swing.ImageIcon('logo.gif')
figFrame = get(h,'JavaFrame'); %取得Figure的JavaFrame。
figFrame.setFigureIcon(newIcon); %修改图标
% box off;
% backgroudImage=importdata('keda.jpg');
% axes(handles.axes7);
% imshow(backgroudImage);
% axis off
% % UIWAIT makes watermark wait for user response (see UIRESUME)
% uiwait(handles.figure1);
%set(handles.pushbutton,'CDATA',图片名)
% --- Outputs from this function are returned to the command line.
function varargout = watermark_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 daka.
function daka_Callback(hObject, eventdata, handles)
global Raw_image
[filename, pathname]=uigetfile({'*.bmp','ALL FILES(*.*)'},'选择图片文件');
if isequal([filename pathname],[0,0])
return;
end
str=[pathname filename];%选择的声音文件路径和文件名
Raw_image=imread(str);
% handles.origil=Raw_imgae;
% guidata(hObject,handles);
axes(handles.axes2);
imshow(Raw_image);
title('宿主图像');
function water_Callback(hObject, eventdata, handles)
global Water_image flag flag2
[filename, pathname]=uigetfile({'*.bmp','ALL FILES(*.*)'},'选择图片文件');
if isequal([filename pathname],[0,0])
return;
end
str=[pathname filename];%选择的声音文件路径和文件名
Water_image=imread(str);
thresh = graythresh(Water_image); %自动确定二值化阈值
Water_image = double(im2bw(Water_image,thresh)); %对图像二值化
flag=0;
flag2=0;
axes(handles.axes1);
imshow(Water_image);
title('原水印');
function disorder_Callback(hObject, eventdata, handles)
global Water_image Water_image_disorder flag
prompt ={'请输入加密密钥(数字型)'};
answer =inputdlg(prompt);
key=str2num(answer{1});
Water_image_disorder=disorder(Water_image,key);
flag=1;
axes(handles.axes8);
imshow(Water_image_disorder);
title('置乱水印');
% --- Executes on button press in save.
function save_Callback(hObject, eventdata, handles)
global image
[filename]=uiputfile({'*.bmp'},'文件保存');
imwrite(image,filename);
% --------------------------------------------------------------------
function Menu_Callback(hObject, eventdata, handles)
% hObject handle to Menu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Menu1_Callback(hObject, eventdata, handles)
% --- Executes on slider movement.
function slider1_Callback(hObject, eventdata, handles)
% global Raw_image image Water_image_disorder Water_image flag
global val1
val1= get(hObject,'Value')/2;
set(handles.alpha1,'String',num2str(val1));
% if flag==1
% mark=Water_image_disorder;
% else
% mark=Water_image;
% end
% choose1 = get (handles.choose,'Value');
% if choose1==2
% [image,psnr]=dct_embed(Raw_image,mark);
% set(handles.PSNR,'String',num2str(psnr));
% axes(handles.axes3);
% imshow(uint8(image));
% title('嵌入后的图像');
% end
function slider1_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
% --- Executes on slider movement.
function slider2_Callback(hObject, eventdata, handles)
global val2
val2= get(hObject,'Value')/10;
set(handles.alpha2,'String',num2str(val2));
function slider2_CreateFcn(hObject, eventdata, handles)
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
function PSNR_Callback(hObject, eventdata, handles)
function PSNR_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function NC_Callback(hObject, eventdata, handles)
% hObject handle to NC (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 NC as text
% str2double(get(hObject,'String')) returns contents of NC as a double
% --- Executes during object creation, after setting all properties.
function NC_CreateFcn(hObject, eventdata, handles)
% hObject handle to NC (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in choose.
function choose_Callback(hObject, eventdata, handles)
% global val1 val2
choose1 = get (handles.choose,'Value');
if choose1==1
set(handles.slider1,'Enable','off');
set(handles.slider2,'Enable','off');
set(handles.disorder,'Enable','off');
end
if choose1==2
set(handles.slider1,'Enable','on');
set(handles.slider2,'Enable','on');
set(handles.disorder,'Enable','on');
end
if choose1==3
set(handles.slider1,'Enable','off');
set(handles.slider2,'Enable','off');
set(handles.disorder,'Enable','on');
end
% val1=0.1;
% val2=0.03;
function choose_CreateFcn(hObject, eventdata, handles)
% hObject handle to choose (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 extract.
function extract_Callback(hObject, eventdata, handles)
global Raw_image image markImage flag Water_image flag2 A_image
choose1 = get (handles.choose,'Value');
set(handles.gaosi,'Enable','on');
set(handles.jianqie,'Enable','on');
set(handles.salt,'Enable','on');
if choose1==1
if flag2==1
[mark,nc1]=lsb_extract(A_image,Water_image,flag);
axes(handles.axes4);
imshow(uint8(A_image));
title('嵌入后的图像');
else
[mark,nc1]=lsb_extract(image,Water_image,flag);
axes(handles.axes4);
imshow(uint8(image));
title('嵌入后的图像');
end
set(handles.NC,'String',num2str(nc1));
axes(handles.axes9);
imshow(Water_image);
title('原水印');
axes(handles.axes5)
imshow(mark);
title('提取水印');
axes(handles.axes6)
imshow((Raw_image));
title('原图像');
end
if choose1==2
if flag2==1
[mark,nc1]=dct_extract(Raw_image,A_image,Water_image,flag);
axes(handles.axes4);
imshow(uint8(A_image));
title('嵌入后的图像');
else
[mark,nc1]=dct_extract(Raw_image,image,Water_image,flag);
axes(handles.axes4);
imshow(uint8(image));
title('嵌入后的图像');
end
set(handles.NC,'String',num2str(nc1));
axes(handles.axes9);
imshow(Water_image);
title('原水印');
axes(handles.axes5)
imshow(mark);
title('提取水印');
axes(handles.axes6)
imshow(uint8(Raw_image));
title('原图像');
end
if choose1==3
if flag2==1
[mark,nc1]=dwt_extract(Raw_image,A_image,Water_image,flag);
axes(handles.axes4);
colormap(gray(256));
imshow(uint8(A_image));
title('嵌入后的图像');
else
[mark,nc1]=dwt_extract(Raw_image,image,Water_image,flag);
axes(handles.axes4);
colormap(gray(256));
imshow(uint8(image));
title('嵌入后的图像');
end
set(handles.NC,'String',num2str(nc1));
axes(handles.axes9);
imshow(Water_image);
title('原水印');
axes(handles.axes5)
imshow(mark);
title('提取水印');
axes(handles.axes6)
imshow(Raw_image);
title('原图像');
end
flag=0;
flag2=0;
function gaosi_Callback(hObject, eventdata, handles)
global image gaussionVal flag2 A_image
if (gaussionVal>0) & (gaussionVal<=1)
A_image=attack_gaussion(image,gaussionVal);
axes(handles.axes4);
imshow(A_image)
set(handles.salt,'Enable','off');
set(handles.jianqie,'Enable','off');
flag2=1;
else
h=warndlg('未选择高斯攻击强度!!!','警告');
return
end
% --- Executes on button press in jianqie.
function jianqie_Callback(hObject, eventdata, handles)
global image flag2 A_image
prompt ={'请输入剪切大小'};
response =inputdlg(prompt);
measure=str2num(response{1});
A_image=(attack_cut(image,measure));
axes(handles.axes4);
imshow(uint8(A_image));
set(handles.salt,'Enable','off');
set(handles.gaosi,'Enable','off');
flag2=1;
function salt_Callback(hObject, eventdata, handles)
global image saltVal flag2 A_image
if (saltVal>0) & (saltVal<=0.1)
A_image=attack_salt(image,saltVal);
axes(handles.axes4);
imshow(uint8(A_image));
set(handles.gaosi,'Enable','off');
set(handles.jianqie,'Enable','off');
flag2=1;
else
h=warndlg('未选择椒盐攻击强度!!!','警告');
return
end
% --- Executes on button press in embed.
function embed_Callback(hObject, eventdata, handles)
global Raw_image image Water_image_disorder Water_image flag markImage val1 val2
if flag==1
markImage=Water_image_disorder;
else
markImage=Water_image;
end
choose1 = get (handles.choose,'Value');
if choose1==1
[image,psnr]=lsb_embed(markImage,Raw_image);
set(handles.PSNR,'String',num2str(psnr));
axes(handles.axes3);
imshow(image);
title('嵌入后的图像');
set(handles.save,'Enable','on');
end
if choose1==2
if (val1>0)&(val1<=0.5)&(val2>0)&(val2<=0.1)
[image,psnr]=dct_embed(Raw_image,markImage,val1,val2);
set(handles.PSNR,'String',num2str(psnr));
axes(handles.axes3);
imshow(uint8(image));
title('嵌入后的图像');
set(handles.save,'Enable','on');
else
h=warndlg('未选择嵌入强度!!!','警告');
return
end
end
if choose1==3
[image,psnr]=dwt_embed(Raw_image,markImage);
set(handles.PSNR,'String',num2str(psnr));
axes(handles.axes3);
imshow(uint8(image));
title('嵌入后的图像');
set(handles.save,'Enable','on');
end
% --- Executes during object creation, after setting all properties.
function daka_CreateFcn(hObject, eventdata, handles)
% hObject handle to daka (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --------------------------------------------------------------------
function audio_Callback(hObject, eventdata, handles)
run('watermarking.m');
function alpha1_Callback(hObject, eventdata, handles)
% hObject handle to alpha1 (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 alpha1 as text
% str2double(get(hObject,'String')) returns contents of alpha1 as a double
% --- Executes during object creation, after setting all properties.
function alpha1_CreateFcn(hObject, eventdata, handles)
% hObject handle to alpha1 (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function alpha2_Callback(hObject, eventdata, handles)
% hObject handle to alpha2 (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 alpha2 as text
% str2double(get(hObject,'String')) returns contents of alpha2 as a double
% --- Executes during object creation, after setting all properties.
function alpha2_CreateFcn(hObject, eventdata, handles)
% hObject handle to alpha2 (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --------------------------------------------------------------------
function refresh_Callback(hObject, eventdata, handles)
cla(handles.axes1,'reset');
set(handles.axes1,'xTick',[]);
set(handles.axes1,'yTick',[]);
cla(handles.axes2,'reset');
set(handles.axes2,'xTick',[]);
set(handles.axes2,'yTick',[]);
cla(handles.axes3,'reset');
set(handles.axes3,'xTick',[]);
set(handles.axes3,'yTick',[]);
cla(handles.axes4,'reset');
set(handles.axes4,'xTick',[]);
set(handles.axes4,'yTick',[]);
cla(handles.axes5,'reset');
set(handles.axes5,'xTick',[]);
set(handles.axes5,'yTick',[]);
cla(handles.axes9,'reset');
set(handles.axes9,'xTick',[]);
set(handles.axes9,'yTick',[]);
cla(handles.axes6,'reset');
set(handles.axes6,'xTick',[]);
set(handles.axes6,'yTick',[]);
cla(handles.axes8,'reset');
set(handles.axes8,'xTick',[]);
set(handles.axes8,'yTick',[]);
clear all;clc;
% --- Executes on slider movement.
function gaussionIndensity_Callback(hObject, eventdata, handles)
global gaussionVal
gaussionVal= get(hObject,'Value');
set(handles.edit6,'String',num2str(gaussionVal));
function gaussionIndensity_CreateFcn(hObject, eventdata, handles)
% hObject handle to gaussionIndensity (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
% --- Executes on slider movement.
function slider4_Callback(hObject, eventdata, handles)
global saltVal
saltVal= get(hObject,'Value')/10;
set(handles.edit7,'String',num2str(saltVal));
function slider4_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (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 edit6 as text
% str2double(get(hObject,'String')) returns contents of edit6 as a double
% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit6 (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit7_Callback(hObject, eventdata, handles)
% hObject handle to edit7 (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 edit7 as text
% str2double(get(hObject,'String')) returns contents of edit7 as a double
% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit7 (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes during object creation, after setting all properties.
function uipanel2_CreateFcn(hObject, eventdata, handles)
% hObject handle to uipanel2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes during object creation, after setting all properties.
function axes2_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --- Executes during object creation, after setting all properties.
function axes1_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --- Executes during object creation, after setting all properties.
function axes8_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --- Executes during object deletion, before destroying properties.
function axes3_DeleteFcn(hObject, eventdata, handles)
% hObject handle to axes3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes during object creation, after setting all properties.
function axes3_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --- Executes during object creation, after setting all properties.
function axes4_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --- Executes during object creation, after setting all properties.
function axes5_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --- Executes during object creation, after setting all properties.
function axes9_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --- Executes during object creation, after setting all properties.
function axes6_CreateFcn(hObject, eventdata, handles)
set(hObject,'xTick',[]);
set(hObject,'ytick',[]);
% --------------------------------------------------------------------
function caitu_Callback(hObject, eventdata, handles)
run('gui.m');
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
- 43.
- 44.
- 45.
- 46.
- 47.
- 48.
- 49.
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
- 64.
- 65.
- 66.
- 67.
- 68.
- 69.
- 70.
- 71.
- 72.
- 73.
- 74.
- 75.
- 76.
- 77.
- 78.
- 79.
- 80.
- 81.
- 82.
- 83.
- 84.
- 85.
- 86.
- 87.
- 88.
- 89.
- 90.
- 91.
- 92.
- 93.
- 94.
- 95.
- 96.
- 97.
- 98.
- 99.
- 100.
- 101.
- 102.
- 103.
- 104.
- 105.
- 106.
- 107.
- 108.
- 109.
- 110.
- 111.
- 112.
- 113.
- 114.
- 115.
- 116.
- 117.
- 118.
- 119.
- 120.
- 121.
- 122.
- 123.
- 124.
- 125.
- 126.
- 127.
- 128.
- 129.
- 130.
- 131.
- 132.
- 133.
- 134.
- 135.
- 136.
- 137.
- 138.
- 139.
- 140.
- 141.
- 142.
- 143.
- 144.
- 145.
- 146.
- 147.
- 148.
- 149.
- 150.
- 151.
- 152.
- 153.
- 154.
- 155.
- 156.
- 157.
- 158.
- 159.
- 160.
- 161.
- 162.
- 163.
- 164.
- 165.
- 166.
- 167.
- 168.
- 169.
- 170.
- 171.
- 172.
- 173.
- 174.
- 175.
- 176.
- 177.
- 178.
- 179.
- 180.
- 181.
- 182.
- 183.
- 184.
- 185.
- 186.
- 187.
- 188.
- 189.
- 190.
- 191.
- 192.
- 193.
- 194.
- 195.
- 196.
- 197.
- 198.
- 199.
- 200.
- 201.
- 202.
- 203.
- 204.
- 205.
- 206.
- 207.
- 208.
- 209.
- 210.
- 211.
- 212.
- 213.
- 214.
- 215.
- 216.
- 217.
- 218.
- 219.
- 220.
- 221.
- 222.
- 223.
- 224.
- 225.
- 226.
- 227.
- 228.
- 229.
- 230.
- 231.
- 232.
- 233.
- 234.
- 235.
- 236.
- 237.
- 238.
- 239.
- 240.
- 241.
- 242.
- 243.
- 244.
- 245.
- 246.
- 247.
- 248.
- 249.
- 250.
- 251.
- 252.
- 253.
- 254.
- 255.
- 256.
- 257.
- 258.
- 259.
- 260.
- 261.
- 262.
- 263.
- 264.
- 265.
- 266.
- 267.
- 268.
- 269.
- 270.
- 271.
- 272.
- 273.
- 274.
- 275.
- 276.
- 277.
- 278.
- 279.
- 280.
- 281.
- 282.
- 283.
- 284.
- 285.
- 286.
- 287.
- 288.
- 289.
- 290.
- 291.
- 292.
- 293.
- 294.
- 295.
- 296.
- 297.
- 298.
- 299.
- 300.
- 301.
- 302.
- 303.
- 304.
- 305.
- 306.
- 307.
- 308.
- 309.
- 310.
- 311.
- 312.
- 313.
- 314.
- 315.
- 316.
- 317.
- 318.
- 319.
- 320.
- 321.
- 322.
- 323.
- 324.
- 325.
- 326.
- 327.
- 328.
- 329.
- 330.
- 331.
- 332.
- 333.
- 334.
- 335.
- 336.
- 337.
- 338.
- 339.
- 340.
- 341.
- 342.
- 343.
- 344.
- 345.
- 346.
- 347.
- 348.
- 349.
- 350.
- 351.
- 352.
- 353.
- 354.
- 355.
- 356.
- 357.
- 358.
- 359.
- 360.
- 361.
- 362.
- 363.
- 364.
- 365.
- 366.
- 367.
- 368.
- 369.
- 370.
- 371.
- 372.
- 373.
- 374.
- 375.
- 376.
- 377.
- 378.
- 379.
- 380.
- 381.
- 382.
- 383.
- 384.
- 385.
- 386.
- 387.
- 388.
- 389.
- 390.
- 391.
- 392.
- 393.
- 394.
- 395.
- 396.
- 397.
- 398.
- 399.
- 400.
- 401.
- 402.
- 403.
- 404.
- 405.
- 406.
- 407.
- 408.
- 409.
- 410.
- 411.
- 412.
- 413.
- 414.
- 415.
- 416.
- 417.
- 418.
- 419.
- 420.
- 421.
- 422.
- 423.
- 424.
- 425.
- 426.
- 427.
- 428.
- 429.
- 430.
- 431.
- 432.
- 433.
- 434.
- 435.
- 436.
- 437.
- 438.
- 439.
- 440.
- 441.
- 442.
- 443.
- 444.
- 445.
- 446.
- 447.
- 448.
- 449.
- 450.
- 451.
- 452.
- 453.
- 454.
- 455.
- 456.
- 457.
- 458.
- 459.
- 460.
- 461.
- 462.
- 463.
- 464.
- 465.
- 466.
- 467.
- 468.
- 469.
- 470.
- 471.
- 472.
- 473.
- 474.
- 475.
- 476.
- 477.
- 478.
- 479.
- 480.
- 481.
- 482.
- 483.
- 484.
- 485.
- 486.
- 487.
- 488.
- 489.
- 490.
- 491.
- 492.
- 493.
- 494.
- 495.
- 496.
- 497.
- 498.
- 499.
- 500.
- 501.
- 502.
- 503.
- 504.
- 505.
- 506.
- 507.
- 508.
- 509.
- 510.
- 511.
- 512.
3 仿真结果
4 参考文献
[1]吴和静, 闵昆龙, 刘芳,等. 基于DCT域的图像数字水印算法及matlab实现[J]. 中国科技信息, 2014(9):2.