资源简介
该代码为用tamura算法提取图像的纹理特征,包括粗糙度、对比度等,可用于基于内容的图像检索系统
代码片段和文件信息
function features = Tamura(I)
%计算Tamura纹理特征
%I= [000000000;
% 000000000;
% 001421100;
% 012121400;
% 004242000;
% 001122020;
% 000040000;
% 000000000;
% 000000000];
[NxNy] = size(I);
G=double(I); % 将图像变为双精度浮点型
%计算粗糙度(coarseness)
Sbest=zeros(NxNy);
E0h=zeros(NxNy);
E0v=zeros(NxNy);
E1h=zeros(NxNy);
E1v=zeros(NxNy);
E2h=zeros(NxNy);
E2v=zeros(NxNy);
E3h=zeros(NxNy);
E3v=zeros(NxNy);
E4h=zeros(NxNy);
E4v=zeros(NxNy);
E5h=zeros(NxNy);
E5v=zeros(NxNy);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%图片大小必须大于2*2才能计算E0h、E0v
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:N
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 22363 2010-03-14 23:27 Tamura.m
----------- --------- ---------- ----- ----
22363 1
评论
共有 条评论