lvhstr(3)

LIBRARY ROUTINE
lvhstr - Performs histogram stretching of a BYTE grey-level image

LIBRARY CALL
#include "vinclude.h"
int
lvhstr(image,pneg)
struct xvimage *image;
int   pneg;

INPUT

image
    points to the input xvimage structure

pneg
    a flag set (equal 1) if a photonegative output is desired.

OUTPUT

image
    points to the xvimage structure that contains the result of the operation.

Return Value:
    1 on success, 0 on failure.

MODIFICATIONS
Replaced call to lvhremap with inline code. c.gage 2/25/91

DESCRIPTION
vhstr performs a histogram stretch of the grey levels of a BYTE grey-level image. This is a contrast enhancement technique that gives less harsh results that histogram equalization.

The histogram stretch occurs over a range defined by integrating in from each end of the histogram until 1 percent of the cells have been found. This prevents straggler channels from ruining the contrast. The histogram within the 1 percent points is given a linear stretch mapping onto the full contrast range.

The argument pneg enables the user to invert (photonegative) the resulting output image. images.

SEE ALSO
vhstr(1), intro(3), vipl(3), verror(3), vutils(3) lvheq(3)

RESTRICTIONS
lvhstr operates only on BYTE images.

AUTHOR
Scott Wilson

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.