G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Banner Institutions GREYC CNRS ENSICAEN UNICAEN

A Full-Featured Open-Source Framework for Image Processing



Latest stable version: 4.0.4 (2026/08/19)

Reference
Table of Contents  ▸  List of Commands  ▸  Reptorian's Commands  ▸  rep_colormap◀  rep_count_colors    |    rep_uniq_cols  ▶

rep_colormap

Arguments:

  • nb_levels>=0,_alg_swap={ ('-'/'_')=regular | 0=frequency_weigh | >0=hybrid_alg },_method={ 0:Median-cut | 1:K-means },_sort_vectors    or
  • nb_levels>=0,_method={ 0:Median-cut | 1:K-means },_sort_vectors

Description:

Estimate best-fitting colormap with nb_colors entries, to index selected images.

Set nb_levels==0 to extract all existing colors of an image.
sort_vectors can be { 0:Unsorted | 1:By increasing norm | 2:By decreasing occurrence }.
G'MIC - GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing

G'MIC is an open-source software distributed under the CeCILL free software licenses (LGPL-like and/or
GPL-compatible). Copyrights (C) Since July 2008, David Tschumperlé - GREYC UMR CNRS 6072, Image Team.