otbTexturesHaralick: OTB wrapper for Haralick's simple, advanced and higher order...

Description Usage Arguments Details Value Note Author(s) References Examples

Description

OTB wrapper for calculating Haralick's simple, advanced and higher order texture features on every pixel in each channel of the input image.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## S4 method for signature 'RasterBrick'
otbTexturesHaralick(x, texture = "all",
  path_output = NULL, return_raster = TRUE, parameters.xyrad = list(c(1,
  1)), parameters.xyoff = list(c(1, 1)), parameters.minmax = c(0, 255),
  parameters.nbbin = 8, channel = NULL, verbose = FALSE, ram = "8192")

## S4 method for signature 'RasterLayer'
otbTexturesHaralick(x, texture = "all",
  path_output = NULL, return_raster = TRUE, parameters.xyrad = list(c(1,
  1)), parameters.xyoff = list(c(1, 1)), parameters.minmax = c(0, 255),
  parameters.nbbin = 8, channel = NULL, verbose = FALSE, ram = "8192")

## S4 method for signature 'RasterStack'
otbTexturesHaralick(x, texture = "all",
  path_output = NULL, return_raster = TRUE, parameters.xyrad = list(c(1,
  1)), parameters.xyoff = list(c(1, 1)), parameters.minmax = c(0, 255),
  parameters.nbbin = 8, channel = NULL, verbose = FALSE, ram = "8192")

## S4 method for signature 'character'
otbTexturesHaralick(x, texture = "all",
  output_name = "hara", path_output = NULL, return_raster = FALSE,
  parameters.xyrad = list(c(1, 1)), parameters.xyoff = list(c(1, 1)),
  parameters.minmax = c(0, 255), parameters.nbbin = 8, channel = NULL,
  verbose = FALSE, ram = "8192")

Arguments

x

A Raster* object or a GeoTiff containing one or more gray value bands

texture

type of filter "all" for all, alternative one of "simple" "advanced" "higher"

return_raster

boolean if TRUE a raster stack is returned

parameters.xyrad

list with the x and y radius in pixel indicating the kernel sizes for which the textures are calculated

parameters.xyoff

vector containg the directional offsets. Valid combinations are: list(c(1,1),c(1,0),c(0,1),c(1,-1))

parameters.minmax

minimum/maximum gray value which can occur.

parameters.nbbin

number of gray level bins (classes)

channel

sequence of bands to be processed

verbose

switch for system messages default is FALSE

ram

reserved memory in MB

output_name

string pattern vor individual naming of the output file(s)

n_grey

Number of grey values.

parallel

A logical value indicating whether parameters are calculated parallely or not

Details

"simple":
computes the following 8 local Haralick textures features: Energy, Entropy, Correlation, Inverse Difference Moment, Inertia, Cluster Shade, Cluster Prominence and Haralick Correlation. They are provided in this exact order in the output image. Thus, this application computes the following Haralick textures over a neighborhood with user defined radius.
To improve the speed of computation, a variant of Grey Level Co-occurrence Matrix(GLCM) called Grey Level Co-occurrence Indexed List (GLCIL) is used. Given below is the mathematical explanation on the computation of each textures. Here g( i,j) is the frequency of element in the GLCIL whose index is i,j. GLCIL stores a pair of frequency of two pixels from the given offset and the cell index (i,j) of the pixel in the neighborhood window. Where each element in GLCIL is a pair of pixel index and it's frequency, g(i,j) is the frequency value of the pair having index is i,j.

Energy options:alt=
Entropy options:alt=
Correlation options:alt=
Inertia (contrast) options:alt=
Cluster Shade options:alt=
Cluster Prominence options:alt=
Haralick's Correlation options:alt=

"advanced":
computes the following 10 texture features: Mean, Variance, Dissimilarity, Sum Average, Sum Variance, Sum Entropy, Difference of Entropies, Difference of Variances, IC1 and IC2. They are provided in this exact order in the output image. The textures are computed over a sliding window with user defined radius. To improve the speed of computation, a variant of Grey Level Co-occurrence Matrix(GLCM) called Grey Level Co-occurrence Indexed List (GLCIL) is used. Given below is the mathematical explanation on the computation of each textures. Here g( i,j) is the frequency of element in the GLCIL whose index is i,j. GLCIL stores a pair of frequency of two pixels from the given offset and the cell index ( i,j) of the pixel in the neighborhood window. (where each element in GLCIL is a pair of pixel index and it's frequency, g( i,j) is the frequency value of the pair having index is i,j.

Mean options:alt=
Sum of squares: Variance options:alt=
Dissimilarity options:alt=
Sum average options:alt=
Sum Variance options:alt=
Sum Entropy options:alt=
Difference variance options:alt=
Difference entropy options:alt=
Information Measures of Correlation IC1 options:alt=
Information Measures of Correlation IC2 options:alt=

"higher":

computes 11 local higher order statistics textures coefficients based on the grey level run-length matrix. It computes the following Haralick textures over a sliding window with user defined radius: (where p( i,j) is the element in cell i,j of a normalized Run Length Matrix (n_r) is the total number of runs and n_p is the total number of pixels ):

Short Run Emphasis options:alt=
Long Run Emphasis options:alt=
Grey-Level Nonuniformity options:alt=
Run Length Nonuniformity options:alt=
Low Grey-Level Run Emphasis options:alt=
High Grey-Level Run Emphasis options:alt=
Short Run Low Grey-Level Emphasis options:alt=
Short Run High Grey-Level Emphasis options:alt=
Long Run Low Grey-Level Emphasis options:alt=
Long Run High Grey-Level Emphasis options:alt=

Value

A list of RasterStacks containing the texture parameters for each combination of channel and filter

Note

The following Haralick textures are largely comparable to the results as derived by the glcm package. Find more information about the these common texture indices at the tutorial site of Mryka Hall-Beyer
Keep further in mind that this texture features are highly correlated:
Homogeneity with Contrast, r = -0.80
Homogeneity with Dissimilarity, r = -0.95
GLCM Variance with Contrast, r= 0.89
GLCM Variance with Dissimilarity, r= 0.91
GLCM Variance with Homogeneity, r= -0.83
Entropy with ASM, r= -0.87
GLCM Mean and Correlation are more independent. For the same image:
GLCM Mean shows r< 0.1 with any of the other texture measures.
GLCM Correlation shows r<0.5 with any other measure.

Author(s)

Chris Reudenbach, Thomas Nauss

References

Haralick, R.M., K. Shanmugam and I. Dinstein. 1973. Textural Features for Image Classification. IEEE Transactions on Systems, Man and Cybernetics. SMC-3(6):610-620.
Orfeo Toolbox Sofware Guide, 2016

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# get some typical authority generated data
url<-"http://www.ldbv.bayern.de/file/zip/5619/DOP%2040_CIR.zip"
res <- curl::curl_download(url, "testdata.zip")
unzip(res,files = grep(".tif", unzip(res,list = TRUE)$Name,value = TRUE),junkpaths = TRUE,overwrite = TRUE)

# first initialisation of the OTB environment
initOTB()

# calculate all Haralick-textures
otbTexturesHaralick(x=file.path(getwd(),basename(grep(".tif", unzip(res,list = TRUE)$Name,value = TRUE))))

## End(Not run)

environmentalinformatics-marburg/satelliteTools documentation built on May 16, 2019, 8:16 a.m.