【成熟度檢測】基于RGB和HSV實現水果成熟度分級系統含Matlab源碼
【成熟度檢測】基于RGB和HSV實現水果成熟度分級系統含Matlab源碼
TT_Matlab
博主簡介:擅長智能優化算法、神經網絡預測、信號處理、元胞自動機、圖像處理、路徑規劃、無人機等多種領域的Matlab仿真,完整matlab代碼或者程序定制加qq1575304183。
1 簡介
許多研究結果表明,水果損失主要集中在采摘,包裝,保存等環節,達到近三分之一,其中一個重要的原因為不同成熟度的水果相互混雜.因而,區分水果的成熟度并進行篩選加工處理,對于提升水果等級,改善水果品質有重要意義.本文應用MATLAB圖像處理技術對水果成熟度進行檢測,系統通過給定的圖片中分割出水果圖片,然后對水果圖片進行二值化和濾波等分析處理,最后依據香蕉的色素組成檢測出不同成熟度的水果.
2 部分代碼
function varargout =
GUIzyp
(varargin)
%
GUIZYP
MATLAB
code
for
GUIzyp
.fig
%
GUIZYP
, by itself, creates a new
GUIZYP
or raises the existing
% singleton*.
%
%
H
=
GUIZYP
returns the handle to a new
GUIZYP
or the handle to
% the existing singleton*.
%
%
GUIZYP
(’
CALLBACK’
,hObject,eventData,handles,...) calls the local
% function named
CALLBACK
in
GUIZYP
.
M
with the given input arguments.
%
%
GUIZYP
(’
Property’
,’
Value’
,...) creates a new
GUIZYP
or raises the
% existing singleton*.
Starting
from the
left
, property value pairs are
% applied to the
GUI
before
GUIzyp_OpeningFcn
gets called.
An
% unrecognized property name or invalid value makes property application
% stop.
All
inputs are passed to
GUIzyp_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
GUIzyp
%
Last
Modified
by
GUIDE
v2.
5
10
-
Jun
-
2017
22
:
22
:
31
%
Begin
initialization code -
DO
NOT
EDIT
gui_Singleton =
1
;
gui_State =
struct
(’
gui_Name
’,
mfilename
, ...
’
gui_Singleton
’,
gui_Singleton
, ...
’
gui_OpeningFcn
’, @
GUIzyp_OpeningFcn
, ...
’
gui_OutputFcn
’, @
GUIzyp_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
GUIzyp
is
made visible.
function
GUIzyp_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
GUIzyp
(see
VARARGIN
)
%
Choose
default
command line output
for
GUIzyp
handles.output = hObject;
%
Update
handles structure
guidata(hObject, handles);
%
UIWAIT
makes
GUIzyp
wait
for
user response (see
UIRESUME
)
% uiwait(handles.figure1);
% ---
Outputs
from this function are returned to the command line.
function varargout =
GUIzyp_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;
3 仿真結果
4 參考文獻
[1]周鐳. 基于MATLAB圖像處理的棉纖維成熟度檢測系統的開發[J]. 山東紡織科技, 2017, 58(5):4.
博主簡介:擅長智能優化算法、神經網絡預測、信號處理、元胞自動機、圖像處理、路徑規劃、無人機等多種領域的Matlab仿真,相關matlab代碼問題可私信交流。
部分理論引用網絡文獻,若有侵權聯系博主刪除。