IPSTATS Function (PV-WAVE Extreme Advantage)
Computes up to eight different statistical operations on an array, including the mean, variance, standard deviation, skewness, kurtosis, minimum, maximum, and range.
Usage
result = IPSTATS(array)
Input Parameters
array—An array.
Returned Value
result—Returns either a scalar statistical value or an array of the requested statistical values.
Keywords
All—If set, computes all eight statistical calculations.
Kurtosis—If set, computes the kurtosis of array.
Maximum—If set, finds the maximum value in array.
Mean—If set, computes the mean of array.
Minimum—If set, finds the minimum value in array.
Range—If set, determines the range of values in array.
Skewness—If set, computes the skewness of array.
Std—If set, computes the standard deviation of array.
Var—If set, computes the variance of array.
Discussion
If no keywords are specified, the mean of the array is computed and returned as a scalar value. If more than one keyword is specified, or if All is specified, a floating point array containing the requested statistics is returned.
The values in the result array will be in the following order: mean, variance, standard deviation, skewness, kurtosis, minimum, maximum, range.
Example 1
Compute statistics on an image.
; Read an image.
texture = IMAGE_READ(!IP_Data + 'texture.tif')
; Compute statistics for the image.
stats = IPSTATS(texture('pixels'), /All)
; Print the statistics.
PRINT, stats
Example 2
Compute statistics on a series of images.
; Read in some images.
image1 = IMAGE_READ(!IP_Data + 'frame1.tif')
image2 = IMAGE_READ(!IP_Data + 'frame2.tif')
image3 = IMAGE_READ(!IP_Data + 'frame3.tif')
image4 = IMAGE_READ(!IP_Data + 'frame4.tif')
image5 = IMAGE_READ(!IP_Data + 'frame5.tif')
; Compute statistics on the frames.
stats = FLTARR(5, 8)
stats(0,*) = IPSTATS(image1('pixels'), /All)
stats(1,*) = IPSTATS(image2('pixels'), /All)
stats(2,*) = IPSTATS(image3('pixels'), /All)
stats(3,*) = IPSTATS(image4('pixels'), /All)
stats(4,*) = IPSTATS(image5('pixels'), /All)
; Plot the skewness of the frames.
PLOT, stats(*, 3)
See Also