Compute kmeans from random subset of pixels extracted from an image

init_kmeans(
  input_rast,
  output_dir,
  input_mask = NULL,
  selected_bands = NULL,
  nb_clusters = 50,
  nb_iter = 10,
  Kmeans_info_save = NULL,
  Kmeans_info_read = NULL,
  nb_samples_alpha = 1e+05,
  algorithm = "Hartigan-Wong",
  nbCPU = 1,
  verbose = TRUE,
  progressbar = TRUE
)

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

selected_bands

numeric. bands selected from input_rast

nb_clusters

numeric. number of clusters used in kmeans

nb_iter

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

nb_samples_alpha

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