Description Usage Arguments Details Value Note Author(s) See Also Examples
Wrapper arround glcm in order to create a set of texture variables.
1 2 3 4 5 |
x |
rasterLayer or a rasterStack containing different channels |
n_rasters |
vector of channels to use from x. Default =nlayers(x) |
kernel_size |
vector of numbers indicating the environment sizes for which the textures are calculated |
stats |
string vector of parameters to be calculated. See
|
parallel |
logical value indicating whether parameters are calculated parallel or not |
n_grey |
number of grey values. see |
min_x |
for each channel the minimum value which can occur. If NULL then the minimum value from the rasterLayer is used. |
max_x |
for each channel the maximum value which can occur. If NULL then the maximum value from the rasterLayer is used. |
This functions calls the glcm function from glcm with standard settings
list of RasterStacks containing the texture parameters for each combination of channel and kernel_size
for the use glcmTextures a glcm wrapper function a raster* object is required
More information at the texture tutorial site of
http://www.fp.ucalgary.ca/mhallbey/more_informaton.htm(Mryka Hall-Beyer)
Keep in mind that:
Homogeneity is correlated with Contrast, r = -0.80
Homogeneity is correlated with Dissimilarity, r = -0.95
GLCM Variance is correlated with Contrast, r= 0.89
GLCM Variance is correlated with Dissimilarity, r= 0.91
GLCM Variance is correlated with Homogeneity, r= -0.83
Entropy is correlated 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 demonstrated
in this tutorial.
GLCM Correlation shows r<0.5 with any other measure.
Hanna Meyer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
## example on how to calculate texture from a list of channels
url<-"http://www.ldbv.bayern.de/file/zip/5619/DOP%2040_CIR.zip"
res <- curl::curl_download(url, "testdata.zip")
unzip(res,junkpaths = TRUE,overwrite = TRUE)
r<- raster::stack(paste0(getwd(),"4490600_5321400.tif"))
# call glcm wrapper
result <- glcmTextures(r,n_rasters=1:3,
stats=c("mean", "variance", "homogeneity"))
#plot the results from VIS0.6 channel:
raster::plot(unlist(unlist(glcm$size_3$X4490600_5321400.1)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.