colorquant

[ XITE Reference Manual | XITE home ]

Name

colorquant - qolor quantization and rgb to pseudocolor conversion

Syntax

 colorquant [<option>...] <inimage> <colorfile> <outimage>

Description

Performs color quantization of inimage. An outimage and a corresponding colorfile are produced.

The colorfile is either a BIFF colortable file or an ascii colormap file (depending on options used). The values in outimage should be used as indices to the colortable/colormap.

If inimage is a true-color image (three bands), then outimage will be the pseudocolor version of inimage.

If colorfile is an ascii colormap file and inimage is true-color, the map-table may be transformed into a colortable by mct.

Options

-b start
Lowest color in output map. Default zero.

-s step
Step between each color. Default one.

-e stop
Highest color in output map. Default 255.

-c
Produce BIFF colortable file instead of ascii map-file. This is only allowed if inimage is a three-band image, regarded as a true color image.

-ct title
Title for colortable in colorfile. Default: Title in inimage.

-t title
Title for image in outimage. Default: Title in inimage.

-verbose
Print info

-esc Don't use escape codes when printing to xterm on verbose.

See also

makepseudo(1), mct(1), color2ascii(1), xshow(1)

Reference

Otto Milvang: An adaptive algorithm for color quantization. Proceedings of the 5th Scandinavian Conference on Image Analysis.

Author

Otto Milvang

Revised

Svein Bøe

Examples

 colorquant -b 10 -e 253 rgb.img m.map pseudo.img
 mct m.map m.col
 xshow -ct 256 m.col pseudo.img

 colorquant -b 10 -s 2 -e 253 -c rgb.img m.col pseudo.img
 xshow  m.col pseudo.img

Id

$Id: colorquant.c,v 1.43 1997/04/15 10:02:29 svein Exp $