Tat

class tat.clustering.Tat

Contains main methods for k-mean clustering.

static generate_layers(src_image: numpy.ndarray, cluster_count: int, run_count: int, max_iter_count: int) Tuple[List[numpy.ndarray], numpy.ndarray]

Computes the k-means for the given image and parameters.

Parameters
  • src_image (numpy.ndarray) – Input image to computes.

  • cluster_count (int) – The number of clusters to form as well as the number of centroids to generate.

  • run_count – Number of iterations run.

  • max_iter_count – Maximum number of iterations of the k-means algorithm for a single run.

Returns

Tuple of a list of the layers and the clustered layers.

Return type

(list of numpy.ndarray, numpy.ndarray)