-
大小: 951KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-05-15
- 语言: Matlab
- 标签:
资源简介
该课题为基于颜色的MATLAB设计。根据RGB不同分量,可以定位不同颜色,再结合形态学知识,可以精准去除干扰区域,如去除大于某阈值或者小于某阈值的面积,实现精准定位和计数。可以应用改造于路锥识别,交通标志,红绿灯,安全帽,不同颜色的餐盘等课题中,触类旁通,举一反三,是一个很好地课题。带有GUI可视化界面。
代码片段和文件信息
function varargout = Traffic_Iden(varargin)%
% TRAFFIC_IDEN MATLAB code for Traffic_Iden.fig
% TRAFFIC_IDEN by itself creates a new TRAFFIC_IDEN or raises the existing
% singleton*.
%
% H = TRAFFIC_IDEN returns the handle to a new TRAFFIC_IDEN or the handle to
% the existing singleton*.
%
% TRAFFIC_IDEN(‘CALLBACK‘hobjecteventDatahandles...) calls the local
% function named CALLBACK in TRAFFIC_IDEN.M with the given input arguments.
%
% TRAFFIC_IDEN(‘Property‘‘Value‘...) creates a new TRAFFIC_IDEN or raises the
% existing singleton*. Starting from the left property value pairs are
% applied to the GUI before Traffic_Iden_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Traffic_Iden_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 Traffic_Iden
% Last Modified by GUIDE v2.5 28-Feb-2021 18:58:13
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name‘ mfilename ...
‘gui_Singleton‘ gui_Singleton ...
‘gui_OpeningFcn‘ @Traffic_Iden_OpeningFcn ...
‘gui_OutputFcn‘ @Traffic_Iden_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 Traffic_Iden is made visible.
function Traffic_Iden_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 Traffic_Iden (see VARARGIN)
% Choose default command line output for Traffic_Iden
handles.output = hobject;
handles.cd0 = cd;
handles.Color = 0;
handles.I = [];
axes(handles.axes1);
set(gca‘Xtick‘[]);
set(gca‘Ytick‘[]);
box on;
axes(handles.axes2);
set(gca‘Xtick‘[]);
set(gca‘Ytick‘[]);
box on;
axes(handles.axes3);
set(gca‘Xtick‘[]);
set(gca‘Ytick‘[]);
box on;
axes(handles.axes4);
set(gca‘Xtick‘[]);
set(gca‘Ytick‘[]);
box on;
% Update handles structure
guidata(hobject handles);
% UIWAIT makes Traffic_Iden wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = Traffic_Iden_OutputFcn(hobject eventdata handles)
% varargout cell array for returning output args (see VARARGOUT);
% hobject handle t
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-08-02 22:08 MATLAB颜色识别[二次开发,GUI界面,详细注释]\
文件 161867 2020-08-01 00:58 MATLAB颜色识别[二次开发,GUI界面,详细注释]\GUI界面设计.jpg
文件 15603 2020-08-01 01:02 MATLAB颜色识别[二次开发,GUI界面,详细注释]\Traffic_Iden.fig
文件 12922 2020-08-01 01:02 MATLAB颜色识别[二次开发,GUI界面,详细注释]\Traffic_Iden.m
文件 5981 2020-05-31 17:17 MATLAB颜色识别[二次开发,GUI界面,详细注释]\bw.jpg
文件 325698 2020-06-11 10:36 MATLAB颜色识别[二次开发,GUI界面,详细注释]\安全帽.jpg
文件 511463 2020-08-01 00:57 MATLAB颜色识别[二次开发,GUI界面,详细注释]\效果图.jpg
文件 435 2020-08-01 14:56 MATLAB颜色识别[二次开发,GUI界面,详细注释]\文档说明.txt
文件 291 2020-08-02 22:06 MATLAB颜色识别[二次开发,GUI界面,详细注释]\运行方法.txt
评论
共有 条评论