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
<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]]-->
==Examples==
|