home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
NETWORK
/
netpbm_docs.lzh
/
NETPBM
/
DOCS
/
ppmnorm.1
< prev
next >
Wrap
Text File
|
1996-11-18
|
2KB
|
68 lines
.TH ppmnorm 1 "7 October 1993"
.IX ppmnorm
.SH NAME
ppmnorm - normalize the contrast in a portable pixmap
.SH SYNOPSIS
.B ppmnorm
.RB [ -bpercent
.I N
|
.B -bvalue
.IR N ]
.RB [ -wpercent
.I N
|
.B -wvalue
.IR N ]
.RI [ ppmfile ]
.SH DESCRIPTION
Reads a portable pixmap as input.
Normalizes the contrast by forcing the lightest pixels to white, the
.IX "contrast normalization"
darkest pixels to black, and linearly rescaling the ones in between;
and produces a portable pixmap as output.
.PP
Works by computing the realtive grey-level of each pixel \fIa'la\fP
ppmtopgm, and uses those values to scale the RGB levels.
Note that this is different from using pgmnorm on the
individual red, green, and blue greymaps (as produced by ppmtorgb3) and
recombining them.
.SH OPTIONS
.PP
By default, the darkest 2 percent of all pixels are mapped to black, and
the lightest 1 percent are mapped to white.
You can override these percentages by using the
.B -bpercent
and
.B -wpercent
flags,
or you can specify the exact pixel values to be mapped by using the
.B -bvalue
and
.B -wvalue
flags.
Appropriate numbers for the flags can be gotten from the
.I ppmhist
tool.
.IX ppmhist
If you just want to enhance the contrast, then choose values at elbows in the
histogram; e.g. if value 29 represents 3% of the image but value 30
represents 20%, choose 30 for
.IR bvalue .
If you want to lighten the
image, then set
.I bvalue
to 0 and just fiddle with
.IR wvalue ;
similarly, to darken the image, set
.I wvalue
to maxval and play with
.IR bvalue .
.PP
All flags can be abbreviated to their shortest unique prefix.
.SH "SEE ALSO"
pgmnorm(1), ppmhist(1), ppm(5)
.SH AUTHOR
Wilson H. Bent. Jr. (whb@usc.edu),
heavily based on the pgmnorm filter by Jef Poskanzer.