-
Histogram Modifications
The gray level histogram of an image is the distribution of the gray level in an image . The histogram can be modified by mapping functions, which will stretch, shrink(compress), or slide the histogram. Figure below illustrates a graphical representation of histogram stretch, shrink and slide.
Histogram Modifications
1- Histogram Stretch
The mapping function for histogram stretch can be found by the following equation:
Where, I(x,y) max is the largest gray- level in the image I(x,y). I(x,y) min is the smallest gray- level in the image I(x,y). MAX and MIN correspond to the maximum and minimum gray – level values possible (for an 8-bit image these are 255 and 0). This equation will take an image and stretch the histogram a cross the entire gray-level range which has the effect of increasing the contrast of a low contrast image.
2- Histogram shrink
The opposite of a histogram stretch is a histogram shrink, which will decrease image contrast by compressing the gray levels. The mapping function for a histogram shrinking can be found by the following equation:
Shrink max and shrink min correspond to the maximum and minimum desired in the compressed histogram. In general, this process produces an image of reduced contrast and may not seem to be useful an image enhancement.
3- histogram slide
The histogram slide techniques can be used to make an image either darker or lighter but retain the relationship between gray-level values. This can be a accomplished by simply adding or subtracting a fixed number for all the gray-level values, as follows:
Slide (I(x,y)) = I (x,y)+ OFFSET.
Where OFFSET values is the amount to slide the histogram. In this equation, a positive OFFSET value will increase the overall brightness; where as a negative OFFSET will create a darker image.
Homework
Suppose we have image , according to the following table.
Find
1-Stretch histogram
2-Slide histogram if offset =10
Dostları ilə paylaş: |