DATAMANIP commands


PROGRAM NAME

kmsquish - Compress Map to One Column by Means of Average, RMS, or MAX

DESCRIPTION

kmsquish compresses a map down to one column, effectively converting the map to a "greyscale" map. An example of this operation is encountered when trying to print a pseudocolor RGB image on a B/W laser printer: the RGB color information must be somehow converted to greyscale in order for the printer to know how to dither the image during printing.

kmsquish is very happy to operate on simple 3-column maps, such as would be encountered when processing a color image in any of the standard coordinate systems (ntscRGB, etc). However, kmsquish is not limited to 3 column maps - it will operate on maps with any number of cloumns.

The conversion from multiple columns to a single column is done by computing a grey level for each row of the map, one at a time. For t=1, the grey level for a row is the average of the columns in the row. For t=2, the grey level is the RMS value of the columns in the row. For t=3, the grey level is the maximum value found in the colums of the row. Clearly, these schemes are not optimal in any sense, but one of them will usually give an acceptable result.

Ordinarily (map=0), the map is the only part of the input object that is modified. The value data is not touched; it still points to various rows in the map just as before the compression. If map=1, the value data is pulled thru the map and the map segment itself is removed. If mask data is present, then this operation proceeds as described in the man page for kmapdata(1).

REQUIRED ARGUMENTS

-i
type: infile
desc: First Input data object
-o
type: outfile
desc: Resulting output data object

OPTIONAL ARGUMENTS

-map
type: boolean
desc: map data after squishing map (1) or leave map with only one column (0)
default: true
-t
type: integer toggle
desc: squishing scheme (1)average, (2)RMS, (3)Maximum
default: 1
allowed values:

EXAMPLES

Squishing and mapping an image that is to be printed.

kmsquish -i ball.xv.color -o ball.ready.to.print

here, -m pand -t do not need to be specified since the defaults are set correctly.

SEE ALSO

igamut(1), kmapdata(1)

RESTRICTIONS

Complex data is not supported.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.