Histogram equalization: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Removed URL that duplicated identifier. | Use this bot. Report bugs. | #UCB_CommandLine
review: you don't want to use that first option. consistent terminology.
 
Line 41:
:<math>\ T(i) = \operatorname{cdf}_X(i)</math>
where <math>\ i </math> is in the range <math> [0,L-1] </math>. Notice that <math>\ T </math> maps the levels into the range <math>[0,1]</math>, since we used a normalized histogram of <math>X</math>. In order to map the values back into their original range, the following simple transformation needs to be applied to each transformed image value <math>k</math>:
:<math>\ k^\prime = k \cdot(\max(i) - \min(i)) + \min(i)= k \cdot(L- 1)</math><ref>{{web archive |url=https://web.archive.org/web/20200601000000*/https://www.math.uci.edu/icamp/courses/math77c/demos/hist_eq.pdf |title=University of California, Irvine Math 77C - Histogram Equalization}}</ref><!--[[User:Kvng/RTH]]-->
 
<math>k </math> is a real value while<math>\ k^\prime </math> has to be an integer. An intuitive and popular method<ref>{{Cite book|last=Gonzalez|first=Rafael C.|title=Digital image processing|date=2018|publisher=Pearson|others=Richard E. Woods|isbn=978-1-292-22304-9|edition=4th|___location=New York, NY|pages=138–140|oclc=991765590}}</ref> is applying the round operation:
Line 52:
 
== On color images ==
The above-described histogram equalization works on a grayscale image. It can also be used on color images. One option is applying the method separately to the red, green and blue components of the [[RGB]] color values of the image, which likely produces dramatic changes in the image's [[color balance]] since the relative distributions of the color channels change as a result of applying the algorithm. However, if the image is first converted to another color space, [[Lab color space|Lab]], or [[HSL and HSV|HSL/HSV]] in particular, then the algorithm can be applied to the [[luminance]] or value channel without resulting in changes to color properties of the image.<ref>S. Naik and C. Murthy, "[https://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=1257395 Hue-preserving color image enhancement without gamut problem]," IEEE Trans. Image Processing, vol. 12, no. 12, pp. 1591–1598, Dec. 2003</ref><!--[[User:Kvng/RTH]]-->
 
The above describes histogram equalization on a grayscale image. It can also be used on color images by applying the same method separately to the red, green and blue components of the [[RGB]] color values of the image, which may however yield dramatic changes in the image's [[color balance]] since the relative distributions of the color channels change as a result of applying the algorithm. If the image is first converted to another color space, [[Lab color space|Lab]], or [[HSL and HSV|HSL/HSV]] in particular, then the algorithm can be applied to the [[luminance]] or value channel without resulting in changes to the hue and saturation of the image.<ref>S. Naik and C. Murthy, "[https://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=1257395 Hue-preserving color image enhancement without gamut problem]," IEEE Trans. Image Processing, vol. 12, no. 12, pp. 1591–1598, Dec. 2003</ref> There are several histogram equalization methods in 3D space<ref>P. E. Trahanias and A. N. Venetsanopoulos, "[https://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=202045 Color image enhancement through 3-D histogram equalization]," in Proc. 15th IAPR Int. Conf. Pattern Recognition, vol. 1, pp. 545–548, Aug.-Sep. 1992.</ref> which result in "whitening" where the probability of bright pixels are higher than that of dark ones.<ref>N. Bassiou and C. Kotropoulos, "[http://www.sciencedirect.com/science/article/pii/S1077314206002141 Color image histogram equalization by absolute discounting back-off]," Computer Vision and Image Understanding, vol. 107, no. 1-2, pp.108-122, Jul.-Aug. 2007</ref> Han et al. proposed to use a new CDF defined by the ISO-luminance plane, which results in uniform gray distribution.<ref>{{Cite journal|doi = 10.1109/TIP.2010.2068555|title = A Novel 3-D Color Histogram Equalization Method with Uniform 1-D Gray Scale Histogram|year = 2011|last1 = Han|first1 = Ji-Hee|last2 = Yang|first2 = Sejung|last3 = Lee|first3 = Byung-Uk|journal = IEEE Transactions on Image Processing|volume = 20|issue = 2|pages = 506–512|pmid = 20801744| bibcode=2011ITIP...20..506H |s2cid = 17972519}}</ref>
 
==Examples==