Main Page Modules File List
long2byte.c File Reference
converts a "long" image to a "byte" image
More...
Detailed Description
converts a "long" image to a "byte" image
Usage: long2byte in.pgm [mode] [n] out.pgm
Description:
Depending on the value given for the (optional) parameter mode:
- mode = 0 (default) : for all x, out[x] = min(255, in[x]).
- mode = 1 : for all x, out[x] = in[x] modulo 256.
- mode = 2 : scales values in the range 0-255.
- mode = 3 : sorts the values by decreasing number of occurence in the image. Replaces the values by their order. Only the n (default 255) first values are kept. Useful for label images.
- mode = 4 : truncation of the square root in the range 0-255.
- mode = 5 : truncation of the log in the range 0-255.
Types supported: long 2d, long 3d
Category: convert
- Author:
-
Michel Couprie
Generated on Fri Dec 17 11:59:37 2004 for Pink by
1.2.18