|
|
| Line 1: |
Line 1: |
| {{About|the process applied to still images|the equivalent process applied to video|Color grading}}
| | Hello, I'm Gennie, a 23 year old from San Diego, United States.<br>My hobbies include (but are not limited to) Fossil hunting, Basketball and watching The Vampire Diaries.<br><br>my site :: [http://raelphpfoxmods.com/v3demo/index.php?do=/profile-384362/info/info/ Fifa 15 Coin Generator] |
| [[File:Lily-M7292-As-shot-and-manual.jpg|thumb|right|300px|The left half shows the photo as it came from the digital camera. The right half shows the photo adjusted to make a gray surface neutral in the same light.]]
| |
| [[File:Clifton Beach 5.jpg|thumb|right|300px|A seascape photograph at [[Clifton Beach, Tasmania|Clifton Beach]], [[South Arm, Tasmania|South Arm]], [[Tasmania]], Australia. The white balance has been adjusted towards the warm side for creative effect.]]
| |
| [[File:ColorChecker100423.jpg|thumb|right|300px|Photograph of a ColorChecker as a reference shot for color balance adjustments.]]
| |
| [[File:Government Center Miami color balance comparison.jpg|thumb|right|300px|Two photos of the Stephen P. Clark Government Center building in Miami, Florida taken with a Samsung SL50 point and shoot camera. Left photo shows a "normal", accurate color balance, while the right side shows a "vivid" color balance]]
| |
| [[Image:PIA16800-MarsCuriosityRover-MtSharp-ColorVersions-20120823.jpg|thumb|right|300px|Comparison of color versions (raw, natural, white balance) of "[[Aeolis Mons|Mount Sharp]]" on [[Mars]] (August 23, 2012).]]
| |
| [[Image:PIA16068 - Mars Curiosity Rover - Aeolis Mons - 20120817.jpg|thumb|right|300px|A white balanced image of "[[Aeolis Mons| Mount Sharp]]" on [[Mars]] (August 8, 2012).]]
| |
| | |
| In [[photography]] and [[image processing]], '''color balance''' is the global adjustment of the intensities of the colors (typically red, green, and blue [[primary colors]]). An important goal of this adjustment is to render specific colors – particularly neutral colors – correctly; hence, the general method is sometimes called '''gray balance''', '''neutral balance''', or '''white balance'''. Color balance changes the overall mixture of colors in an image and is used for [[color correction]]; generalized versions of color balance are used to get colors other than neutrals to also appear correct or pleasing.
| |
| | |
| Image data acquired by sensors – either [[photographic film|film]] or electronic [[image sensor]]s – must be transformed from the acquired values to new values that are appropriate for color reproduction or display. Several aspects of the acquisition and display process make such color correction essential – including the fact that the acquisition sensors do not match the sensors in the human eye, that the properties of the display medium must be accounted for, and that the ambient viewing conditions of the acquisition differ from the display viewing conditions.
| |
| | |
| The color balance operations in popular [[image editing]] applications usually operate directly on the red, green, and blue channel [[pixel]] values,<ref>{{Cite book| title = The Gimp for Linux and Unix | author = Phyllis Davis | publisher = Peachpit Press | year = 2000 | isbn = 0-201-70253-3 | url = http://books.google.com/?id=0sEnoWrMw-gC&pg=PA135&dq=%22color+balance%22+channels | page = 134}}</ref><ref>{{Cite book| title = Adobe Photoshop 6.0 | author = Adobe Creative Team | publisher = Adobe Press | year = 2000 | isbn = 0-201-71016-1 | url = http://books.google.com/?id=MRtx2-0GZc4C&pg=PA277&dq=%22color+balance%22+channels | page = 278 }}</ref> without respect to any color sensing or reproduction model. In shooting film, color balance is typically achieved by using [[color correction filter]]s over the lights or on the camera lens.<ref>{{Cite book| title = Cinematography: Theory and Practice : Imagemaking for Cinematographers, Directors, and Videographers | author = Blain Brown | publisher = Focal Press | year = 2002 | isbn = 0-240-80500-3| url = http://books.google.com/?id=1JL2jFbNPNAC&pg=PA170&dq=%22color+balance%22 | page=170 }}</ref>
| |
| | |
| ==Generalized color balance==
| |
| Sometimes the adjustment to keep neutrals neutral is called ''white balance'', and the phrase ''color balance'' refers to the adjustment that in addition makes other colors in a displayed image appear to have the same general appearance as the colors in an original scene.<ref>{{Cite book| title = Introduction to Color Imaging Science | author = Hsien-Che Lee | publisher = Cambridge University Press | year = 2005 | isbn = 0-521-84388-X | url = http://books.google.com/?id=CzAbJrLin_AC&pg=PA450&vq=color+balance&dq=%22color+balance%22+wandell | page=450 }}</ref> It is particularly important that neutral (gray, [[achromatic]], white) colors in a scene appear neutral in the reproduction. Hence, the special case of balancing the neutral colors (sometimes ''gray balance'', ''neutral balance'', or ''white balance'') is a particularly important – perhaps dominant – element of color balancing.
| |
| | |
| Normally, one would not use the phrase ''color balance'' to describe the adjustments needed to account for differences between the sensors and the human eye, or the details of the display primaries. ''Color balance'' is normally reserved to refer to correction for differences in the ambient illumination conditions. However, the algorithms for transforming the data do not always clearly separate out the different elements of the correction. Hence, it can be difficult to assign color balance to a specific step in the color correction process. Moreover, there can be significant differences in the color balancing goal. Some applications are created to produce an accurate rendering – as suggested above. In other applications, the goal of color balancing is to produce a pleasing rendering. This difference also creates difficulty in defining the color balancing processing operations.
| |
| | |
| ==Illuminant estimation and adaptation==
| |
| Most digital cameras have a means to select a color correction based on the type of scene illumination, using either manual illuminant selection, or automatic white balance (AWB), or custom white balance. The algorithm that performs this analysis performs generalized color balancing, known as illuminant adaptation or [[chromatic adaptation]].
| |
| | |
| Many methods are used to achieve color balancing. Setting a button on a camera is a way for the user to indicate to the processor the nature of the scene lighting. Another option on some cameras is a button which one may press when the camera is pointed at a [[gray card]] or other neutral object. This "custom white balance" step captures an image of the ambient light, and this information is helpful in controlling color balance.
| |
| | |
| There is a large literature on how one might estimate the ambient illumination from the camera data and then use this information to transform the image data. A variety of algorithms have been proposed, and the quality of these have been debated. A few examples and examination of the references therein will lead the reader to many others. Examples are [[Retinex]], an [[artificial neural network]]<ref name="Funt1996">Brian Funt, Vlad Cardei, and Kobus Barnard, "[http://www.cs.sfu.ca/~colour/publications/ARIZONA/arizona_abs.html Learning color constancy]," in ''Proceedings of the Fourth IS&T/SID Color Imaging Conference,'' p 58-60 (1996).</ref> or a [[Bayesian method]].<ref name=Finlayson2001>{{Cite journal
| |
| | author = Graham Finlayson, Paul M. Hubel, and Steven Hordley
| |
| |date=November 2001
| |
| | title = Color by correlation: a simple, unifying framework for color constancy
| |
| | journal = [[IEEE Transactions on Pattern Analysis and Machine Intelligence]]
| |
| | volume = 23
| |
| | issue = 11
| |
| | pages = 1209–1221
| |
| | doi = 10.1109/34.969113
| |
| | url = http://www2.cmp.uea.ac.uk/Research/compvis/Papers/FinHorHub_PAMI01.pdf
| |
| |format=PDF}}</ref>
| |
| | |
| ==Color balance and chromatic colors==
| |
| Color balancing an image affects not only the neutrals, but other colors as well. An image that is not color balanced is said to have a color cast, as everything in the image appears to have been shifted towards one color or another.<ref name="Yule1967">John A C Yule, ''Principles of Color Reproduction.'' New York: Wiley, 1967.</ref>{{Page needed|date=September 2010}} Color balancing may be thought in terms of removing this color cast.
| |
| | |
| Color balance is also related to [[color constancy]]. Algorithms and techniques used to attain color constancy are frequently used for color balancing, as well. Color constancy is, in turn, related to [[chromatic adaptation]]. Conceptually, color balancing consists of two steps: first, determining the [[standard illuminant|illuminant]] under which an image was captured; and second, scaling the components (e.g., R, G, and B) of the image or otherwise transforming the components so they conform to the viewing illuminant.
| |
| | |
| Viggiano found that white balancing in the camera's native [[RGB]] tended to produce less color inconstancy (i.e., less distortion of the colors) than in monitor RGB for over 4000 hypothetical sets of camera sensitivities.<ref name="Viggiano2004"/> This difference typically amounted to a factor of more than two in favor of camera RGB. This means that it is advantageous to get color balance right at the time an image is captured, rather than edit later on a monitor. If one must color balance later, balancing the [[Raw image format|raw image data]] will tend to produce less distortion of chromatic colors than balancing in monitor RGB.
| |
| | |
| ==Mathematics of color balance==
| |
| Color balancing is sometimes performed on a three-component image (e.g., [[RGB color model|RGB]]) using a 3x3 [[matrix (mathematics)|matrix]]. This type of transformation is appropriate if the image were captured using the wrong white balance setting on a digital camera, or through a color filter.
| |
| | |
| ===Scaling monitor R, G, and B===
| |
| In principle, one wants to scale all relative luminances in an image so that objects which are believed to be [[grey|neutral]] appear so. If, say, a surface with <math>R=240</math> was believed to be a white object, and if 255 is the count which corresponds to white, one could multiply all [[red]] values by 255/240. Doing analogously for [[green]] and [[blue]] would result, at least in theory, in a color balanced image. In this type of transformation the 3x3 matrix is a [[diagonal matrix]].
| |
| | |
| : <math>\left[\begin{array}{c} R \\ G \\ B \end{array}\right]=\left[\begin{array}{ccc}255/R'_w & 0 & 0 \\ 0 & 255/G'_w & 0 \\ 0 & 0 & 255/B'_w\end{array}\right]\left[\begin{array}{c}R' \\ G' \\ B' \end{array}\right]</math> | |
| | |
| where <math>R</math>, <math>G</math>, and <math>B</math> are the color balanced red, green, and blue components of a [[pixel]] in the image; <math>R'</math>, <math>G'</math>, and <math>B'</math> are the red, green, and blue components of the image before color balancing, and <math>R'_w</math>, <math>G'_w</math>, and <math>B'_w</math> are the red, green, and blue components of a pixel which is believed to be a white surface in the image before color balancing. This is a simple scaling of the red, green, and blue channels, and is why color balance tools in [[Photoshop]] and the [[GIMP]] have a white eyedropper tool. It has been demonstrated that performing the white balancing in the phosphor set assumed by [[sRGB]] tends to produce large errors in chromatic colors, even though it can render the neutral surfaces perfectly neutral.<ref name="Viggiano2004">J A Stephen Viggiano, "[http://www.acolyte-color.com/papers/EI_2004.pdf Comparison of the accuracy of different white balancing options as quantified by their color constancy]." ''Sensors and Camera Systems for Scientific, Industrial, and Digital Photography Applications V: Proceedings of the SPIE,'' volume 5301. Bellingham, WA: SPIE: the International Society for Optical Engineering, p 323-333 (2004), retrieved online 2008-07-28.</ref>
| |
| | |
| ===Scaling X, Y, Z===
| |
| If the image may be transformed into [[CIE 1931 color space|CIE XYZ tristimulus values]], the color balancing may be performed there. This has been termed a “wrong von Kries” transformation.<ref name=Terstiege1972>{{Cite journal
| |
| | author = Heinz Terstiege
| |
| | title = Chromatic adaptation: a state-of-the-art report
| |
| | year = 1972
| |
| | journal = Journal of Color Appearance
| |
| | volume = 1
| |
| | issue = 4
| |
| | pages = 19–23 (cont. 40)
| |
| }}</ref><ref name="Fairchild1998">Mark D Fairchild, ''Color Appearance Models.'' Reading, MA: Addison-Wesley, 1998.</ref> Although it has been demonstrated to offer usually poorer results than balancing in monitor RGB, it is mentioned here as a bridge to other things. Mathematically, one computes:
| |
| | |
| :<math>\left[\begin{array}{c} X \\ Y \\ Z \end{array}\right]=\left[\begin{array}{ccc}X_w/X'_w & 0 & 0 \\ 0 & Y_w/Y'_w & 0 \\ 0 & 0 & Z_w/Z'_w\end{array}\right]\left[\begin{array}{c}X' \\ Y' \\ Z' \end{array}\right]</math>
| |
| | |
| where <math>X</math>, <math>Y</math>, and <math>Z</math> are the color-balanced tristimulus values; <math>X_w</math>, <math>Y_w</math>, and <math>Z_w</math> are the tristimulus values of the viewing illuminant (the white point to which the image is being transformed to conform to); <math>X'_w</math>, <math>Y'_w</math>, and <math>Z'_w</math> are the tristimulus values of an object believed to be white in the un-color-balanced image, and <math>X'</math>, <math>Y'</math>, and <math>Z'</math> are the tristimulus values of a pixel in the un-color-balanced image. If the tristimulus values of the monitor primaries are in a matrix <math>\mathbf{P}</math> so that:
| |
| | |
| :<math>\left[\begin{array}{c} X \\ Y \\ Z \end{array}\right]=\mathbf{P}\left[\begin{array}{c}L_R \\ L_G \\ L_B \end{array}\right]</math>
| |
| | |
| where <math>L_R</math>, <math>L_G</math>, and <math>L_B</math> are the un-[[gamma correction|gamma corrected]] monitor RGB, one may use:
| |
| | |
| :<math>\left[\begin{array}{c} L_R \\ L_G \\ L_B \end{array}\right]=\mathbf{P^{-1}}\left[\begin{array}{ccc}X_w/X'_w & 0 & 0 \\ 0 & Y_w/Y'_w & 0 \\ 0 & 0 & Z_w/Z'_w\end{array}\right]\mathbf{P}\left[\begin{array}{c}L_{R'} \\ L_{G'} \\ L_{B'} \end{array}\right]</math>
| |
| | |
| ===Von Kries's method===
| |
| [[Johannes von Kries]], whose theory of [[rod cell|rods]] and three color-sensitive [[cone cell|cone]] types in the [[retina]] has survived as the dominant explanation of color sensation for over 100 years, motivated the method of converting color to the [[LMS color space]], representing the effective stimuli for the Long-, Medium-, and Short-wavelength cone types that are modeled as adapting independently. A 3x3 matrix converts RGB or XYZ to LMS, and then the three LMS primary values are scaled to balance the neutral; the color can then be converted back to the desired final [[color space]]:<ref name=Sharma>{{Cite book| title = Digital Color Imaging Handbook | author = Gaurav Sharma| url = http://books.google.com/?id=AkByHKRGTsQC&pg=PA153&dq=%22von+Kries%22 | publisher = [[CRC Press]] | year = 2003 | isbn = 0-8493-0900-X | page=153 }}</ref>
| |
| | |
| :<math>\left[\begin{array}{c} L \\ M \\ S \end{array}\right]=\left[\begin{array}{ccc}1/L'_w & 0 & 0 \\ 0 & 1/M'_w & 0 \\ 0 & 0 & 1/S'_w\end{array}\right]\left[\begin{array}{c}L' \\ M' \\ S' \end{array}\right]</math>
| |
| | |
| where <math>L</math>, <math>M</math>, and <math>S</math> are the color-balanced LMS cone tristimulus values; <math>L'_w</math>, <math>M'_w</math>, and <math>S'_w</math> are the tristimulus values of an object believed to be white in the un-color-balanced image, and <math>L'</math>, <math>M'</math>, and <math>S'</math> are the tristimulus values of a pixel in the un-color-balanced image.
| |
| | |
| Matrices to convert to LMS space were not specified by von Kries, but can be derived from CIE color matching functions and LMS color matching functions when the latter are specified; matrices can also be found in reference books.<ref name=Sharma/>
| |
| | |
| ===Scaling camera RGB===
| |
| By Viggiano's measure, and using his model of gaussian camera spectral sensitivities, most camera RGB spaces performed better than either monitor RGB or XYZ.<ref name="Viggiano2004"/> If the camera's raw RGB values are known, one may use the 3x3 diagonal matrix:
| |
| | |
| : <math>\left[\begin{array}{c} R \\ G \\ B \end{array}\right]=\left[\begin{array}{ccc}255/R'_w & 0 & 0 \\ 0 & 255/G'_w & 0 \\ 0 & 0 & 255/B'_w\end{array}\right]\left[\begin{array}{c}R' \\ G' \\ B' \end{array}\right]</math>
| |
| | |
| and then convert to a working RGB space such as [[sRGB]] or [[Adobe RGB]] after balancing.
| |
| <!-- in progress!
| |
| However, if one has already converted to monitor RGB, one may still work in camera RGB if a 3x3 [[regular matrix]] <math>\mathbf{A}</math> characterizes the camera's color mixing behavior reasonably well, so that:
| |
| | |
| : <math>\left[\begin{array}{c} X \\ Y \\ Z \end{array}\right]\approx\mathbf{A}\left[\begin{array}{c}L_R \\ L_G \\ L_B \end{array}\right]</math>
| |
| | |
| (This matrix is included in the [[ICC profile]] for some cameras.<ref name="ICC01_2006">International Color Consortium, ''Specification ICC.1:2004-10 (Profile version 4.2.0.0) Image technology colour management — Architecture, profile format, and data structure'', (2006).</ref>) If this matrix is known, one computes:
| |
| | |
| :<math>\left[\begin{array}{c} L_R \\ L_G \\ L_B \end{array}\right]=\mathbf{P^{-1}A^{-1}}\left[\begin{array}{ccc}R_w/R'_w & 0 & 0 \\ 0 & G_w/G'_w & 0 \\ 0 & 0 & B_w/B'_w\end{array}\right]\mathbf{A\cdotP}\left[\begin{array}{c}L_{R'} \\ L_{G'} \\ L_{B'} \end{array}\right]</math>
| |
| | |
| where <math>\mathbf{P}</math> is the phosphor matrix mentioned in the previous section; <math>L_{Rw}</math, <math>G_w</math, <math>B_w</math are the
| |
| -->
| |
| | |
| ===Preferred chromatic adaptation spaces===
| |
| Comparisons of images balanced by diagonal transforms in a number of different RGB spaces have identified several such spaces that work better than others, and better than camera or monitor spaces, for chromatic adaptation, as measured by several color appearance models; the systems that performed statistically as well as the best on the majority of the image test sets used were the "Sharp", "Bradford", "CMCCAT", and "ROMM" spaces.<ref>{{Cite journal| url = http://infoscience.epfl.ch/getfile.py?recid=34049&mode=best | title = Chromatic Adaptation Performance of Different RGB Sensors | author = Sabine Süsstrunk, Jack Holm, and Graham D. Finlayson | journal = IS&T/SPIE Electronic Imaging | volume = 4300|date=January 2001 }}</ref>
| |
| | |
| ===General illuminant adaptation===
| |
| The best color matrix for adapting to a change in illuminant is not necessarily a diagonal matrix in a fixed color space. It has long been known that if the space of illuminants can be described as a linear model with ''N'' basis terms, the proper color transformation will be the weighted sum of ''N'' fixed linear transformations, not necessarily consistently diagonalizable.<ref>{{Cite book| author = Laurence T. Maloney and Brain A. Wandell | chapter = Color constancy: a method for recovering surface spectral reflectance | title = Readings in Computer Vision | editor = Martin A. Fischler and Oscar Firschein | year = 1987 | publisher = Morgan-Kaufmann | isbn = 0-934613-33-8 | url = http://books.google.com/?id=W5hLHUI8U-kC&pg=PA293&dq=maloney+wandell }}</ref>
| |
| | |
| ==See also==
| |
| * [[Color cast]]
| |
| * [[Color temperature]]
| |
| * [[Gamma correction]]
| |
| * [[White point]]
| |
| | |
| ==References==
| |
| {{reflist|35em}}
| |
| | |
| ==External links==
| |
| * [http://www.nikondigital.org/articles/white_balance.htm White Balance] - Intro at nikondigital.org
| |
| * [http://www.photoxels.com/tutorial_white-balance.html Understanding White Balance] - Tutorial
| |
| * [http://www.ipol.im/pub/algo/lmps_simplest_color_balance/ Affine color balance with saturation, with code and on-line demonstration]
| |
| | |
| {{DEFAULTSORT:Color Balance}}
| |
| [[Category:Color]]
| |
| [[Category:Image processing]]
| |