% 建立 特征编号 与特征名称 之间的对应关系
% featureNameMap
%
% 特征命名有如下例子(每一种方法提取的特征举一例):
% RGB-R-Mean:RGB颜色空间的R分量的均值
% HSI-H-Std: HSI颜色空间的H分量的标准差
% Gabor-50X22.5-Mean:以尺度50相位22.5作Gabor变换提取的均值特征
% 灰度共生矩阵-6X-6-Contrast:灰度共生矩阵方法在方向(6,-6)提取的对比度特征
% 灰度差分统计-10X10-Contrast:灰度差分统计方法在方向(10,10)提取的对比度特征
%
%
% 目前提取的颜色纹理特征值包括:
% RGB颜色空间特征值 RGB颜色分量的均值,标准差,方差,相关系数 12个
% HSI颜色空间特征值 HSI颜色分量的均值,标准差,方差,相关系数 12个
% NTSC颜色空间特征值 YIQ颜色分量的均值,标准差,方差,相关系数 12个
% gabor变换提取的纹理特征 均值,标准差
% 特征数量 64=4(频率个数)X8(方向个数)X2(每组提取的纹理特征数量)
% 灰度共生矩阵纹理特征值:
% '角二阶矩','对比度','相关性','差分矩','逆差分矩(均匀性)','和平均值',...
% '和方差','和熵','熵','差方差','差熵'
% 特征数量 176= 16组位置算子 X 每组位置算子提取11个特征
% 灰度-梯度共生矩阵纹理特征,采用 roberts 算子提取梯度
% 提取15个特征,分别为:'小梯度优势','大梯度优势','灰度分布不均匀性','梯度分布不均匀性',
% '能量','灰度平均','梯度平均','灰度方差','梯度方差','相关','灰度熵','梯度熵','混合熵','惯性','逆差距'
% 灰度差分统计特征值: 对比度,熵,平均值,能量
% 特征数量 64个=16组位置算子,每组位置算子提取4个特征
% 灰度行程长度统计方法
% 提取特征:'强调短行程的逆差','强调长行程的逆差','灰度不均匀性','行程长度非均匀性','以行程表示的图像分数'
% 三个方向,共获得15个特征
% 不变矩特征,三个颜色平面,每个颜色平面提取7个不变矩,共21个特征
%
% 调用格式 [featureName]=featureNameMap(featureNO)
%
% 输入 featureNameMap(featureNO),featureNO为特征的编号
% 比如输入: featureNameMap(145),145即为当前的特征编号
% 输出: 'GrayCoOccurrenctMatrix-1X1-AngularSecondMoment'
% '灰度共生矩阵-1X1-角二阶矩'
% 表示灰度共生矩阵在方向(1,1)提取的'角二阶矩'这一特征
%
% 2007.03.25 提取特征数量:208
% 2007-10-26 提取特征数量:391
% 增加特征种类: YIQ颜色特征、灰度-梯度共生矩阵纹理特征、灰度行程长度统计方法、不变矩特征
% 删除特征种类: Harr-like特征、傅立叶变换特征、以及边缘检测特征
%
% 2007-10-26 柳锋
%
function [featureName]=featureNameMap(featureNO)
isRGB=1;
isHSI=1;
isGabor=1;
isCoOcuMat=1;
isGrayDiff=1;
containFeature=[isRGB isHSI isGabor isCoOcuMat isGrayDiff];
rgbFeaNameEN={'RGB-R-Mean','RGB-G-Mean','RGB-B-Mean','RGB-R-Std','RGB-G-Std','RGB-B-Std',...
'RGB-R-Variance','RGB-G-Variance','RGB-B-Variance','RGB-RG-Correlation','RGB-GB-Correlation','RGB-RB-Correlation'};
hsiFeaNameEN={'HSI-H-Mean','HSI-S-Mean','HSI-I-Mean','HSI-H-Std','HSI-S-Std','HSI-I-Std'...
'HSI-H-Variance','HSI-S-Variance','HSI-I-Variance','HSI-HS-Correlation','HSI-SI-Correlation','HSI-HI-Correlation'};
ntscFeaNameEN={'YIQ-Y-Mean','YIQ-I-Mean','YIQ-Q-Mean','YIQ-Y-Std','YIQ-I-Std','YIQ-Q-Std'...
'YIQ-Y-Variance','YIQ-I-Variance','YIQ-Q-Variance','YIQ-YI-Correlation','YIQ-IQ-Correlation','YIQ-YQ-Correlation'};
rgbFeaNameCN={'RGB-R-均值','RGB-G-均值','RGB-B-均值','RGB-R-标准差','RGB-G-标准差','RGB-B-标准差'...
'RGB-R-方差','RGB-G-方差','RGB-B-方差','RGB-RG-相关性','RGB-GB-相关性','RGB-RB-相关性'};
hsiFeaNameCN={'HSI-H-均值','HSI-S-均值','HSI-I-均值','HSI-H-标准差','HSI-S-标准差','HSI-I-标准差'...
'HSI-H-方差','HSI-S-方差','HSI-I-方差','HSI-HS-相关性','HSI-SI-相关性','HSI-HI-相关性'};
ntscFeaNameCN={'YIQ-Y-均值','YIQ-I-均值','YIQ-Q-均值','YIQ-Y-标准差','YIQ-I-标准差','YIQ-Q-标准差'...
'YIQ-Y-方差','YIQ-I-方差','YIQ-Q-方差','YIQ-YI-相关性','YIQ-IQ-相关性','YIQ-YQ-相关性'};
% gabor 特征名称
fList=[0.5 0.25 0.125 0.1];
thetaList=((0:7)/8).*pi;
gaborOrientation=(thetaList.*180)/pi;
gaborFrequency=fList;
gaborScale=1./(2.*gaborFrequency);
counter=1;
gaborFeaNameLen=2;
gaborFeaNameEN=cell(1,length(gaborScale)*length(gaborOrientation));
gaborFeaNameCN=cell(1,length(gaborScale)*length(gaborOrientation));
gaborFeaNameBaseEN={'Mean','Std'};
gaborFeaNameBaseCN={'均值','标准差'};
for i=1:length(gaborScale)
for j=1:length(gaborOrientation)
for k=1:gaborFeaNameLen
gaborFeaNameEN{counter}=strcat('GaborTransform-',num2str(gaborScale(i)),'X',num2str(gaborOrientation(j)),'-',gaborFeaNameBaseEN{k});
gaborFeaNameCN{counter}=strcat('Gabor变换-',num2str(gaborScale(i)),'X',num2str(gaborOrientation(j)),'-',gaborFeaNameBaseCN{k});
counter=counter+1;
end
end
end
%灰度共生矩阵特征名称
CoOcuMatFeaNameLen=11;
CoOcuMatOffset=[0 1;0 5;1 0;5 0;1 1;1 -1;5 5;5 -5;2 5;2 -5;4 5;4 -5;5 2;5 -2;5 4;5 -4];
CoOcuMatFeaNameEN=cell(1,length(CoOcuMatOffset)*CoOcuMatFeaNameLen);
CoOcuMatFeaNameCN=cell(1,length(CoOcuMatOffset)*CoOcuMatFeaNameLen);
CoOCuMatFeaNameBaseEN={'AngularSecondMoment','Contrast','Correlation','DifferenceMoment','Homogeneity','SumMean',...
'SumVariance','SumEntropy','Entropy','DifferenceVariance','DifferenceEntropy'};
CoOCuMatFeaNameBaseCN={'角二阶矩','对比度','相关性','差分矩','逆差分矩(均匀性)','和平均值',...
'和方差','和熵','熵','差方差','差熵'};
for i=1:length(CoOcuMatOffset)
for j=1:CoOcuMatFeaNameLen
CoOcuMatFeaNameEN{(i-1)*CoOcuMatFeaNameLen+j}=strcat('GrayCoOccurrenctMatrix-',num2str(CoOcuMatOffset(i,1)),'X',num2str(CoOcuMatOffset(i,2)),'-',CoOCuMatFeaNameBaseEN{j});
CoOcuMatFeaNameCN{(i-1)*CoOcuMatFeaNameLen+j}=strcat('灰度共生矩阵-',num2str(CoOcuMatOffset(i,1)),'X',num2str(CoOcuMatOffset(i,2)),'-',CoOCuMatFeaNameBaseCN{j});
end
end
%灰度-梯度 共生矩阵特征名称
GGLCMFeaNameLen=15;
GGLCMFeaNameEN=cell(1,GGLCMFeaNameLen);
GGLCMFeaNameCN=cell(1,GGLCMFeaNameLen);
GGLCMFeaNameBaseEN={'SmallGradsDominance','BigGradsDominance','GrayAsymmetry','GradsAsymmetry','Energy','GrayMean','GradsMean',...
'GrayVariance','GradsVariance','Correlation','GrayEntropy','GradsEntropy','Entropy','Inertia','DifferMoment'};
GGLCMFeaNameBaseCN={'小梯度优势','大梯度优势','灰度分布不均匀性','梯度分布不均匀性','能量','灰度平均','梯度平均',...
'灰度方差','梯度方差','相关','灰度熵','梯度熵','混合熵','惯性','逆差距'};
for i=1:GGLCMFeaNameLen
GGLCMFeaNameEN{i}=strcat('GrayGradsCoOccurrenctMatrix-',GGLCMFeaNameBaseEN{i});
GGLCMFeaNameCN{i}=strcat('灰度-梯度共生矩阵-',GGLCMFeaNameBaseCN{i});
end
%灰度差分统计
GrayDiffFeaNameLen=4;
GrayDiffOffset=[0 1;0 3;0 5;1 0;3 0;5 0;1 1;2 2;4 4;5 5;1 3;3 1;2 4;4 2;3 5;5 3];
GrayDiffFeaNameEN=cell(1,length(GrayDiffOffset)*GrayDiffFeaNameLen);
GrayDiffFeaNameCN=cell(1,length(GrayDiffOffset)*GrayDiffFeaNameLen);
GrayDiffFeaNameBaseEN={'Contrast','Entropy','Mean','Energy'};
GrayDiffFeaNameBaseCN={'对比度','熵','均值','能量'};
for i=1:length(GrayDiffOffset)
for j=1:GrayDiffFeaNameLen
GrayDiffFeaNameEN{(i-1)*GrayDiffFeaNameLen+j}=strcat('GrayDifferenceStatistic-',num2str(GrayDiffOffset(i,1)),'X',num2str(GrayDiffOffset(i,2)),'-',GrayDiffFeaNameBaseEN{j});
GrayDiffFeaNameCN{(i-1)*GrayDiffFeaNameLen+j}=strcat('灰度差分统计-',num2str(GrayDiffOffset(i,1)),'X',num2str(GrayDiffOffset(i,2)),'-',GrayDiffFeaNameBaseCN{j});
end
end
% 灰度行程长度统计方法
GrayRunLengthFeaNameLen=5;
thetaList=[0 pi/4 pi/2]; % 行程方向
grlmOrientation=(thetaList.*180)/pi;
grlmFeaNameEN=cell(1,length(grlmOrientation)*GrayRunLengthFeaNameLen);
grlmFeaNameCN=cell(1,length(grlmOrientation)*GrayRunLengthFeaNameLen);
grlmFeaNameBaseEN={'ShortDifferMoment','LongDifferMoment','GrayAsymmetry','RunLengthAsymmetry','ImageFraction'};
grlmFeaNameBaseCN={'强调短行程的逆差','强调长行程的逆差','灰度不均匀性','行程长度非均匀性','以行程表示的图像分数'};
for i=1:length(grlmOrientation)
for j=1:GrayRunLengthFeaNameLen
grlmFeaNameEN{(i-1)*GrayRunLengthFeaNameLen+j}=strcat('GrayRunLengthStatistic-','Orientation:',num2str(grlmOrientation(i)),'-',grlmFeaNameBaseEN{j});
grlmFeaNameCN{