glcm(x, n_grey = 32, window = c(3, 3), shift = c(1, 1), statistics =
c("mean", "variance", "homogeneity", "contrast", "dissimilarity", "entropy",
"second_moment", "correlation"),
min_x=NULL, max_x=NULL, na_opt="any", na_val=NA, scale_factor=1,
asinteger=FALSE)RasterLayer or matrixRasterLayer
(optional, glcm will calculate if not supplied).
Useful when running glcm over blocks of a raster.RasterLayer
(optional, glcm will calculate if not supplied).
Useful when running glcm over blocks of a raster.x. Can be
set to "ignore", "any" or "center". If set to "any", all
textures statistics for a given pixel will be set to NA
if there are any NA values in the window around
that pixel. If set x where textures cannot be calculated due to
the window falling outside of the image, and as necessary
depending on the chosen na_opt.asinteger argument).raster.RasterLayer with the requested GLCM texture
measures.require(raster)
textures <- glcm(raster(L5TSR_1986, layer=1))
plot(textures)Run the code above in your browser using DataLab