【成熟度檢測(cè)】基于RGB和HSV實(shí)現(xiàn)水果成熟度分級(jí)系統(tǒng)含Matlab源碼
1 簡介
許多研究結(jié)果表明,水果損失主要集中在采摘,包裝,保存等環(huán)節(jié),達(dá)到近三分之一,其中一個(gè)重要的原因?yàn)椴煌墒於鹊乃嗷セ祀s.因而,區(qū)分水果的成熟度并進(jìn)行篩選加工處理,對(duì)于提升水果等級(jí),改善水果品質(zhì)有重要意義.本文應(yīng)用MATLAB圖像處理技術(shù)對(duì)水果成熟度進(jìn)行檢測(cè),系統(tǒng)通過給定的圖片中分割出水果圖片,然后對(duì)水果圖片進(jìn)行二值化和濾波等分析處理,最后依據(jù)香蕉的色素組成檢測(cè)出不同成熟度的水果.
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 仿真結(jié)果




4 參考文獻(xiàn)
[1]周鐳. 基于MATLAB圖像處理的棉纖維成熟度檢測(cè)系統(tǒng)的開發(fā)[J]. 山東紡織科技, 2017, 58(5):4.
博主簡介:擅長智能優(yōu)化算法、神經(jīng)網(wǎng)絡(luò)預(yù)測(cè)、信號(hào)處理、元胞自動(dòng)機(jī)、圖像處理、路徑規(guī)劃、無人機(jī)等多種領(lǐng)域的Matlab仿真,相關(guān)matlab代碼問題可私信交流。
部分理論引用網(wǎng)絡(luò)文獻(xiàn),若有侵權(quán)聯(lián)系博主刪除。
