Compute kmeans from random subset of pixels extracted from an image

init_kmeans(
  input_rast,
  output_dir,
  input_mask = NULL,
  SelectBands = NULL,
  nbclusters = 50,
  nbIter = 20,
  Kmeans_info_save = NULL,
  Kmeans_info_read = NULL,
  maxPixel_kmeans = 1e+05,
  algorithm = "Hartigan-Wong",
  nbCPU = 1,
  verbose = T,
  progressbar = T
)

Arguments

input_rast

character. Path and name of the image to be processed.

output_dir

character. Path for output directory

input_mask

character. Path and name of the mask corresponding to the image

SelectBands

numeric. bands selected from input_rast

nbclusters

numeric. number of clusters used in kmeans

nbIter

numeric. nb of iterations averaged to compute diversity indices

Kmeans_info_save

character. path where to save Kmeans_info

Kmeans_info_read

character. path where to read Kmeans_info

maxPixel_kmeans

numeric. max number of pixels to extract for kmeans

algorithm

character. algorithm used in the kmeans clustering

nbCPU

numeric. Number of CPUs available

verbose

boolean. set true for messages

progressbar

boolean. set true for progress bar during clustering

Value

Kmeans_info