Histogram equalization employs a nonlinear mapping of input values to output values. The nonlinear mapping is a scaled integral of the histogram of the input data. Stretching employs a simple linear mapping. Equalization can make the data look visually harsh, but can bring out amazing detail in poor contrast data. Stretching can bring out some detail but preserves the relative brightness of the data. Both of these techniques are described in detail in texts on image processing.
If a mask is present with the input object, data points that are masked off are ignored in the histogramming. The mask is propagated to the output object.
If a map is present with the input object, all data will be pulled through the mask before histogramming. The output object will have no map.
For signed data types, the output will span the whole range of the data type, just as for the unsigned data types. Note that for signed types, this will include the negative part of the range. If this behavior is not desired, the data should be converted to unsigned prior to the application of .I khistops.
The data types that can be handled are currently limited to signed and unsigned byte, and signed and unsigned short integer. The number of bits in a data point is further limited by the internal algorithms to be at most 16, signed or unsigned. If an otherwise acceptable data type is found that exceeds 16 bits (say a 32 bit short) then an error message will be printed. Resolution of this problem is architecture dependent.
The histogram operations can be performed in units of data that can span any of the polymorphic data model dimensions. By default, the unit is composed of 2D planes across width and height (i.e. a normal "image"). It is possible to select processing in volumes, sequences, slices, rows, columns or the whole 5D data set if that is desired. Each unit is histogrammed independently of the others.
khistops supports processing of large data sets via data services. Data access speed is a function of the processing unit dimensions, so significant processing time variance can be observed for varying unit geometries even though the total number of points processed is the same.
Mutually Exclusive Group; you must specify ONE of:
OR
Mutually Exclusive Group; you must specify ONE of:
OR
AT LEAST ONE OF the Group:
AND/OR
AND/OR
AND/OR
AND/OR
% khistops -i image:moon -o moon.heq -equalize -whole
will produce a histogram equalized rendition of the moon image.
Only KBYTE, KUBYTE, KSHORT, and KUSHORT data is supported, and only then if they are 16 bits or less in length.
R.C. Gonzalez and P.A. Wintz, "Digital Image Processing", Addison-Wesley, 1987, ISBN 0-201-11026-1.