function varargout = ImageProcess(varargin)
% IMAGEPROCESS MATLAB code for ImageProcess.fig
% IMAGEPROCESS, by itself, creates a new IMAGEPROCESS or raises the existing
% singleton*.
%
% H = IMAGEPROCESS returns the handle to a new IMAGEPROCESS or the handle to
% the existing singleton*.
%
% IMAGEPROCESS('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in IMAGEPROCESS.M with the given input arguments.
%
% IMAGEPROCESS('Property','Value',...) creates a new IMAGEPROCESS or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ImageProcess_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ImageProcess_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 ImageProcess
% Last Modified by GUIDE v2.5 05-Jan-2016 23:29:12
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ImageProcess_OpeningFcn, ...
'gui_OutputFcn', @ImageProcess_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 ImageProcess is made visible.
function ImageProcess_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 ImageProcess (see VARARGIN)
% Choose default command line output for ImageProcess
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes ImageProcess wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = ImageProcess_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 file_Callback(hObject, eventdata, handles)
% hObject handle to file (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function openfile_Callback(hObject, eventdata, handles)
% hObject handle to openfile (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uigetfile({'*.tif';'*.bmp';'*.jpg';'*.jpeg'},'Pick an image-file');
if isequal(filename,0) || isequal(pathname,0)
disp('您取消了');
else
disp(['您选择了 ', fullfile(pathname, filename)])
end
x=imread(filename);
handles.E=1;
handles.noiseadded=0;
handles.noise=0;
[width,height,Cnums]=size(x);
a=log2(width);
b=log2(height);
set(handles.edit1,'string', width);
set(handles.edit2,'string', height);
axes(handles.axes2);
imshow(zeros([512,512]));
if (Cnums~=1)%通道数大于1
if (width>512)|(height>512)
W=max(width,height);
else
W=512;
end
for m=1:W
for n=1:W
if (m<=width)&(n<=height)
extendx(m,n,:)=x(m,n,:);
end
end
end
axes(handles.axes1);
imshow(extendx);
handles.rgb=x;
elseif (width>512)|(height>512)
W=max(width,height);
for m=1:W
for n=1:W
if (m<=width)&(n<=height)
extendx(m,n)=x(m,n);
%else
% extendx(m,n)=realmax;%最大值
end
end
end
axes(handles.axes1);
imshow(extendx);
%msgbox('图像的长或者宽已经超过了512','fileopening','warning')
elseif (width<512)|(height<512)
for m=1:512
for n=1:512
if (m<=width)&(n<=height)
extendx(m,n)=x(m,n);
% else
% extendx(m,n)=realmax;
end
end
end
axes(handles.axes1);
imshow(extendx);
%msgbox('图像的长或宽少于512!','fileopening','warning');
else
axes(handles.axes1);
imshow(x);
end
handles.imdata=x;
handles.reload=handles.imdata;
guidata(hObject, handles);%更新handles
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (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 edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (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 edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (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 edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (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 RGBtoGray_Callback(hObject, eventdata, handles)
% hObject handle to RGBtoGray (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
RGB=handles.rgb;
y=rgb2gray(RGB);
handles.imdata=y;
axes(handles.axes1);
imshow(y);
handles.imdata=y;
guidata(hObject, handles);
% --------------------------------------------------------------------
function LightingTransform_Callback(hObject, eventdata, handles)
% hObject handle to LightingTransform (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be define
没有合适的资源?快使用搜索试试~ 我知道了~
数字图像处理matlab GUI设计 实现各种功能
共18个文件
tif:15个
bmp:1个
m:1个
5星 · 超过95%的资源 需积分: 45 505 下载量 140 浏览量
2016-03-12
23:41:59
上传
评论 63
收藏 4.61MB RAR 举报
温馨提示
本人亲测,用matlab设计的GUI实现各种数字图像处理功能,有亮度变换,傅里叶变换,几何变换,彩色图像变换,小波变换,空域滤波,频域滤波,运动模糊,去噪声,加噪声,图像复原,图像压缩编码等各种功能均可实现。
资源推荐
资源详情
资源评论
收起资源包目录
matlab数字图像处理GUI各种功能.rar (18个子文件)
Fig0608(b) Big Color Circle.tif 1.06MB
Fig0413(a)(original_test_pattern).tif 245KB
噪声污染的电路板.tif 198KB
Fig0316(a)(moon).tif 246KB
Fig0604(a)(iris).tif 1.04MB
Fig0515(a)(base-with-control-points).tif 26KB
ImageProcess.fig 29KB
Fig0303(a)(breast).tif 277KB
Fig0409(a)(bld).tif 352KB
Fig0615(d)(Iris Original).tif.tif 782KB
Fig0602(b)(RGB_color_cube).tif 7.11MB
Fig0206(a)(rose-original).tif 1MB
Fig0617(a)(JLK Magenta).tif.tif 1.28MB
运动模糊的花.bmp 200KB
Fig0618(a)(Caster Original).tif.tif 2.68MB
椒盐噪声污染的花.tif 1016KB
ImageProcess.m 76KB
Fig0205(a)(cktboard_200dpi).tif 210KB
共 18 条
- 1
资源评论
- 啦格朗月2017-02-15请问可以详细说一下操作步骤吗,打开fig进入窗口后对窗口的操作好像木有反应呀,应该是我操作错了吧
- BUKESHUO-AI2018-07-14很不错,非常有用,值得拥有。
- chiamp2018-11-08还没有使用
- baidu_374268272017-12-31来学习学习
BJAIJYJ
- 粉丝: 4
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功