KPG1_RMAPx

Remaps an array s values according to an histogram key

Description:

This routine remaps all the values in an array on to new values, according to a key. The key locates element values with respect to an histogram that has been transformed from a linear one, i.e. has equal-sized bins. For example, in histogram equalisation the bin width varies so as to give approximately equal numbers of values in each bin.

Invocation

CALL KPG1_RMAPx( EL, INARR, VALMAX, VALMIN, NUMBIN, MAP, OUTARR, STATUS )

Arguments

EL = INTEGER (Given)
The dimension of the arrays.
INARR( EL ) = ? (Given)
The array to be remapped.
VALMAX = ? (Given)
Maximum value data value used to form the linear histogram. Data values greater than this will be set bad in the output array.
VALMIN = ? (Given)
Minimum value data value used to form the linear histogram. Data values less than this will be set bad in the output array.
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.
MAP( NUMBIN ) = INTEGER (Given)
The key to the transform of the linear histogram. MAP stores the new bin number for each of the linear bin numbers. A bin number in the linear histogram is defined by the fractional position between the minimum and maximum data values times the number of bins.
OUTARR( EL ) = ? (Returned)
The array containing the remapped values.
STATUS = INTEGER (Given)
Global status value.

Notes:

References

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