histogram
Outputs
which are mapped to avs parameters, inputs, and outputs, are for the
khoros library routine.
*********************************************************************************
Documentation for avs module venhance
Input
img -- pointer to the input image
xsize -- horizontal dimension of the window being used
ysize -- vertical dimension of the window being used
factor -- tuning factor (parameter k, see vman of
venhance)
minstd -- minimum allowed standard deviation
OUTPUT
img -- pointer to the output image
img is used for both the input xvimage structure and
the output result xvimage structure. This is done to
save space, but you must be careful not to overwrite
important data.
venhance returns 1 upon success and 0 on failure.
Description
venhance uses a local transformation based on the mean and
variance of the intensity maps and the intensity of the
input image f(x,y) to create a new image g(x,y) by perform-
ing the following transformation at each pixel location
(x,y):
g(x,y) = A(x,y).[f(x,y) -m(x,y)] + m(x,y),
where
A(x,y) = k . M / sigma(x,y) 0 < k < 1
where m(x,y) and sigma(x,y) are the gray-level mean and
standard deviation computed in a neighborhood centered at
(x,y), M is the global mean of f(x,y), and k is a constant
in the range indicated above.
img is the pointer to the image. xsize and ysize are the
dimension of the window being used. factor is the tuning
factor, this represents k. minstd is the minimum standard deviation allowed in order not to blow upthe value of A.
See also
venhance(1), intro(3), vipl(3), verror(3), vutils(3)
Reference
Digital Image Processing (2nd Edition) by Gon-
zalez and Wintz.
RESTRICTIONS
venhance only operates on byte type images.
Author
Marcelo Teran
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module venhpatch
INPUT
OUTPUT
DESCRIPTION
Stretches the contrast of an image based on local histogram information.
The result is a patch work of differently enhanced subimages.
The -t option allows the user to select equalization or stretch
within each local region.
SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), vheq(1), vhstr(1)
RESTRICTIONS
Will work very poorly if the region size is smaller than the
default values. The data storage type of the input image
should be BYTE.
COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.
*********************************************************************************
Documentation for avs module vheq
INPUT
image points to the input xvimage structure
pneg a flag set (equal 1) if a photonegative out-
put is desired.
OUTPUT
image points to the xvimage structure that contains
the result of the operation.
Return Value: 1 on success, 0 on failure.
DESCRIPTION
vheq performs histogram equalization on the image pointed
to by image. The result will be converted from photopositive
to photonegative after the equalization if pneg is true.
Note that image is used for both the input xvimage struc-
ture and the resulting output xvimage structure. This is
done to save space, but you must be careful not to overwrite
important data.
SEE ALSO
vheq(1), intro(3), vipl(3), verror(3), vutils(3) lvhstr(3)
RESTRICTIONS
vheq will not operate on any data type except
VFF_TYP_1_BYTE.
AUTHOR
Scott Wilson
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vhisto
INPUT
1. image -- xvimage structure
2. hist -- pointer to float array.
3. lrange -- lower range bound
4. urange -- upper range bound
5. nbins -- number of bins
6. mflag -- non-zero means use mask image
7. mimage -- xvimage structure to use as mask image,
must
be structurally the same as *image.
8. logflg -- if nonzero, takes the log of the data
before
histogramming
9. perflg -- if nonzero then output the percentage of
total
count rather than the individual bin
counts
OUTPUT
1. hist -- histogram array with filled values
vhisto returns 1 on success and 0 on failure.
DESCRIPTION
vhisto computes the histogram of a gray-level image.
The float array pointed to by hist is loaded with the histo-
gram of the image specified by the remaining parameters.
The historamming window is that range of data values that
the histogram is to span. The lower bound is set by lower,
and the upper bound set by upper. The number of counting
channels is set by bins. Each bin receives counts from the
HIGH side and includes its own lower bound.
If mflag is non-zero, then the image pointed to by mimage is
used as a operation mask. A non-zero value in this image
enables the corresponding pixel in the input image to be
histogrammed. This image, if used, must match the internal
structure, size and data type of the input image.
The histogram array must have been allocated in the calling
program and must contain at least enough space for the
specified number of integer count channels.
SEE ALSO
vhisto(1), intro(3), vipl(3), verror(3), vutils(3) lvhist-
see(3)
RESTRICTIONS
vhisto will not operate on non-grayscale viff files.
AUTHOR
Ramiro Jordan, Marcelo Teran
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vhsee
INPUT
image -- the image in which to calcualte the histogram
from. pneg -- an integer flag indicating
if
the image is to be inverted. plot -- an
integer indicating if the output should be
displayed (0) or stored to a viff file (1).
OUTPUT
image -- an khoros Byte image to hold the histogram.
The output data type is the same as the input data
Type
both routines return 1 upon success and 0 on failure.
DESCRIPTION
vhsee outputs a histogram in an viff format in a display-
able form. The argument pneg enables the user to invert
(photonegative) the resulting output histogram image.
SEE ALSO
vhsee(1), intro(3), vipl(3), verror(3), vutils(3) lvhisto(3)
RESTRICTIONS
vhsee only works on storage type byte images. vhsee only
works on the acutual pixel values, not the intensity defined
by the maps.
AUTHOR
Mark Young, Marcelo Teran, Ramiro Jordan
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vhstr
INPUT
image points to the input xvimage structure
pneg a flag set (equal 1) if a photonegative out-
put is desired.
OUTPUT
image points to the xvimage structure that contains
the result of the operation.
Return Value: 1 on success, 0 on failure.
DESCRIPTION
vhstr performs a histogram stretch of the grey levels of a
BYTE grey-level image. This is a contrast enhancement tech-
nique that gives less harsh results that histogram equaliza-
tion.
The histogram stretch occurs over a range defined by
integrating in from each end of the histogram until 1 per-
cent 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
vhstr operates only on BYTE images.
AUTHOR
Scott Wilson
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vhxray
INPUT
image - struct xvimage -- the input image
and the output image
type -- int -- 1 = do histogram equalization
2 = do histogram stretch
xsize -- int -- window width size
ysize -- int -- window heigth size
OUTPUT
image - struct xvimage -- after the enhancement
image is used for both the input xvimage structure and
the output result xvimage structure. This is done to
save space, but you must be careful not to overwrite
important data.
vhxray returns 1 upon success and 0 on failure.
DESCRIPTION
This module will enhance an image by using a histogram
stretch or histogram equalization method. Vhxray will use
overlapping windows over the entire image, and for each win-
dow compute the histogram and perform a stretch or equaliza-
tion. The middle pixel of the window is updated according to
the new histogram value.
The window size must be odd (3x3, 5x5, 15x15, etc), since we
must have a center pixel to update for each window. The
default window size is 5x5. The input image must be of type
BYTE.
Since windows are being used, the border pixels will not be
updated. the border pixels will be set to zero, black. The
border size can be calculated as follows: window width / 2 =
side border, window heigth /2 = top & bottom border.
The histogram stretch algorithm will stretch the histogram
out as must as possible. The equalization algorithm is stan-
dard.
SEE ALSO
vhxray(1), intro(3), vipl(3), verror(3), vutils(3)
lvhstr(3), lvheq(3)
RESTRICTIONS
vhxray will only work on BYTE images.
AUTHOR
Tom Sauer, Charlie Gage
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************