Copyright (C) 2000-2012 |
Manpages pnmhisteqSection: User Commands (1)Updated: 19 March 1995 Index Return to Main Contents NAMEpnmhisteq - histogram equalise a portable anymapSYNOPSISpnmhisteq[-gray] [-rmap pgmfile] [-wmap pgmfile] [-verbose] [pnmfile] DESCRIPTIONpnmhisteq increases the contrast of a portable graymap or pixmap through the technique of histogram equalisation[1]. A histogram of the luminance of pixels in the map is computed, from which a transfer function is calculated which spreads out intensity levels around histogram peaks and compresses them at troughs. This has the effect of using the available levels of intensity more efficiently and thereby increases the detail visible in the image.Mathematically, if N[i] is the number of pixels of luminosity i in the image and T is the total number of pixels, luminosity j is replaced by:
If you're processing a related set of images, for example frames of an animation, it's generally best to apply the same intensity map to every frame, since otherwise you'll get distracting frame-to-frame changes in the brightness of objects. pnmhisteq's -wmap option allows you to save, as a portable graymap, the luminosity map computed from an image (usually a composite of the images you intend to process created with pnmcat). Then, you can subsequently process each of the individual images using the luminosity map saved in the file, supplied with the -rmap option. OPTIONS
All flags can be abbreviated to their shortest unique prefix. BUGSHistogram equalisation is effective for increasing the visible detail in scientific imagery and in some continuous-tone pictures. It is often too drastic, however, for scanned halftone images, where it does an excellent job of making halftone artifacts apparent. You might want to experiment with pgnnorm, ppmnorm, and pnmgamma for more subtle contrast enhancement.The luminosity map file supplied by the -rmap option must have the same maxval as the input image. This is always the case when the map file was created by the -wmap option of pnmhisteq. If this restriction causes a problem, simply adjust the maxval of the map with pnmdepth to agree with the input image. If the input is a PBM file (on which histogram equalisation is an identity operation), the only effect of passing the file through pnmhisteq will be the passage of time. SEE ALSOpgmnorm(1), pnm(5), pnmcat(1), pnmdepth(1), pnmgamma(1), pnmnorm(1)
AUTHORWWW home page: http://www.fourmilab.ch/ Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, without any conditions or restrictions. This software is provided ``as is'' without express or implied warranty.
IndexThis document was created by man2html, using the manual pages. Time: 07:30:58 GMT, November 04, 2024 |