hypergas.cluster module

Hyperspectral image classification.

hypergas.cluster.PCA_kmeans(radiance, pca_dim=3, ncluster=10, max_iterations=30)[source]

Apply PCA and kmeans to classify pixels.

Parameters:
  • radiance (DataArray) – dims: y, x, bands.

  • pca_dim (int) – n_components for PCA.

  • ncluster (int) – number of clusters to create.

  • max_iterations (int) – max number of iterations to perform.

Returns:

segmentation (DataArray) – Segmentation result with dimensions (y, x).