Reference

Table of Contents  ▸  List of Commands  ▸  Colors  ▸  colormap◀  colorblind    |    compose_channels  ▶

colormap

Arguments:

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 }.

Default values:

method=1 and sort_vectors=1.

This command has a tutorial page.

Example of use:

$ gmic image.jpg +colormap[0] 4 +colormap[0] 8 +colormap[0] 16

Command: image.jpg +colormap[0] 4 +colormap[0] 8 +colormap[0] 16
Command: image.jpg +colormap[0] 4 +colormap[0] 8 +colormap[0] 16
Command: image.jpg +colormap[0] 4 +colormap[0] 8 +colormap[0] 16
Command: image.jpg +colormap[0] 4 +colormap[0] 8 +colormap[0] 16