An image typically holds a large number of pixels. For instance an image of dimensions 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, kutosis, etc.
The histogram of a grey-level image f(w,h) is a table H(k) (i.e. a 1D signal) which provides the total number pixels (number of occurrances) that have a specific grey-level value k.
Where card{} stands for the cardinal (i.e. number of pixels) in a set.
The image shown below has the following statistical parameters and histogram.
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
Gull image and its histogram
The histogram was computed with kmax=255
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 statistic distribution of the pixels values. Look at an illustrative example.
With this histogram function, it is now possible to compute the histogram of floating point images.
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.
Spine image and its histogram