【源码】基于MATLAB的柑橘果实分类图像朴素贝叶斯分类器

基于MATLAB的柑橘果实分类图像朴素贝叶斯分类器

Naive Bayes Classifier To Classification Image Of Citrus Fruits With Matlab Code

这里写图片描述

function varargout = NaiveBayesClassifier(varargin)

% NAIVEBAYESCLASSIFIERM-file for NaiveBayesClassifier.fig

% NAIVEBAYESCLASSIFIER, by itself, createsa new NAIVEBAYESCLASSIFIER or raises the existing

% singleton*.

%

% H = NAIVEBAYESCLASSIFIER returns thehandle to a new NAIVEBAYESCLASSIFIER or the handle to

% the existing singleton*.

%

% NAIVEBAYESCLASSIFIER(‘CALLBACK’,hObject,eventData,handles,…) calls thelocal

% function named CALLBACK inNAIVEBAYESCLASSIFIER.M with the given input arguments.

%

% NAIVEBAYESCLASSIFIER(‘Property’,’Value’,…)creates a new NAIVEBAYESCLASSIFIER or raises the

% existing singleton*. Starting from the left, property value pairsare

% applied to the GUI beforeNaiveBayesClassifier_OpeningFcn gets called. An

% unrecognized property name or invalid valuemakes property application

% stop. All inputs are passed to NaiveBayesClassifier_OpeningFcn via varargin.

%

% *See GUI Options on GUIDE’s Toolsmenu. Choose “GUI allows only one

% instance to run (singleton)”.

%

% See also: GUIDE,GUIDATA, GUIHANDLES

% Edit the above text tomodify the response to help NaiveBayesClassifier

% Last Modified by GUIDEv2.5 09-May-2013 06:54:52

% GUI初始化代码

gui_Singleton = 1;

gui_State = struct(‘gui_Name’, mfilename, …

               'gui_Singleton',  gui_Singleton, ...

               'gui_OpeningFcn',@NaiveBayesClassifier_OpeningFcn, ...

               'gui_OutputFcn',  @NaiveBayesClassifier_OutputFcn, ...

               'gui_LayoutFcn',  [] , ...

               'gui_Callback',   []);

if nargin && ischar(varargin{1})

gui_State.gui_Callback =str2func(varargin{1});

clc;



% 设置窗体位置 (get_size_screen/gsl_)

gsl_ = get(0,'ScreenSize');

end

if nargout

[varargout{1:nargout}] =gui_mainfcn(gui_State, varargin{:});

else

gui_mainfcn(gui_State, varargin{:});

end

% 初始化代码结束

% — 可视化 NaiveBayesClassifier

function NaiveBayesClassifier_OpeningFcn(hObject, eventdata, handles, varargin)

% This function has nooutput args, see OutputFcn.

% hObject handle to figure

% eventdata reserved - to be defined in a future versionof MATLAB

% handles structure with handles and user data (seeGUIDATA)

% varargin command line arguments toNaiveBayesClassifier (see VARARGIN)

% Choose default commandline output for NaiveBayesClassifier

handles.output = hObject;

% 更新结构句柄

guidata(hObject, handles);

% UIWAIT makesNaiveBayesClassifier wait for user response (see UIRESUME)

%uiwait(handles.NaiveBayesClassifier);

% 设置图像图标

warning(‘off’,’MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame’);

jframe=get(handles.NaiveBayesClassifier,’javaframe’);

jIcon=javax.swing.ImageIcon(‘citrus-icon.png’);

jframe.setFigureIcon(jIcon);

……

完整源码下载地址:
(http://page2.dfpan.com/fs/fl9c9j525241a2b9166/)

更多精彩文章请关注微信号:这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值