powered by
kmeans
patLanK
patRegK
kmeans clustering of image imported as a RasterStack. This function is used by patLanK and patRegK.
kImageHSV( image, k = 5, startCenter = NULL, maskToNA = NULL, kmeansOnAll = FALSE, ignoreHSVvalue = FALSE )
List including the k-means clustered RasterSatck returned as an array and object of class "kmeans".
RasterSatck
HSV image imported as a RasterStack for k-means clustering.
Integer for number of k-means clusters (default = 3).
A matrix of cluster centres to start k-means clustering from (default = NULL).
Replace the color value used for masking (i.e. 0 or 255) with NA.
Whether to perform the kmeans clusters on the combined set of pixels of all images first (default = FALSE).
Whether to ignore the HSV value (~darkness).
image <- raster::stack(system.file("extdata", "BC0077.jpg", package = "patternize")) out <- kImage(image, 6)
Run the code above in your browser using DataLab