Hello Mat

 找回密码
 立即注册
查看: 6080|回复: 0

灰度图像时域特征求解

[复制链接]

1323

主题

1551

帖子

0

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22647
发表于 2016-10-22 22:12:54 | 显示全部楼层 |阅读模式
%  测试软件MATLAB2015b

%灰度共生矩阵 Gray Level Cooccurance Matrices (GLCMs)
glcms = graycomatrix(img);

% 特征求解:对比度、相关性系数、能量、均匀性,例如常用的还有【熵】等
stats = graycoprops(glcms,'Contrast Correlation Energy Homogeneity');    % stats = graycoprops(glcms,'all');
Contrast = stats.Contrast;
Correlation = stats.Correlation;
Energy = stats.Energy;
Homogeneity = stats.Homogeneity;
% 均值、方差
Mean = mean2(seg_img);
Standard_Deviation = std2(seg_img);
% 熵
Entropy = entropy(seg_img);
RMS = mean2(rms(seg_img));
%Skewness = skewness(img)
Variance = mean2(var(double(seg_img)));
a = sum(double(seg_img(:)));
Smoothness = 1-(1/(1+a));
Kurtosis = kurtosis(double(seg_img(:)));
Skewness = skewness(double(seg_img(:)));
% Inverse Difference Movement
m = size(seg_img,1);
n = size(seg_img,2);
in_diff = 0;
for i = 1:m
    for j = 1:n
        temp = seg_img(i,j)./(1+(i-j).^2);
        in_diff = in_diff+temp;
    end
end
IDM = double(in_diff);



算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Python|Opencv|MATLAB|Halcom.cn ( 蜀ICP备16027072号 )

GMT+8, 2024-11-25 13:42 , Processed in 0.209432 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表