PV-WAVE Extreme Advantage > Image Processing Toolkit User Guide > Reference A–I > ENTROPY Function (PV-WAVE Extreme Advantage)
ENTROPY Function (PV-WAVE Extreme Advantage)
Computes the entropy of an array.
Usage
result = ENTROPY(array)
Input Parameters
array—A 2D array.
Returned Value
result—A floating-point scalar value with the array entropy.
Keywords
None.
Discussion
Computes the entropy of array(k, l) as:
where array(k, l) > 0.
Values in array less than or equal to 0 don’t contribute to the entropy calculation because the natural log function is undefined for these values. The entropy of an array of all zeros and/or negative values is undefined.
Example
; Read an image.
image = IMAGE_READ(!IP_Data + 'noise_test.tif')
; Compute the entropy of the image.
ent = ENTROPY(image('pixels'))
PRINT, 'Entropy = ', ent
See Also