GoPiGo 小汽車︰格點圖像算術《色彩空間》標準化‧想像實驗【五】

為什麼自然創造眼睛?眼睛產生色覺??答以達爾文『物競天擇』之進化結果,似乎難窮其妙!

150px-Origin_of_Species_title_page

《物種起源》

200px-Darwin_divergence

生命之樹

Editorial_cartoon_depicting_Charles_Darwin_as_an_ape_(1871)

人類與猿類具有共同祖先?!

300px-CollapsedtreeLabels-simplified.svg

系統發生樹

ON
THE ORIGIN OF SPECIES
BY MEANS OF NATURAL SELECTION,
OR THE
PRESERVATION OF FAVOURED RACES IN THE STRUGGLE
FOR LIFE.
By CHARLES DARWIN, M.A.,
FELLOW OF THE ROYAL, GEOLOGICAL, LINNÆAN, ETC., SOCIETIES;
AUTHOR OF ‘JOURNAL OF RESEARCHES DURING H. M. S. BEAGLE’S VOYAGE
ROUND THE WORLD.’
LONDON:
JOHN MURRAY, ALBEMARLE STREET.
1859.
The right of Translation is reserved.

英國大名鼎鼎的博物學家與生物學家查爾斯‧羅伯特‧達爾文 Charles Robert Darwin 自《小獵犬號航行之旅》一書成為著名作家。一九五九年出版的《物種起源》── 源於共同祖先的演化 ──,奠定了對自然界之多樣性由來的重要科學解釋。之後達爾文在《人類與動物的情感表達》以及《人類由來與性擇》中,闡釋人類的演化與性選擇的作用。他的一生可說是善於觀察與發想者的了吧。

如果將『人造物』的改變,對比於『大自然設計』之『穩定性』與『適應性』之演化。也許可以比擬為『改善』── 漸變之法 ── 和『創新』── 突變之則 ── 之設計工法的實踐。

─── 摘自《當真電源惹的禍??《中》

 

如果知道『似魚非魚的文昌魚』竟是脊椎動物之遠祖,生命演化的活化石!達爾文的眼睛竟能從之進化而來,豈不讚嘆宇宙之神奇!更別說乾坤造化『色覺』乎??!!設想眼睛若『分光儀』一般,能見『光譜』 I(\lambda, \vec{r}, t) ,那麼物體上之任一點 \vec{r} 的『入眼光譜』將因周遭『光源』變化,時時 t 變動不居,如是要如何『簡易區分』

【生】

 

【熟】

 

香蕉哩!怕猴子吃香蕉也難耶!!??

所以『不同光譜』對映『相同色彩』是天地利生之舉也!縱然恐有『閃閃發亮的不必鑽石,光芒萬丈者未必真金』之失矣◎

就讓我們瞧瞧 W. David Wright 和 John Guild 所用『光譜色』吧︰

pi@raspberrypi:~ $ ipython3 --pylab
Python 3.4.2 (default, Oct 19 2014, 13:31:11) 
Type "copyright", "credits" or "license" for more information.

IPython 2.3.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
Using matplotlib backend: TkAgg

In [1]: import colorpy.ciexyz

In [2]: import colorpy.colormodels

In [3]: import colorpy.misc

In [4]: Wright_Guild_紅光 = 700

In [5]: Wright_Guild_綠光 = 546.1

In [6]: Wright_Guild_藍光 = 435.8

In [7]: 紅光譜色xyz值 = colorpy.ciexyz.xyz_from_wavelength(Wright_Guild_紅光)

In [8]: 紅光譜色xyz值
Out[8]: array([ 0.03083035,  0.0111334 ,  0.        ])

In [9]: 明度歸一紅光譜色xyz值 = colorpy.colormodels.xyz_normalize_Y1(紅光譜色xyz值)

In [10]: 明度歸一紅光譜色xyz值
Out[10]: array([ 2.76917601,  1.        ,  0.        ])

In [11]: sRGB可顯示紅光譜色字串 = colorpy.colormodels.irgb_string_from_xyz(明度歸一紅光譜色xyz值) 
In [12]: sRGB可顯示紅光譜色字串
Out[12]: '#FF0056'

In [13]: 綠光譜色xyz值 = colorpy.ciexyz.xyz_from_wavelength(Wright_Guild_綠光)

In [14]: 綠光譜色xyz值
Out[14]: array([ 1.01926669,  2.67186719,  0.03313068])

In [15]: 明度歸一綠光譜色xyz值 = colorpy.colormodels.xyz_normalize_Y1(綠光譜色xyz值)

In [16]: 明度歸一綠光譜色xyz值
Out[16]: array([ 0.38148104,  1.        ,  0.01239982])

In [17]: sRGB可顯示綠光譜色字串 = colorpy.colormodels.irgb_string_from_xyz(明度歸一綠光譜色xyz值) 
In [18]: sRGB可顯示綠光譜色字串
Out[18]: '#00FF4E'

In [19]: 藍光譜色xyz值 = colorpy.ciexyz.xyz_from_wavelength(Wright_Guild_藍光)

In [20]: 藍光譜色xyz值
Out[20]: array([ 0.90429998,  0.04824082,  4.47755971])

In [21]: 明度歸一藍光譜色xyz值 = colorpy.colormodels.xyz_normalize_Y1(藍光譜色xyz值)

In [22]: 明度歸一藍光譜色xyz值
Out[22]: array([ 18.74553502,   1.        ,  92.81682432])

In [23]: sRGB可顯示藍光譜色字串 = colorpy.colormodels.irgb_string_from_xyz(明度歸一藍光譜色xyz值) 
In [24]: sRGB可顯示藍光譜色字串
Out[24]: '#8300FF'

In [25]: 紅綠藍光譜三原色 = [sRGB可顯示紅光譜色字串, sRGB可顯示綠光譜色字串, sRGB可顯示藍光譜色字串]

In [26]: 紅綠藍光譜波長 = ['700 nm', '546.1 nm', '435.8 nm']

In [27]: colorpy.misc.colorstring_patch_plot (紅綠藍光譜三原色, 紅綠藍光譜波長, 'CIERGB', 'ciergb', num_across=3)
Saving plot ciergb

In [28]: 

 

 

想像『新鮮』看得見嗎?!

※如果『色彩變化』,定然『光譜變化』?某種物理改變化學反應發生了!

『月下』相片可以轉成『日中』照片嘛!?

Color rendering index

A color rendering index (CRI) is a quantitative measure of the ability of a light source to reveal the colors of various objects faithfully in comparison with an ideal or natural light source. Light sources with a high CRI are desirable in color-critical applications such as neonatal care, photography and cinematography.[1] It is defined by the International Commission on Illumination (CIE) as follows:[2]

Color rendering: Effect of an illuminant on the color appearance of objects by conscious or subconscious comparison with their color appearance under a reference illuminant

The CRI of a light source does not indicate the apparent color of the light source; that information is under the rubric of the correlated color temperature (CCT). The CRI is determined by the light source’s spectrum. The pictures on the right show the continuous spectrum of an incandescent lamp and the discrete line spectrum of a fluorescent lamp; the former lamp has the higher CRI.

The value often quoted as ‘CRI’ on commercially available lighting products is properly called the CIE Ra value, ‘CRI’ being a general term and CIE Ra being the international standard color rendering index.

Numerically, the highest possible CIE Ra value is 100, and would only be given to a source identical to standardized daylight or a black body (incandescent lamps are effectively black bodies), dropping to negative values for some light sources. Low-pressure sodium lighting has negative CRI; fluorescent lights range from about 50 for the basic types, up to about 98 for the best multi-phosphor type. Typical LEDs have about 80+ CRI, while some manufacturers claim that their LEDs have achieved up to 98 CRI.[3]

CIE Ra‘s ability to predict color appearance has been criticized in favor of measures based on color appearance models, such as CIECAM02 and, for daylight simulators, the CIE Metamerism Index.[4] CRI is not a good indicator for use in visual assessment, especially for sources below 5000 kelvin (K).[5][6] A newer version of the CRI, R96, has been developed, but it has not replaced the better-known Ra general color rendering index.[7]

Emitted light spectrum determines the CRI of the lamp.

 

跨步向前走進

Lab color space

The Lab color space describes mathematically all perceivable colors in the three dimensions L for lightness and a and b for the color opponents green–red and blue–yellow. The terminology “Lab” originates from the Hunter 1948 color space.[1][2]Nowadays “Lab” is frequently mis-used as abbreviation for CIEL*a*b* 1976 color space (also CIELAB); the asterisks/stars distinguish the CIE version from Hunter’s original version. The difference from the Hunter Lab coordinates is that the CIELAB coordinates are created by a cube root transformation of the CIE XYZ color data, while the Hunter Lab coordinates are the result of a square root transformation. Other, less common examples of color spaces with Lab representations make use of the CIE 1994 color difference and the CIE 2000 color difference.

The Lab color space exceeds the gamuts of the RGB and CMYK color models (for example, ProPhoto RGB includes about 90% all perceivable colors). One of the most important attributes of the Lab model is device independence. This means that the colors are defined independent of their nature of creation or the device they are displayed on. The Lab color space is used when graphics for print have to be converted from RGB to CMYK, as the Lab gamut includes both the RGB and CMYK gamut. Also it is used as an interchange format between different devices as for its device independency. The space itself is a three-dimensional real number space, that contains an infinite number of possible representations of colors. However, in practice, the space is usually mapped onto a three-dimensional integer space for device-independent digital representation, and for these reasons, the L*, a*, and b* values are usually absolute, with a pre-defined range. The lightness, L*, represents the darkest black at L* = 0, and the brightest white at L* = 100. The color channels, a* and b*, will represent true neutral gray values at a* = 0 and b* = 0. The red/green opponent colors are represented along the a* axis, with green at negative a* values and red at positive a* values. The yellow/blue opponent colors are represented along the b* axis, with blue at negative b* values and yellow at positive b* values. The scaling and limits of the a* and b* axes will depend on the specific implementation of Lab color, as described below, but they often run in the range of ±100 or −128 to +127 (signed 8-bit integer).

Both the Hunter and the 1976 CIELAB color spaces were derived from the prior “master” space CIE 1931 XYZ color space, which can predict which spectral power distributions will be perceived as the same color (see metamerism), but which is not particularly perceptually uniform.[3] Strongly influenced by the Munsell color system, the intention of both “Lab” color spaces is to create a space that can be computed via simple formulas from the XYZ space but is more perceptually uniform than XYZ.[4] Perceptually uniform means that a change of the same amount in a color value should produce a change of about the same visual importance. When storing colors in limited precision values, this can improve the reproduction of tones. Both Lab spaces are relative to the white point of the XYZ data they were converted from. Lab values do not define absolute colors unless the white point is also specified. Often, in practice, the white point is assumed to follow a standard and is not explicitly stated (e.g., for “absolute colorimetric” rendering intent, the International Color Consortium L*a*b* values are relative to CIE standard illuminant D50, while they are relative to the unprinted substrate for other rendering intents).[5]

The lightness correlate in CIELAB is calculated using the cube root of the relative luminance.

The CIE 1976 (L*, a*, b*) color space (CIELAB), showing only colors that fit within the sRGB gamut (and can therefore be displayed on a typical computer display). Each axis of each square ranges from −128 to 128.

Advantages

 An example of color enhancement using LAB color mode in Photoshop. The left side of the photo is enhanced, while the right side is normal.

Unlike the RGB and CMYK color models, Lab color is designed to approximate human vision. It aspires to perceptual uniformity, and its L component closely matches human perception of lightness, although it does not take the Helmholtz–Kohlrausch effect into account. Thus, it can be used to make accurate color balance corrections by modifying output curves in the a and b components, or to adjust the lightness contrast using the L component. In RGB or CMYK spaces, which model the output of physical devices rather than human visual perception, these transformations can be done only with the help of appropriate blend modes in the editing application.

Because the Lab space is larger than the gamut of computer displays and printers and because the visual stepwidths are relatively different to the color area, a bitmap image represented as Lab requires more data per pixel to obtain the same precision as an RGB or CMYK bitmap. In the 1990s, when computer hardware and software were limited to storing and manipulating mostly 8-bit/channel bitmaps, converting an RGB image to Lab and back was a very lossy operation. With 16-bit/channel and floating-point support now common, the loss due to quantization is negligible.

Copyright and license-free: as it is fully mathematically defined, the CIELAB model is public domain, it is in all respects freely usable and integrable (also systematic Lab / HLC color value tables).

A big portion of the Lab coordinate space cannot be generated by spectral distributions, it therefore falls outside the human vision and such Lab values are not “colors”.

 

,一探究竟呦☆