normalize_glcm {gtexture}R Documentation

Normalize a GLCM

Description

Function that normalizes a gray-level co-occurrence matrix (GLCM) so that the sum of all the elements equals unity. This has the added benefit of converting the GLCM to a probability distribution.

Usage

normalize_glcm(mat)

Arguments

mat

gray-level co-occurrence matrix

Value

numeric matrix (same dimensions as input GLCM)

Examples

# normalize an arbitrary matrix
a <- matrix(1:9, nrow = 3)
n_a <- normalize_glcm(a)

print(a)
print(n_a)

[Package gtexture version 1.0.0 Index]