単純な glcm 行列を考えてみましょう。
glcm = [0 1 2 3;1 1 2 3;1 0 2 0;0 0 0 3];
Matlab の組み込み機能を使用して統計を計算します。
stats = graycoprops(glcm)
Contrast: 2.8947
Correlation: 0.0783
Energy: 0.1191
Homogeneity: 0.5658
代わりに、このページの下部にあるこれらの方程式の定義を使用して手動で計算してください: https://www.mathworks.com/help/images/ref/graycoprops.html
contrast = 0;
energy = 0
for i = 1:4
for j = 1:4
contrast = contrast + glcm(i,j)*(i-j)^2;
energy = energy + glcm(i,j)^2;
end
end
これにより、次のことが得られます。
contrast =
110
energy =
43
契約は何ですか?ある種の正規化が行われていますか? 単純に16個の要素数で割るわけではありません...
何かご意見は?ありがとう!