{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# !!! D . R . A . F . T !!!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Luminance" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The [Luminance](http://en.wikipedia.org/wiki/Luminance) $L_v$ is the quantity defined by the formula: [1]\n", "\n", "$$\n", "\$$\n", "L_v=\\cfrac{d\\Phi_v}{dAcos\\theta d\\Omega}\n", "\$$\n", "$$\n", "\n", "where $d\\Phi_v$ is the [luminous flux](http://en.wikipedia.org/wiki/Luminous_flux) transmitted by an elementary beam passing through the given point and propagating in the solid angle, $d\\Omega$, containing the given direction. $dA$ is the area of a section of that beam containing the given point. $\\theta$ is the angle between the normal to that section and the direction of the beam.\n", "\n", "$L_v$ unit is candela per square metre (or nits) $cd\\cdot m^{-2}=lm\\cdot m^{-2}\\cdot sr^{-1}$.\n", "\n", "[Colour](https://github.com/colour-science/colour/) defines the following *luminance* computation methods:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "['ASTM D1535',\n", " 'CIE 1976',\n", " 'Fairchild 2010',\n", " 'Fairchild 2011',\n", " 'Newhall 1943',\n", " 'astm2008',\n", " 'cie1976']" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import colour\n", "\n", "sorted(colour.LUMINANCE_METHODS.keys())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "> Note: 'astm2008' and 'cie1976' are convenient aliases for respectively 'ASTM D1535' and 'CIE 1976'." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Newhall, Nickerson, and Judd (1943) Method" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Newhall, Nickerson, and Judd (1943) fitted a quintic-parabola function to the adjusted *Munsell-Sloan-Godlove* reflectances, the resulting equation computing *luminance* $R_Y$ as function of *Munsell* value $V$ is expressed as follows: [2]\n", "\n", "$$\n", "\$$\n", "R_Y=1.2219V-0.23111V^2+0.23951V^3-0.021009V^4+0.0008404V^5\n", "\$$\n", "$$\n", "\n", "> See Also: The [Munsell Renotation System](../notation/munsell.ipynb) notebook for in-depth information about the *Munsell Renotation System*.\n", "\n", "The colour.luminance_Newhall1943 definition is used to compute *luminance* $R_Y$:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10.408987457743208" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.colorimetry.luminance_Newhall1943(3.74629715382)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "> Note: Input *Munsell* value $V$ is in domain [0, 10], output *luminance* $R_Y$ is in domain [0, 100].\n", "\n", "The colour.luminance definition is implemented as a wrapper for various luminance computation methods:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.43750976730517127" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.colorimetry.luminance(3.74629715382, method='Newhall 1943')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## ASTM D1535-08$^{\\epsilon 1}$ (2008) Method" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Since 1943, the reference white used for the *Munsell Renotation System* has changed.\n", "\n", "As a result the quintic-parabola function from Newhall, Nickerson, and Judd (1943) has been adjusted: Each coefficient of the function has been multiplied by 0.975, the reflectance factor of magnesium oxide with respect to the perfect reflecting diffuser and then rounded to five digits.\n", "\n", "The updated equation for computing *luminance* $Y$ as function of the *Munsell* value $V$ is expressed as follows: [3]\n", "\n", "$$\n", "\$$\n", "Y=1.1914V-0.22533V^2+0.23352V^3-0.020484V^4+0.00081939V^5\n", "\$$\n", "$$\n", "\n", "> See Also: The [Munsell Renotation System](../notation/munsell.ipynb) notebook for in-depth information about the *Munsell Renotation System*.\n", "\n", "The colour.luminance_ASTMD153508 definition is used to compute *luminance* $Y$:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/kelsolaar/Documents/Development/colour-science/colour/colour/utilities/verbose.py:235: ColourUsageWarning: \"colour.colorimetry.luminance_ASTMD153508\" object has been renamed to \"colour.colorimetry.luminance_ASTMD1535\".\n", " warn(*args, **kwargs)\n" ] }, { "data": { "text/plain": [ "10.148809678226682" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.colorimetry.luminance_ASTMD153508(3.74629715382)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "> Note: Input *Munsell* value $V$ is in domain [0, 10], output *luminance* $Y$ is in domain [0, 100].\n", "\n", "Using the colour.luminance wrapper definition:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.42659001108260142" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.luminance(3.74629715382, method='ASTM D1535')" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.42659001108260142" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.luminance(3.74629715382, method='astm2008')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## CIE 1976 Method" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The *CIE $L^*a^*b^*$* approximately uniform colourspace defined in 1976 computes the *luminance* $Y$ quantity as follows: [4]\n", "\n", "$$\n", "\$$\n", "Y=\\begin{cases}Y_n*\\biggl(\\cfrac{L^*+16}{116}\\biggr)^3 & for\\ L^*>\\kappa*\\epsilon\\\\\n", "Y_n*\\biggl(\\cfrac{L^*}{\\kappa}\\biggr) & for\\ L^*<=\\kappa*\\epsilon\n", "\\end{cases}\n", "\$$\n", "$$\n", "where $Y_n$ is the reference white *luminance*.\n", "with\n", "\n", "\\n", "\\begin{aligned}\n", "\\epsilon&\\ =\\begin{cases}0.008856 & Actual\\ CIE\\ Standard\\\\\n", "216\\ /\\ 24389 & Intent\\ of\\ the\\ CIE\\ Standard\n", "\\end{cases}\\\\\n", "\\kappa&\\ =\\begin{cases}903.3 & Actual\\ CIE\\ Standard\\\\\n", "24389\\ /\\ 27 & Intent\\ of\\ the\\ CIE\\ Standard\n", "\\end{cases}\n", "\\end{aligned}\n", "\\n", "\n", "\n", "The original $\\epsilon$ and $\\kappa$ constants values have been shown to exhibit discontinuity at the junction point of the two functions grafted together to create the *Lightness* $L^*$ function. [5]\n", "\n", "[Colour](https://github.com/colour-science/colour/) uses the rational values instead of the decimal values for these constants.\n", "\n", "> See Also: The [CIE $L^*a^*b^*$ Colourspace](../models/cie_lab.ipynb) notebook for in-depth information about the *CIE $L^*a^*b^*$* colourspace.\n", "\n", "The colour.luminance_CIE1976 definition is used to compute *Luminance* $Y$:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10.080000000026304" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.colorimetry.luminance_CIE1976(37.9856290977)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "> Note: Input *Lightness* $L^*$ and and $Y_n$ are in domain [0, 100], output *luminance* $Y$ is in domain [0, 100].\n", "\n", "Using the colour.luminance wrapper definition:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10.080000000026304" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.luminance(37.9856290977, method='CIE 1976')" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10.080000000026304" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.luminance(37.9856290977, method='cie1976')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fairchild and Wyble (2010) Method" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.10079999999999999" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.colorimetry.luminance_Fairchild2010(24.902290269546651, 1.836)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10.079999999999998" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.luminance(24.902290269546651, method='Fairchild 2010', epsilon=1.836)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Fairchild and Chen (2011) Method" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.10079999999999999" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.colorimetry.luminance_Fairchild2011(26.459509817572265, 0.710)" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "10.079999999999998" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "colour.luminance(26.459509817572265, method='Fairchild 2011', epsilon=0.710)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Bibliography" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. ^ CIE. (n.d.). 17-711 luminance (in a given direction, at a given point of a real or imaginary surface) [Lv; L]. Retrieved July 09, 2014, from http://eilv.cie.co.at/term/711\n", "2. ^ Newhall, S. M., Nickerson, D., & Judd, D. B. (1943). Final report of the OSA subcommittee on the spacing of the munsell colors. JOSA, 33(7), 385. doi:10.1364/JOSA.33.000385\n", "3. ^ ASTM International. (n.d.). ASTM D1535-08e1 Standard Practice for Specifying Color by the Munsell System. doi:10.1520/D1535-08E01\n", "4. ^ Wyszecki, G., & Stiles, W. S. (2000). CIE 1976 (L*u*v*)-Space and Color-Difference Formula. In *Color Science: Concepts and Methods, Quantitative Data and Formulae* (p. 167). Wiley. ISBN:978-0471399186\n", "5. ^ Lindbloom, B. (2003). A Continuity Study of the CIE L* Function. Retrieved February 24, 2014, from http://brucelindbloom.com/LContinuity.html" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 1 }