function varargout = Imgproc(varargin)
% IMGPROC MATLAB code for Imgproc.fig
% IMGPROC, by itself, creates a new IMGPROC or raises the existing
% singleton*.
%
% H = IMGPROC returns the handle to a new IMGPROC or the handle to
% the existing singleton*.
%
% IMGPROC('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in IMGPROC.M with the given input arguments.
%
% IMGPROC('Property','Value',...) creates a new IMGPROC or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Imgproc_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Imgproc_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 Imgproc
% Last Modified by GUIDE v2.5 04-Jul-2012 23:55:05
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Imgproc_OpeningFcn, ...
'gui_OutputFcn', @Imgproc_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 Imgproc is made visible.
function Imgproc_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 Imgproc (see VARARGIN)
% Choose default command line output for Imgproc
%--------------------------画白板及初始化------------------------
handles.board=imread('whiteboard.jpg');
imshow(handles.board);
handles.pex=Pexe();
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes Imgproc wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --------------------------------------------------------------------
% --------------------------------------------------------------------
% --- Outputs from this function are returned to the command line.
function varargout = Imgproc_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 pushbutton_load.
function pushbutton_load_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_load (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({'*.jpg;*.png',...
'可以打开的文件';},'选定图片','MultiSelect','off');
fullpath=fullfile(pathname,filename);
handles.addr=fullpath;
Temp=imread(handles.addr);
handles.pex.getdata(Temp);
[x,y,z]=size(Temp);
handles.board=combo(handles.board,handles.pex.data);
imshow(handles.board);
guidata(hObject,handles);
% --------------------------------------------------------------------
% ------------------载入图像创建函数----------------------------------
% --- Executes during object creation, after setting all properties.
function pushbutton_load_CreateFcn(hObject, eventdata, handles)
% hObject handle to pushbutton_load (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
handles.pushbutton_load=hObject;
guidata(hObject,handles);
% --------------------------------------------------------------------
% -------------------图像信息------------------------------------------
% --- Executes on button press in pushbutton_info.
function pushbutton_info_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_info (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
info=imfinfo(handles.addr);
msgbox({'路径及名称';info.Filename;' ';...
'修改时间';info.FileModDate;' ';...
'文件大小';int2str(info.FileSize);' ';...
'文件格式';info.Format;' ';...
'图像高度';int2str(info.Height);' ';...
'图像宽度';int2str(info.Width);' ';...
'位深';int2str(info.BitDepth);' '},...
'原图信息');
guidata(hObject,handles);
% --------------------------------------------------------------------
% ------------------撤销按钮----------------------------------------
% --- Executes on button press in pushbutton_revoke.
function pushbutton_revoke_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_revoke (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);
%global T
%imshow(T);
%handles.img=T;
%guidata(hObject,handles);
% --------------------------------------------------------------------
% --------------------------------------------------------------------
%-------------------图层合成函数--------------
function C=combo(B,T)
[xt,yt,zt]=size(T);
for i=101:(100+xt)
for j=101:(100+yt)
for k=1:3
B(i,j,k)=T(i-100,j-100,k);
end
end
end
C=B;
return
% --------------------------------------------------------------------
% --------------------重做图像回调函数--------------------------------------
% --- Executes on button press in pushbutton_redo.
function pushbutton_redo_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton_redo (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Temp=imread(handles.addr);
handles.pex.getdata(Temp);
[x,y,z]=size(Temp);
handles.board=combo(handles.board,handles.pex.data);
imshow(handles.board);
set(handles.slider_huakua,'value',0);
guidata(hObject,handles);
% --------------------------------------------------------------------
% --------------------重做图像创建函数------------------------------
% --- Executes during object creation, after setting all properties.
function pushbutton_redo_CreateFcn(hObject, eventdata, handles)
% hObject handle to pushbutton_redo (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
handles.pushbutton_redo=hObject;
guidata(hObject,handles);
% --------------------------------------------------------------------
% --------------------保存文件---------------------------------------
% --- Executes on button press in pushbutton_save.
function pushbutton_save_Callback(hObject, eventdata, handles)
% hObject handle to pushbut
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
CSDN海神之光上传的代码均可运行,亲测可用,直接替换数据即可,适合小白; 1、代码压缩包内容 主函数:Imgproc.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开Imgproc.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 图像处理
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/TXT.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/DOC.png)
共 14 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/22c46cb7417b40989d92d67df86b9fff_tiqcmatlab.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
海神之光
- 粉丝: 3w+
- 资源: 2127
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- 基于LUT查找表方法的正弦信号产生器FPGA实现,包含testbench,包括程序,注释,操作步骤
- Screenshot_20240618_174113.jpg
- matlab画正余弦函数图的代码!!!!!
- 2_期末网店运营报告模版.pdf
- MyBatisCodeHelperPro 3.3.2-2322 2023.2-2024.1
- 基于Python的简单的学生成绩管理程序设计(课程设计)
- jdk-8u20-windows-x64安装版本-jdk-8u301-linux-x64解压版
- 植物大战僵尸杂交版 修改阳光和冷却
- html css js网页设计ntion-model-for-开发笔记
- 数据库课程设计-processing开发笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)