HOME GUIDE OPERATIONS DOCS FAQ TECHNIQUES FORMATS INSTALL NEW TIPS WEB LINKS WADSWORTH

CE - Contrast Enhancement

(4/02/02)

PURPOSE

Applies various real space enhancement algorithms to a image.

SEE ALSO

CE FIT [Contrast Enhancement - FIT the histogram]
CE GNC [Contrast Enhancement - Graduated Non Convex restoration]
CE MED [Contrast Enhancement - Median Filtering]
TH [THreshold]
HI [HIstogram - output in results file]

USAGE

.OPERATION: CE

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

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

.(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 image, and applied to the data in PIC001. The histogram equalized image is placed 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 image, a local histogram is computed within a square area of specified size. Contrast enhancement is performed depending on the shape of local histogram.]

If 'S' (Contrast Stretching) 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' (Single) 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 image 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' (Automatic) SPIDER then asks:

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

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

[The contrast stretched image 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' (Double Mapping) 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 image 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' (Histogram Equalization) 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' (Local Histogram Equalization) 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' (Generalized - Local Histogram Equalization) SPIDER asks:

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

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

If 'T' (Threshold - Local Histogram Equalization) 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

MREAD, ENHANC, GRAPHS, EHIST, HIST, LOCAL, LHIST

CALLER

UTIL2

© Copyright Notice /       Enquiries: spider@wadsworth.org

BACK TO SPIDER BACK TO WADSWORTH