function varargout = txcl(varargin)
%TXCL M-file for txcl.fig
% TXCL, by itself, creates a new TXCL or raises the existing
% singleton*.
%
% H = TXCL returns the handle to a new TXCL or the handle to
% the existing singleton*.
%
% TXCL('Property','Value',...) creates a new TXCL using the
% given property value pairs. Unrecognized properties are passed via
% varargin to txcl_OpeningFcn. This calling syntax produces a
% warning when there is an existing singleton*.
%
% TXCL('CALLBACK') and TXCL('CALLBACK',hObject,...) call the
% local function named CALLBACK in TXCL.M with the given input
% arguments.
%
% *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 txcl
% Last Modified by GUIDE v2.5 16-Jul-2016 20:06:54
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @txcl_OpeningFcn, ...
'gui_OutputFcn', @txcl_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 txcl is made visible.
function txcl_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 unrecognized PropertyName/PropertyValue pairs from the
% command line (see VARARGIN)
% Choose default command line output for txcl
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes txcl wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = txcl_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;
% --------------------------------------------------------------------
function Untitled_1_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_2_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_3_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_4_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_5_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_6_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function Untitled_31_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_31 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear
I=imread('dog.jpg');
[X,map]=rgb2ind(I,0.1);
nbcol=size(map,1);
colormap(pink(nbcol));
cod_X=wcodemat(X,nbcol);
[ca1,ch1,cv1,cd1]=dwt2(X,'db1');
cod_ca1=wcodemat(ca1,nbcol);
cod_ch1=wcodemat(ch1,nbcol);
cod_cv1=wcodemat(cv1,nbcol);
cod_cd1=wcodemat(cd1,nbcol);
subplot(1,1,1),image([cod_ca1,cod_ch1;cod_cv1,cod_cd1]);title('对dog索引图像的1次小波分解')
% --------------------------------------------------------------------
function Untitled_32_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_32 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear
I=imread('dog.jpg');
[X,map]=rgb2ind(I,0.1);
nbcol=size(map,1);
colormap(pink(nbcol));
cod_X=wcodemat(X,nbcol);
[ca1,ch1,cv1,cd1]=dwt2(X,'db1');
[ca2,ch2,cv2,cd2]=dwt2(ca1,'db1');
cod_ca2=wcodemat(ca2,nbcol);
cod_ch2=wcodemat(ch2,nbcol);
cod_cv2=wcodemat(cv2,nbcol);
cod_cd2=wcodemat(cd2,nbcol);
subplot(1,1,1),image([cod_ca2,cod_ch2;cod_cv2,cod_cd2])
title('对dog索引图像的2次小波分解')
% --------------------------------------------------------------------
function Untitled_33_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_33 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear
I=imread('dog.jpg');
[X,map]=rgb2ind(I,0.1);
nbcol=size(map,1);
colormap(pink(nbcol));
cod_X=wcodemat(X,nbcol);
[ca1,ch1,cv1,cd1]=dwt2(X,'db1');
a0=idwt2(ca1,ch1,cv1,cd1,'db1',size(X));
a0=wcodemat(a0,nbcol);
subplot(1,1,1),image(a0)
title('对dog索引图像的第一层重构')
% --------------------------------------------------------------------
function Untitled_34_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_34 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clear
I=imread('dog.jpg');
[X,map]=rgb2ind(I,0.1);
nbcol=size(map,1);
colormap(pink(nbcol));
cod_X=wcodemat(X,nbcol);
[ca1,ch1,cv1,cd1]=dwt2(X,'db1');
[ca2,ch2,cv2,cd2]=dwt2(ca1,'db1');
a0=idwt2(ca2,ch2,cv2,cd2,'db1',size(X));
a0=wcodemat(a0,nbcol);
subplot(1,1,1),image(a0)
title('对dog索引图像的第二层重构')
% --------------------------------------------------------------------
function Untitled_25_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_25 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
I=imread('dog.jpg');
V=0.02;
noise1=imnoise(I,'gaussian',0,V);%加高斯噪声
subplot(2,2,1),imshow(noise1);title('加高斯噪声')
noise=0.1*randn(size(I));%加随机噪声
noise2=imadd(I,im2uint8(noise));
subplot(2,2,2),imshow(noise2);title('加随机噪声')
noise3=imnoise(I,'salt & pepper', 0.02);
subplot(2,2,3),imshow(noise3);title('加椒盐噪声')
noise4=imnoise(I,'speckle',0.06);
subplot(2,2,4),imshow(noise4);title('加乘性噪声')
% --------------------------------------------------------------------
function Untitled_26_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_26 (see GCBO)
% e
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
CSDN海神之光上传的代码均可运行,亲测可用,直接替换数据即可,适合小白; 1、代码压缩包内容 主函数:txcl.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开txcl.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 图像处理、美颜、打靶、虹膜定位、图像去雨、LSD直线检测
资源推荐
资源详情
资源评论
收起资源包目录
【图像处理】基于matlab GUI图像处理系统【含Matlab源码 207期】.zip (12个子文件)
【图像处理】基于matlab GUI图像处理系统【含Matlab源码 207期】
运行结果.PNG 642KB
test2.asv 239B
transform.m 1KB
ind.mat 591KB
gray.bmp 170KB
txcl.fig 21KB
ind.bmp 470KB
test2.m 265B
bw.bmp 21KB
txcl.m 25KB
transform.asv 1KB
dog.jpg 25KB
共 12 条
- 1
资源评论
海神之光
- 粉丝: 3w+
- 资源: 2092
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功