资源简介
matlab gui,改变图像灰度级个数,使用sobel算子提取图像轮廓,包含对轮廓的信息量分析。运行前情添加压缩文件里的graylevel.m函数文件,回调函数中会用到。第一次运行直接打开figure文件后选择打开图片会有错误,请运行.m文件,再选择图片。
代码片段和文件信息
function varargout = GrayChange(varargin)
% GRAYCHANGE MATLAB code for GrayChange.fig
% GRAYCHANGE by itself creates a new GRAYCHANGE or raises the existing
% singleton*.
%
% H = GRAYCHANGE returns the handle to a new GRAYCHANGE or the handle to
% the existing singleton*.
%
% GRAYCHANGE(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in GRAYCHANGE.M with the given input arguments.
%
% GRAYCHANGE(‘Property‘‘Value‘...) creates a new GRAYCHANGE or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before GrayChange_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to GrayChange_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 GrayChange
% Last Modified by GUIDE v2.5 05-May-2015 00:08:16
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @GrayChange_OpeningFcn ...
‘gui_OutputFcn‘ @GrayChange_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 GrayChange is made visible.
function GrayChange_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 GrayChange (see VARARGIN)
% Choose default command line output for GrayChange
handles.output = hobject;
% Update handles structure
guidata(hobject handles);
% UIWAIT makes GrayChange wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = GrayChange_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)
global imGray;
[filenamepathname]=uigetfile({‘
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 92057 2015-05-21 16:29 GrayChange\GrayChange.fig
I.A.... 11371 2015-05-21 16:29 GrayChange\GrayChange.m
I.A.... 387 2015-05-04 23:06 GrayChange\graylevel.m
I..D... 0 2015-05-21 16:47 GrayChange
----------- --------- ---------- ----- ----
103815 4
相关资源
- PCA的MATLAB实现
- 全面详解LTE:MATLAB建模、仿真与实现
-
薛定宇 陈阳泉基于 MATLAB+Simuli
nk 的 - [数字滤波器的MATLAB与FPGA实现——Al
- 先进PID控制MATLAB仿真 PDF 高清文字版
- 电力电子技术课程设计 48W BUCK/BOOST电
- 滑模变结构控制MATLAB仿真 第3版 基本
- Matlab+cpp三维矩量法MoM通用计算程序
- 《MATLAB图像与视频处理实用案例详解
- 智能预测控制及其matlab实现207273
- FIR滤波器的MATLAB及FPGA实现代码
- insar图像配准及滤波
- 数字滤波器的MATLAB与FPGA实现:ALTERA
- MATLAB数字信号处理85个实用案例精讲入
- BLS宽度学习matlab代码.zip
- 放大转发AF模式的matlab仿真
- 单通道盲源分离SSA-ICA算法Matlab代码
- MIMO OFDM matlab仿真程序还有论文-MIMO
- 数字通信同步技术的MATLAB与FPGA实现完
- 数字信号处理MATLAB版高清版.pdf
- MATLAB R2016a完全自学一本通
- MATLAB在数学建模中的应用上下_源程序
- 先进PID控制MATLAB仿真.pdf
- MATLAB在数学建模中的应用卓金武
- 滑模变结构控制MATLAB仿真第3版+基本理
- MATLAB神经网络43个案例分析.pdf+源代码
- 系统辨识与自适应控制MATLAB仿真修订
- MATLAB数据探索性分析原书第二版
- Matlab提取图像的形状、纹理、颜色特
- 阻塞率matlab仿真
评论
共有 条评论