this function reads PCA file and defines the spectral species for each pixel based on the set of cluster centroids defined for each iteration applies kmeans --> closest cluster corresponds to the "spectral species"

compute_spectral_species(
  PCA_Path,
  Input_Mask_File,
  Spectral_Species_Path,
  Location_RW,
  PC_Select,
  Kmeans_info,
  nbCPU = 1,
  progressbar = FALSE
)

Arguments

PCA_Path

character. path for the PCA image

Input_Mask_File

character. Path for the mask

Spectral_Species_Path

character. path for spectral species file to be written

Location_RW

numeric. where to read/write information in binary file

PC_Select

numeric. PCs selected from PCA

Kmeans_info

list. information about kmeans computed in previous step

nbCPU

numeric. number of CPUs available

progressbar

boolean. should progress bar be displayed (set to TRUE only if no conflict of parallel process)

Value

None