lvenhance(3)

LIBRARY ROUTINE
lvenhance - Enhances an image using the local standard deviation and mean.

LIBRARY CALL
#include "vinclude.h"
int
lvenhance(img,xsize,ysize,factor,minstd)
struct xvimage *img;
int xsize, ysize;
float  factor,minstd;

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.

    lvenhance returns 1 upon success and 0 on failure.

MODIFICATIONS

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 performing 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 up the value of A.

SEE ALSO
venhance(1), intro(3), vipl(3), verror(3), vutils(3)

Reference: Digital Image Processing (2nd Edition) by Gonzalez and Wintz.

RESTRICTIONS
lvenhance only operates on byte type images.

AUTHOR
Marcelo Teran

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