8Histogram Operations

As indicated in Chapter 7, the parameters for many point operations can be derived from the histogram of pixel values of the image. This chapter is divided into two parts: the first considers greyscale histograms and some of their applications, and the second extends this to multidimensional histograms.

8.1 Greyscale Histogram

The histogram of a greyscale image, as shown in Figure 8.1, gives the count of the number of pixels in an image as a function of pixel value:

Closely related is the cumulative histogram, which counts the number of pixels less than or equal to a pixel value:

(8.2)upper S 0 upper H left-bracket i right-bracket equals sigma-summation Underscript x comma y Endscripts StartLayout Enlarged left-brace 1st Row 1st Column 1 comma 2nd Column upper I left-bracket x comma y right-bracket less-than-or-equal-to i 2nd Row 1st Column 0 comma 2nd Column otherwise EndLayout equals sigma-summation Underscript n equals 0 Overscript i Endscripts upper H left-bracket n right-bracket period

The cumulative histogram is always monotonically increasing as is shown in Figure 8.1, with the total number of pixels in the image, upper N Subscript upper P Baseline equals upper S 0 upper H left-bracket 2 Superscript upper B Baseline minus 1 right-bracket.

There are two main steps associated with using histograms for image processing. The first step is to build the histogram, and the second is to extract data from the histogram and use it for processing the image. Building the histogram will be described in Section 8.1.1, whereas the applications are discussed in Sections 8.1.2, 8.1.3, 8.1.4, 8.1.5, 8.1.6.

8.1.1 Building the Histogram

To build the histogram, it is necessary to accumulate ...

Get Design for Embedded Image Processing on FPGAs, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.