KPG1_HSTQx

Equalises the histogram of an array

Description:

This routine equalises (linearises) the histogram of an array. Thus approximately equal numbers of different values appear in output equalised version of the input array.

Invocation

CALL KPG1_HSTQx( BAD, EL, INARR, NUMBIN, OLDHST, MAP, OUTARR, STATUS )

Arguments

BAD = LOGICAL (Given)
If true there may be bad values within the input array. If false there are no bad values. It is used as an efficiency mechanism.
EL = INTEGER (Given)
The dimension of the arrays.
INARR( EL ) = ? (Given)
The array to be equalised.
NUMBIN = INTEGER (Given)
Number of bins used in histogram. A moderately large number of bins is recommended so that there is little artifactual quantisation is introduced, say a few thousand except for byte data.
OLDHST( NUMBIN ) = INTEGER (Returned)
The histogram of the input array, i.e. before equalisation.
MAP( NUMBIN ) = INTEGER (Returned)
Key to transform the input histogram s bin number to the equalised bin number after histogram mapping.
OUTARR( EL ) = ? (Returned)
The array containing the equalised values.
STATUS = INTEGER (Given)
Global status value.

Notes:

References

Gonzalez, R.C. and Wintz, P., 1977, " Digital Image Processing" , Addison-Wesley, pp. 118–126.