Imp
[using it]
Interface Manipulation Package v4.0 (2008-06-25) a-projector ©copyright Author


imp.ima.util
Class Gamma

java.lang.Object
  extended by imp.ima.util.RgbFilter
      extended by imp.ima.util.Gamma

public class Gamma
extends RgbFilter

Defines an intensity normalization algorithm on RGB buffer.

The gamma correction of the intensity is defined by x->x^1/gamma for gamma > 1, typically 2, while x is the image intensity rescaled between its min and max values. This correction coefficient > 1, if gamma = 0 (default) a reasonable value is computed to obtain a roughly ``flat'' half-scale intensity distribution.


Constructor Summary
Gamma(int[] f)
          Constructs an intensity normalization function.
 
Method Summary
static int[] getGammaLookUp(double gamma, int[] src, int width, int height)
          Returns the look-up table for a given gamma factor.
 
Methods inherited from class imp.ima.util.RgbFilter
filterChannel, filterRGB, getChannel, getRGB, getRGB
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gamma

public Gamma(int[] f)
Constructs an intensity normalization function.

Parameters:
f - Look-up table : f[256] defining the transformation.
Method Detail

getGammaLookUp

public static int[] getGammaLookUp(double gamma,
                                   int[] src,
                                   int width,
                                   int height)
Returns the look-up table for a given gamma factor.
The intensity min-max values are expanded to 0-255.