lvhxray(3)

LIBRARY ROUTINE
lvhxray - Enhance images using histogram stretch or equalization with overlapping windows.

LIBRARY CALL
#include "vinclude.h"
int
lvhxray(image, type, xsize, ysize)
struct xvimage *image;
int type, xsize, ysize;

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.

    lvhxray returns 1 upon success and 0 on failure.

MODIFICATIONS

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 window compute the histogram and perform a stretch or equalization. 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 standard.

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

RESTRICTIONS
lvhxray will only work on BYTE images.

AUTHOR
Tom Sauer, Charlie Gage

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