-
大小: 29KB文件类型: .zip金币: 2下载: 0 次发布日期: 2021-06-14
- 语言: Matlab
- 标签: LBP getmapping MATLAB代码
资源简介
该程序将将原来CLBP代码中的过期MATLAB函数进行了替换,并对程序中的代码段进行了注释。整段代码可以实现,在下载Outex数据集之后,运行资源中的.m文件即可知道传统LBP,ULBP以及CLBP的分类结果,还有以不同联合直方图的方法得到的不同结果

代码片段和文件信息
% ClassifyOnNN computes the classification accuracy
% CP=ClassifyOnNN(DMtrainClassIDstestClassIDs) returns the classification accuracy
% The input “DM“ is a m*n distance matrix m is the number of test samples n is the number of training samples
% ‘trainClassIDs‘ and ‘testClassIDs‘ stores the class ID of training and
% test samples
% Examples
% --------
% I1=imread(‘rice1.png‘);
% I2=imread(‘rice2.png‘);
% I3=imread(‘rice3.png‘);
% I4=imread(‘rice4.png‘);
% mapping=getmapping(8‘u2‘);
% M(1:)=LBPV(I118mapping); % LBPV histogram in (81) neighborhood using uniform patterns
% M(2:)=LBPV(I218mapping);
% S(1:)=LBPV(I318mapping);
% S(2:)=LBPV(I418mapping);
% M = ConvertU2LBP(M8); % convert u2 LBP or LBPV to meet the requirement of global matching scheme
% S = ConvertU2LBP(S8);
% DM = distGMPDRN(MS823);
% CP=ClassifyOnNN(DM[11][11]);
function CP=ClassifyOnNN(DMtrainClassIDstestClassIDs)
% Version 1.0
% Authors: Zhenhua Guo Lei Zhang and David Zhang
% Copyright @ Biometrics Research Centre the Hong Kong Polytechnic University
if nargin<3
disp(‘Not enough input parameters.‘)
return
end
rightCount = 0;
for i=1:length(testClassIDs);
[distNew index]= min(DM(i:)); % find Nearest Neighborhood
if trainClassIDs(index) == testClassIDs(i) % judge whether the nearest one is correctly classified
rightCount = rightCount+1;
end
end
CP = rightCount/length(testClassIDs)*100;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1573 2009-06-30 13:04 CLBP\ClassifyOnNN.m
文件 4676 2019-09-06 10:17 CLBP\DemoCodesForOutex.m
文件 6701 2019-09-06 11:11 CLBP\clbp.m
文件 1220 2009-06-30 08:39 CLBP\distMATChiSquare.m
文件 2806 2019-09-06 10:11 CLBP\getmapping.m
文件 620 2019-09-02 20:16 CLBP\readme.txt
文件 22367 2006-12-04 11:15 CLBP\rice.png
目录 0 2019-09-06 14:11 CLBP\
- 上一篇:粗糙集特征约简算法
- 下一篇:三维网格地形图和多个点构成的路径matlab)
相关资源
- 读取txt文件内容matlab代码实现
- 细胞图像分割matlab代码
- 基于MP的时频分析MATLAB代码
- WCDMA matlab代码
- 图像降噪Matlab代码
- 圣诞树(matlab代码)
- 心音信号处理分析(附matlab代码)
- Pattern Recognition and Machine Learning(高清
- 均值滤波和FFT频谱分析Matlab代码
- 欧拉放大论文及matlab代码
- GPS信号的码捕获matlab代码.7z
- matlab读取SP3文件
- 图像的饱和度,亮度,色调的matlab代
- 肤色检测matlab代码
- sutton强化学习随书MATLAB代码
- 压缩鬼成像matlab代码
- 压缩感知(Compressed Sensing CS)matlab代
- 基于OFDMA系统的多用户资源分配算法,
- Allan方差分析MATLAB代码,含MPU6050八小
- 均匀球体剖面重力异常正演模拟Matl
- 印章识别matlab代码
- 连续潮流matlab代码
- 线性拟合仿真-最小二乘法、正交回归
- 矩阵填充MATLAB代码
- 大型飞机航拍图处理matlab代码
- LMS语音信号去噪matlab代码
- 卡尔曼滤波MATLAB代码
- Matlab代码编写的semi-supervised CCA 程序
- EOF分析matlab代码
- 尾灯识别matlab代码
评论
共有 条评论