Contrast.c File Reference


Functions

VImage VContrast (VImage src, VImage dest, VRepnKind repn, VFloat alpha, VFloat background)
VImage VContrastUByte (VImage src, VImage dest, VFloat low, VFloat high)
VImage VContrastShort (VImage src, VImage dest, VFloat low, VFloat high)
VImage VMapImageRange (VImage src, VImage dest, VRepnKind repn)
 The minimum and maximum grey values of the input images are computed, and a linear mapping is performed mapping the input minimum(maximum) of the input image to the min(max) value of the output pixel repn. E.g. if the input image min is -17 and its max is +2376, and the output repn is VUByteRepn, then the linear mapping function maps -17 to 0 and +2376 to 255.

Detailed Description

Contrast enhancement.

A piecewise-linear contrast enhancement is performed. The contrast stretching function is derived from the mean value and the standard deviation of the input image. The output pixel repn need not be identical to the input image. Thus, it is possible to convert to ubyte repn for easier visualization.

Author:
Gabriele Lohmann, MPI-CBS

Function Documentation

VImage VContrast ( VImage  src,
VImage  dest,
VRepnKind  repn,
VFloat  alpha,
VFloat  background 
)

Parameters:
src input image (any repn)
dest output image (any repn)
repn the output pixel repn (e.g. VUByteRepn)
alpha contrast stretching factor. The function stretches grey values between mean-alpha*sigma and mean+alpha*sigma.
background input grey values with absolute values less than <background> are assumed to be image background and are not used for computing the image mean and sigma. If set to zero, it has no effect.

VImage VContrastUByte ( VImage  src,
VImage  dest,
VFloat  percent,
VFloat  background 
)

Parameters:
src input image (ubyte repn)
dest output image (ubyte repn)
percent percentage of pixels to ignore at either end of the histogram.
background input grey values with absolute values less than <background> are assumed to be image background.

VImage VContrastShort ( VImage  src,
VImage  dest,
VFloat  percent,
VFloat  background 
)

Parameters:
src input image (short repn)
dest output image (ubyte repn)

VImage VMapImageRange ( VImage  src,
VImage  dest,
VRepnKind  repn 
)

The minimum and maximum grey values of the input images are computed, and a linear mapping is performed mapping the input minimum(maximum) of the input image to the min(max) value of the output pixel repn. E.g. if the input image min is -17 and its max is +2376, and the output repn is VUByteRepn, then the linear mapping function maps -17 to 0 and +2376 to 255.

Parameters:
src input image (any repn)
dest output image
repn the output pixel repn (e.g. VUByteRepn)


Generated on Thu Feb 16 21:10:38 2012 for VIA - Volumetric Image Analysis by  doxygen 1.5.6