calcENT: ENT Entropy

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/calcENT.R

Description

calculates ENTROPY measure for Grey Level Co-occurrence Matrices

Usage

1
calcENT(rawmat)

Arguments

rawmat

assigns the GLC-Matrix

Details

Entropy is a texture measure related to the orderline group. Entropy characterizes 'energy' values for pixel combinations.

Value

returns Entropy value

Author(s)

H.-J. Klemmt

References

Toennies, D., 2005: Grundlagen der Bildverarbeitung. 341 S., Pearson Studium Harralick, R.M., Shanmugam, K., Dinstein, I., 1973: Textural Features for image classification. IEEE Transactions on Systems, Man and Cybernetics, SMC vol. 3 no. 6, pp. 610-620.

See Also

The GLCM Tutorial by Myrka Hall-Beyer, http://www.fp.ucalgary.ca/mhallbey/oderlines_group.htm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
data<-c(0,0,1,1,0,0,1,1,0,2,2,2,2,2,3,3)
mat<-matrix(data, nrow=4, byrow=TRUE)
(mat)
GLCM<-genGLCM(2,1,mat)
(GLCM)
(calcENT(GLCM))
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (rawmat) 
{
    lnrawmat <- log(rawmat)
    size <- dim(lnrawmat)[1]
    for (i in 1:size) {
        for (a in 1:size) {
            if (lnrawmat[a, i] == "-Inf") {
                lnrawmat[a, i] <- 0
            }
        }
    }
    return(sum(rawmat * lnrawmat))
  }

RTextureMetrics documentation built on May 2, 2019, 1:08 p.m.