HOME GUIDE OPERATIONS DOCS ERRORS FORMATS INSTALL NEW TIPS WEB SITES

CE - Contrast Enhancement

(7/19/97)

PURPOSE

Applies various real space enhancement algorithms to a picture.

SEE ALSO

CE FIT [Contrast enhancement - fit the histogram]
CE GNC [Contrast enhancement - graduated non convex restoration]
CE MED [Contrast enhancement - using median filtering]
TH [Threshold]
HI [Histogram]

USAGE

.OPERATION: CE

.INPUT FILE: PIC001
[Enter name of picture to be processed.]

.OUTPUT FILE: PIC002
[Enter name of file receiving the output picture.]

.(S)TRETCH, (H)ISTOGRAM EQUALIZE OR (L)OCAL? (S/H/L) : S/H/L
[Option 'S' for contrast stretching.

Option 'H' for histogram equalization.
A non-linear contrast stretch mapping function is computed by integrating the histogram of the picture, and applied to the data in PIC001. The histogram equalized picture is found in PIC002. The density mapping function and histograms before and after stretching will be printed out.

Option 'L' for enhancement depending on local histogram. For each point in the input picture, the local histogram gram is computed within a square area of specified size. Contrast enhancement is performed depending on the shape of local histogram.]

If 'S' Spider then asks:

.(S)INGLE, (A)UTOMATIC OR (D)OUBLE MAPPING? (S/A/D): S/A/D
[Option 'S' for single mode stretching (= normal mode) The contrast is linearly stretched between bottom and top density specified. These values can be determined from a histogram output (see 'HI').

Option 'A' for automatic single mode stretching. The contrast is linearly stretched between bottom and top density. These values are determined from an integral threshold specification in the following way: the integrals over the histogram from the right- and left-hand sides are compared with a specified fraction of the total histogram area (= total number of points). The bottom and top densities are defined as the density values where the left- and right-hand integrals, respectively, become equal to the specified fraction.

Option 'D' for Double mode stretching. The contrast is linearly stretched in two sections of the histogram specified by BOTTOM1, TOP1, BOTTOM2, TOP2.]

If 'S' Spider then asks:

.BOTTOM DENSITY VALUE: .5
[Enter density value that is to be mapped to 0.0]

.TOP DENSITY VALUE: 1.2
[Enter density value that is to be mapped to 2.0]

[The contrast stretched picture will then be computed and put into PIC002. The density, mapping function, and the histograms before and after stretching will be printed out.]

If 'A' Spider then asks:

.INTEGRAL THRESHOLD PERCENT: .5
[Enter percentage of total histogram area to be used for definition of top and bottom density.]

.RESULT HISTOGRAM (Y/N): Y
[Indicate if the histogram of the stretched image is to be computed and printed out.]

[The contrast stretched picture will then be computed and put into PIC002. The following info will be printed out: 1. The histogram before stretching, if this is newly computed.
2. The density mapping function.
3. The histogram after stretching if this option is chosen.

If 'D' Spider asks:

.BOTTOM1: 0.1
[Enter density value of first lobe to be mapped into 0.]

.TOP1: 0.3
[Enter density value of first lobe to be mapped into 2.]

.BOTTOM2: 0.6
[Enter value of second lobe to be mapped into 0.]

.TOP2: 0.8
[Enter value of second lobe to be mapped into 2.]

[SPIDER checks if BOTTOM1 < TOP1 < BOTTOM2 < TOP2. If the values are not ordered in this way, an error message will be printed out. As in A.1. and A.2., the contrast stretched picture will then be computed and put into PIC002. The density mapping function and the histograms before and after stretching will be printed out.]

If 'H' Spider asks:

.MAPPING F AND HIST. PRINTOUT? (Y/N): Y/N
[Enter 'Y' if you want to have a display of mapping function and histogram after enhancement.]

If 'L' Spider asks:

.(G)ENERALIZED HIST. EQ. OR (T)HRESHOLD: G/T
[Option 'G' for generalized histogram equalization. A local mapping function is constructed by integrating the local histogram.

Option 'T' for Threshold Discrimination Depending On Local Histogram Information. The pixel density is switched to 0. or 2. depending on whether its original value is smaller or larger than a density value marking a specified fraction of the total histogram area.]

If 'G' Spider asks:

.LOCAL AREA SIZE: 7
[Enter linear size of local area.]

[The processed image will be found in PIC002. No printout will result.]

If 'T' Spider asks:

.HISTOGRAM THRESHOLD PERCENTAGE: 50.
[Enter percentage specifying histogram fraction used for discrimination.]

[The processed image will be found in PIC002. No printout will result.]

SUBROUTINES

ENHANC, GRAPHS, EHIST, HIST, LOCAL

CALLER

UTIL2

© Copyright Notice /       Enquiries: spider@wadsworth.org