3.2. Histogram Based Image OperationsΒΆ
Consider a unary point operator. Every pixel value in the image is replaced with a new value. What could be the practical use of such a simple operation? In fact there are many uses and most of them are based on the analysis of what pixels values are present in the image, so we need the histogram to find what values are present.
Here we consider scalar images \(f:\set D\rightarrow \set R\) with range \(\set R = [0,1]\in\setR\). Let \(\phi\) be a function from \([0,1]\in\setR\) to \([0,1]\in\setR\) then we define the monadic point operator:
A monadic point operator thus changes the pixel value \(f(\v x)\) independent of the position \(\v x\) and independent of all values in the neighborhood.
A nice way to interpret and analyze monadic point operator is to consider what the operator does with the image histogram. Or the other way round: we may specify properties of the histogram of the resulting image and see what point operator results in a image whose histogram has the desired properties.
Plotting an image histogram immediately reveals whether all possible gray values are used in the image. This is most often a desirable property: missing large gray values and the images might be too dark, missing low values and the image might be too light. Contrast stretching is a technique to make a new image that shows all possible gray values.
Histogram equalization applies a monadic point operator to an image such that the resulting image has an histogram that is constant. Equalization is often used to normalize the gray values (or luminance in color images) to be invariant to changes in illumination conditions.
In many practical applications of image processing the imaging conditions are such that the objects of interest can be seperated from the background based on the gray values. E.g. low gray values corresponds with objects and high gray values with the background (think of a gray value scan of a piece of paper with text in black ink). Threshold is the simple operator \(f>=t\) where \(f\) is the image and \(t\) is the threshold value. We will look at one method to calculate \(t\) based on the histogram of \(f\).