FUN -- Image Enhancement via Functions

Generates a lookup table to perform a specified function and stores it in a database lookup table segment.

Five function types are supported:

        Histogram Equalization
        Histogram Normalization
        Histogram Matching
        Infrequency Brightening
        Adaptive Enhancement

PARAMETERS

FUN is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILE     Database File Name                      1-64      Char
FUNC     Function: EQUA/NORM/MATC/INFR/ADAP      1-4       Char
DBIC     Database Input Channel List             1-16      Int
DBLUT    Database Lookup Table                   0-16      Int
DBSN     Database Segment Name                   1-8       Cha
DBSD     Database Segment Descriptor             0-64      Char
OSTR     Output Stretch Range (Min,Max)          0-2       Int
SDPT     Standard Deviations Per Tail            0-1       Real
TRIM     Tail Trimming % (Left, Right)           0-2       Real
MASK     Area Mask (Window or Bitmap)            0-4       Int
DBHC     Database Histogram Match Channel        0-1       Int

The following parameter receives output

DBLUT    Database Lookup Table                   1-16      Int

FILE

Specifies the name of PCIDSK file to contain the lookup table.

 EASI>FILE="filespec"

FUNC

Specifies the type of histogram-based enhancement desired. Four options are available:

 EASI>FUNC="EQUA"       |"EQUA" - histogram equalization
                        |"NORM" - histogram normalization
                        |"MATC" - histogram matching
                        |"INFR" - infrequency brightening
                        |"ADAP" - adaptive enhancement

DBIC

Specifies a set of input channels to be sampled for lookup table generation:

 EASI> DBIC=i,j,...,p

DBLUT

Specifies lookup table segments on database to receive generated lookup table:

 EASI>DBLUT=i,j,...,p

DBSN

Specifies a 1 to 8-character name to assign the lookup table segment, if one is created. This string is displayed by ASL and may be changed with MAS.

 EASI>DBSN="project "

DBSD

Specifies a 1 to 64-character descriptor for the output lookup table, if one is created. This string is displayed by ASL if LTYP "SHORT" or "FULL" and may be changed with MAS.

 EASI>DBSD="string describing contents or origin of data"

OSTR

Specifies grey level range that the output is to be mapped onto:

 EASI>OSTR=i,j
Default is 0,255.

SDPT

Specifies the number of standard deviations to be included in each tail for Histogram Normalization function.

 EASI>SDPT=3.0

TRIM

Specifies the percentage of tail trimming of the low and high ends of the input histogram(s).

 EASI>TRIM=n1,n2

MASK

Specifies the area in the input channel which should be processed. This can be one of the following:

 EASI>MASK=xoff,yoff,xsize,ysize  | process window
 EASI>MASK=b                      | process only under bitmap
                                  | stored in segment b
 EASI>MASK=                       | process quarter of pixels in
                                  | quarter of scanlines for channel

DBHC

Specifies the database channel whose histogram is to be matched.

 EASI>DBHC=j

DETAILS

FUN performs four types of histogram-based image enhancement functions: Histogram Equalization (FUNC="EQUA"), Histogram Normalization (FUNC="NORM"), Histogram Matching (FUNC="MATC"), Histogram Infrequency Brightening (FUNC="INFR"), and Adpative Enhancement (FUNC="ADAP").

Image data on a set of input channels (DBIC) are read and their histograms are used to generate lookup tables, which are then stored on a set of database lookup table segments (DBLUT) for later use by LUT or IVL. If DBLUT is not specified, FUN creates a new lookup table segment for each input channel specified, and stores the segment numbers in DBLUT. If new lookup segments are created, the segment name must be defined (DBSN) and a segment descriptor may be defined (DBSD). If DBLUT is specified, FUN overwrites the existing lookup table segments.

A lookup table is generated to map the input histogram over the entire range of output grey level values. By default, the output range is 0 to 255, but the user may explicitly specify the minimum and maximum output grey levels using OSTR.

The MASK parameter specifies the area within the input channel which will be processed. Only the area under the mask is read and the rest of the image is not used. If a single value is specified, then this value points to a bitmap segment, which defines the area to be processed. When four values are specified, these values define the x,y offsets and x,y dimensions of a rectangular window within the image to process. If defaulted, the entire database is sampled and one quarter of the pixels in one quarter of the scanlines are used.

The low and high ends of the sample can be trimmed by specified percentages (TRIM) to eliminate outliers or noise.

FUNCTIONS

                 HISTOGRAM EQUALIZATION
Histogram equalization produces an image where grey level values are uniformly distributed: each grey level in the transformed histogram occurs approximately the same number of times.

                 HISTOGRAM NORMALIZATION
Histogram normalization produces an image where the histogram has a normal, or Gaussian, distribution. By default, the distribution will have a mean of 127.5 and a standard deviation of 42.5, or 3.0 standard deviations per histogram tail. The number of standard deviations per tail can be set using SDPT, and the mean will shift to the centre of a specified OSTR.

                  HISTOGRAM MATCHING
Histogram matching produces an image where the histogram has a similar distribution as that of the histogram match image channel (DBHC).

                  INFREQUENCY BRIGHTENER
The infrequency brightener produces an image where the infrequently occurring grey level values in the input image are mapped to the high end of the grey level spectrum.

                  ADAPTIVE ENHANCEMENT
The adaptive enhancement produces an enhanced image based on the median value of the image.

EXAMPLE

The following example illustrates how to generate histogram equalization lookup tables for 3 image channels:

 EASI>FILE="AGRIHOT"
 EASI>FUNC="EQUA"               | set function to equalization
 EASI>DBIC=1,2,3                | equalize channels 1-3
 EASI>DBLUT=                    | write functions to new LUTs
 EASI>DBSN="Equalut"            | assign segment name
 EASI>DBSD=                     | blank segment descriptor
 EASI>OSTR=                     | default stretch range to 0-255
 EASI>SDPT=                     | not needed for FUNC="EQUA"
 EASI>TRIM=                     | default, no trimming
 EASI>MASK=                     | default, sample 1/16 of channel
 EASI>DBHC=                     | not needed for FUNC="EQUA"
 EASI>RUN FUN

About PCI Help Gateway