Image Statistics

[Laboratory]

An image typically holds a large number of pixels. For instance an image of size W(width)=512 x H(height)=512 has approximately a quarter of a million pixels. Two widely used tools that aid in gaining insight of an image under observation are statistics and histogram.

For instance, statistic parameters that play an important role are: mean and variance values, minimum and maximum pixel values and their location, skewness, kurtosis, etc.

The cumulative histogram of a grey-level image f(w,h) is a function H(k) (i.e. a 1D signal) which provides the total number pixels (number of occurrances) that have grey-level less than the value k.

displaymath149

displaymath150

displaymath151


Where card stands for the cardinallity (i.e. number of pixels) of a set.

The histogram of a grey-level image f(w,h) is a table h(k) (i.e. a 1D signal) which is the discrete difference of the cumulative histogram. It provides the total number pixels (number of occurrances) that have a specific grey-level value k.

displaymath152

The image shown below has the following statistical parameters.

number of pixels:65536  
Positive pixels :65536   Negative pixels   : 0         Zero pixels: 6
Minimum value   :0       Maximum value     : 255
Mean value      :87.19   Standard Deviation: 65.77

Its cumulative histogram and its histogram is shown below:

Original image

a)Cumulative histogram; b)Histogram
a) b)

Observe that the gull image has a large number of dark pixels around the pixel value 50. These pixels correspond to the background pixels (sea) which represents a large portion of the total pixels in the image.

Displaying an image we get information about the spatial distribution of the pixels. On the other hand, the histogram provides information on the density distribution of the pixels values. Look at an illustrative example.

The histogram computation can be generalized to count the number of occurrences of pixels within a specified range of grey-level values. We call this range the bin width B. Instead of specifying the range of grey-levels from 0 to kmax, we can specify a minimum grey-value kmin and a number of bins Bn. The equation for this type of histogram hr(k) is:

displaymath153

displaymath154

displaymath151

With this histogram function, it is now possible to compute the histogram of floating point images.

The image spine.kdf has floating point pixels values. Some statistical parameters for this image are:

number of pixels:58368
Positive pixels :58368   Negative pixels   : 0         Zero pixels: 0
Minimum value   :1024    Maximum value     : 1862
Mean value      :1068.9  Standard Deviation: 79.0

We can compute the histogram of this image beginning at a minimum value of kmin=1000 and with Bn=100 bins of width B=10. Note that in the histogram shown below, bin 0 corresponds to all pixel values ranging from 1000 to less than 1010.

a)Spine image; b)Its histogram
a) b)





Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved