Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete...
-
Upload
esther-may -
Category
Documents
-
view
221 -
download
6
Transcript of Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete...
![Page 1: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/1.jpg)
Histogram Processing
• The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(rk)=nk, where:
– rk is the kth gray level
– nk is the # pixels in the image with that gray level
– n is the total number of pixels in the image– k = 0, 1, 2, …, L-1
• Normalized histogram: p(rk)=nk/n– sum of all components = 1
![Page 2: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/2.jpg)
Image Enhancement in theSpatial Domain
Image Enhancement in theSpatial Domain
![Page 3: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/3.jpg)
Histogram Processing
• The shape of the histogram of an image does provide useful info about the possibility for contrast enhancement.
• Types of processing:
Histogram equalizationHistogram matching
(specification)Local enhancement
![Page 4: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/4.jpg)
Histogram Equalization
• As mentioned above, for gray levels that take on discrete values, we deal with probabilities:
pr(rk)=nk/n, k=0,1,.., L-1
– The plot of pr(rk) versus rk is called a histogram and the technique used for obtaining a uniform histogram is known as histogram equalization (or histogram linearization).
![Page 5: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/5.jpg)
Histogram Equalization
• Histogram equalization(HE) results are similar to contrast stretching but offer the advantage of full automation, since HE automatically determines a transformation function to produce a new image with a uniform histogram.
)()(0 0
j
k
j
k
jr
jkk rp
n
nrTs ∑ ∑
= =
===
![Page 6: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/6.jpg)
![Page 7: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/7.jpg)
Histogram Matching (or Specification)
• Histogram equalization does not allow interactive image enhancement and generates only one result: an approximation to a uniform histogram.
• Sometimes though, we need to be able to specify particular histogram shapes capable of highlighting certain gray-level ranges.
![Page 8: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/8.jpg)
Histogram Specification
• The procedure for histogram-specification based enhancement is:
– Equalize the levels of the original image using:
∑=
==k
j
jk n
nrTs
0
)(
n: total number of pixels,
nj: number of pixels with gray level rj,
L: number of discrete gray levels
![Page 9: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/9.jpg)
Histogram Specification
– Specify the desired density function and obtain the transformation function G(z):
∑∑=
≈==z
i
iz
z n
nwpzGv
00
)()(
– Apply the inverse transformation function z=G-1(s) to the levels obtained in step 1.
pz: specified desirable PDF for output
![Page 10: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/10.jpg)
Histogram Specification
• The new, processed version of the original image consists of gray levels characterized by the specified density pz(z).
)]([ )( 11 rTGzsGz −− =→=In essence:
![Page 11: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/11.jpg)
Histogram Specification
• The principal difficulty in applying the histogram specification method to image enhancement lies in being able to construct a meaningful histogram. So…
![Page 12: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/12.jpg)
Histogram Specification
– Either a particular probability density function (such as a Gaussian density) is specified and then a histogram is formed by digitizing the given function,
– Or a histogram shape is specified on a graphic device and then is fed into the processor executing the histogram specification algorithm.
![Page 13: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/13.jpg)
Image Enhancement in theSpatial Domain
Image Enhancement in theSpatial Domain
![Page 14: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/14.jpg)
Chapter 3Image Enhancement in the
Spatial Domain
Chapter 3Image Enhancement in the
Spatial Domain
![Page 15: Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(r k )=n k, where: –r k is the kth gray level.](https://reader035.fdocuments.in/reader035/viewer/2022062421/56649cf35503460f949c10e5/html5/thumbnails/15.jpg)