区域纹理特征的度量
参照书籍《数字图像处理(冈萨雷斯)》
第一步:自定义两个函数 statistical 和statmoments(我一开始只定义一个函数导致程序出现错误)
第二步:将自定义的两个函数分别写入两个脚本文件中。
第一个函数:
function [t]=statxture(f,scale)
%STATXTURE Computes statistical measures of texture in an image.
% T = STATXURE(F, SCALE) computes six measures of texture from an
% image (region) F. Parameter SCALE is a 6-dim row vector whose
% elements multiply the 6 corresponding elements of T for scaling
% purposes. If SCALE is not provided it defaults to all 1s. The
% output T is 6-by-1 vector with the following elements:
% T(1) = Average gray level
% T(2) = Average contrast
% T(3) = Measure of smoothness