Download presentation
1
Histogram Manipulation
CHAPTER 6 IMAGE ANALYSIS Histogram Manipulation A. Dermanis
2
x = 0 preserved as “no data” code
The image histogram (e.g. p = 8, 8-bit) x = 1, 2, …, 255 Pixel values for a p-bit digital image: x = 1, 2, …, 2p-1 x = 0 preserved as “no data” code nx N fx = = no of pixels having the value x total number of image pixels Frequency of value x : Image histogram: A. Dermanis
3
Nx = nz Nx N Fx = = no of pixels having the value x
The image histogram Nx = nz z =1 x Number of pixels having value x : Nx N Fx = = no of pixels having the value x total number of image pixels Cumulative frequency of value x : x Fx Image cumulative histogram: 1 128 255 A. Dermanis
4
Histogram Equalization
Image with optimal contrast: all values of gray equally present f (x) = 1 255 f (x) = constant = 2p-1 Corresponding histogram f (x) : homogeneous histogram ! p = 8 (8-bit): F (x) = x 255 2p-1 Corresponding cumulative histogram F (x) : p = 8 (8-bit): A. Dermanis
5
Histogram Equalization
Contrast Enhancement: Transformation of histogram to homogeneous one original cumulative histogram homogeneous Continuous case: Each pixel value x is replaced with a new value x such that F(x) = F (x ) Corresponding realistic discrete case A. Dermanis
6
Histogram Equalization
Problems appearing in discrete histogram equalization: no values are mapped into some particular values of the new equalized histogram Different values are mapped into the same value A. Dermanis
7
Histogram Equalization
Original image and histogram Resulting image and histogram Note departure from ideal homogeneous histogram ! A. Dermanis
8
Modifying an image so that its histogram F(x) is transformed
Histogram matching Modifying an image so that its histogram F(x) is transformed into a prescribed histogram F (x ) (usually that of another image – Result: images of similar contrast) “target” cumulative histogram Each pixel value x is replaced with a new value x such that F(x) = F (x ) original cumulative histogram Same as histogram equalization with homogeneous histogram replaced by a given histogram A. Dermanis
9
Histogram matching The original image and its histogram
The resulting image and its histogram The target image and its histogram Note that histograms are not exactly identical A. Dermanis
10
A & B values, selected so that xmin 1 & xmax L
Linear streching Original image with pixel values limited to an interval xmin x xmax Resulting image with pixel values covering all possible values 0 x L (xmax – x) + L (x – xmin) x = xmax – xmin x x = Ax + B A & B values, selected so that xmin 1 & xmax L Application of a linear transformation A. Dermanis
11
Linear streching Original 3 bands of a Landsat TM image
The same 3 bands after linear stretching of their histograms A. Dermanis
12
Saturated linear streching
Linear transformation with (a > xmin) 1 and (b < xmax) L instead of xmin 1 and xmax L Saturation: (values 1 x < a) 1 (values b < x L) L A. Dermanis
13
Saturated linear streching
Use of saturated linear stretching for the enhancement of particular features: Boat identification Original Resulting Bathymetry determination Original Resulting A. Dermanis
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.