GoPiGo 小汽車︰格點圖像算術《色彩空間》灰階‧丁

物體『顏色』隨著周遭『照明光譜』而變,假使談『色彩』不定義在什麼『發光體』

Standard illuminant

A standard illuminant is a theoretical source of visible light with a profile (its spectral power distribution) which is published. Standard illuminants provide a basis for comparing images or colors recorded under different lighting.

 
 Relative spectral power distributions (SPDs) of CIE illuminants A, B, and C from 380 nm to 780 nm.

CIE illuminants

The International Commission on Illumination (usually abbreviated CIE for its French name) is the body responsible for publishing all of the well-known standard illuminants. Each of these is known by a letter or by a letter-number combination.

Illuminants A, B, and C were introduced in 1931, with the intention of respectively representing average incandescent light, direct sunlight, and average daylight. Illuminants D represent phases of daylight, Illuminant E is the equal-energy illuminant, while Illuminants F represent fluorescent lamps of various composition.

There are instructions on how to experimentally produce light sources (“standard sources”) corresponding to the older illuminants. For the relatively newer ones (such as series D), experimenters are left to measure to profiles of their sources and compare them to the published spectra:[1]

At present no artificial source is recommended to realize CIE standard illuminant D65 or any other illuminant D of different CCT. It is hoped that new developments in light sources and filters will eventually offer sufficient basis for a CIE recommendation.

— CIE, Technical Report (2004) Colorimetry, 3rd ed., Publication 15:2004, CIE Central Bureau, Vienna

Nevertheless, they do provide a measure, called the Metamerism Index, to assess the quality of daylight simulators.[2][3] The Metamerism Index tests how well five sets of metameric samples match under the test and reference illuminant. In a manner similar to the color rendering index, the average difference between the metamers is calculated.[4]

 

下之所見,恐生爭議不知所云也。舉例來說『白物』不在『白光』裡,果真是『白色』的嗎?沒有所謂『物理白』,『白物』實隨『日光白』!且借 ColorPy 之『D65 sRGB』預設的『色彩空間』,看看到底 □□ 『白是不白』?!

illuminants.py

illuminants.py - Definitions of some standard illuminants.

Description:
Illuminants are spectrums, normalized so that Y = 1.0.
Spectrums are 2D numpy arrays, with one row for each wavelength, with the first column holding the wavelength in nm, and the second column the intensity.

The spectrums have a wavelength increment of 1 nm.

Functions:
init () -
Initialize CIE Illuminant D65. This runs on module startup.

get_illuminant_D65 () -
Get CIE Illuminant D65, as a spectrum, normalized to Y = 1.0. CIE standard illuminant D65 represents a phase of natural daylight with a correlated color temperature of approximately 6504 K. (Wyszecki, p. 144)

In the interest of standardization the CIE recommends that D65 be used whenever possible. Otherwise, D55 or D75 are recommended. (Wyszecki, p. 145)

(ColorPy does not currently provide D55 or D75, however.)

get_illuminant_A () -
Get CIE Illuminant A, as a spectrum, normalized to Y = 1.0. This is actually a blackbody illuminant for T = 2856 K. (Wyszecki, p. 143)

get_blackbody_illuminant (T_K) -
Get the spectrum of a blackbody at the given temperature, normalized to Y = 1.0.

get_constant_illuminant () -
Get an illuminant, with spectrum constant over wavelength, normalized to Y = 1.0.

scale_illuminant (illuminant, scaling) -

Scale the illuminant intensity by the specfied factor.

 

【D65 光源】

 

【CIE A 光源】

 

【均等強度可見光輻射光源】

 

【5778 K 黑體輻射光源】

 

【如果太陽是 6500K 黑體】

 

若從『眼見』觀點來看,『白色』是『明度』最高之『無色彩』。

※ 註

明度英語:Brightness)指顏色的亮度,不同的顏色具有不同的明度,例如黃色就比藍色的明度高,在一個畫面中如何安排不同明度的色塊也可以幫助表達畫作的感情,如果天空比地面明度低,就會產生壓抑的感覺。

術語

「明度」(Brightness)原來用做光度測定術語照度和(錯誤的)用於輻射測定術語輻射度的同義詞。按美國聯邦通信術語表(美國聯邦標準1037C,FS-1037C)的規定,明度現在只應用於非定量的提及對光的生理感覺和感知。[1]

一個給定目標亮度在不同的場景中可以引起不同的明度感覺;比如White錯覺Wertheimer-Benary錯覺(Wertheimer-Benary effect)。

RGB色彩空間中,明度可以被認為是R(紅色),G(綠色)和B(藍色)座標的算術平均μ(儘管這三個成分中的某個要比其他看起來更明亮,但這可以被某些顯示系統自動補償):

\mu ={R+G+B \over 3}

明度也是HSB或HSV色彩空間色相飽和度和明度)中的顏色坐標,它的值是這個顏色的RGB三者中的極大值。

……

光度學

光度學是研究強弱的學科。不同於輻射度量學,光度學把不同波長的輻射功率用光度函數加權。

人眼與光度學

 黑色曲線為亮適應光度函數曲線,綠色曲線為暗適應光度函數曲線。實線為CIE 1931標準。斷續線為1978年修正數據。點線為2005年修正數據。橫坐標單位為nm。

人眼能相當精確地判斷兩種顏色的光亮暗感覺是否相同。所以為了確定眼睛的光譜響應,可將各種波長的光引起亮暗感覺所需的輻射通量進行比較。在較明亮環境中人的視覺對波長為555.016nm的綠色光最為敏感。設任意波長為  \lambda 的光和波長為555.016nm的光產生同樣亮暗感覺所需的輻射通量分別為 \Psi _{{555.016}} \Psi _{{\lambda }},把後者和前者之比

  V(\lambda )={\frac {\Psi _{{555.016}}}{\Psi _{{\lambda }}}}

叫做光度函數(luminosity function)或視見函數(visual sensitivity function)。例如,實驗表明,1mW的555.0nm綠光與2.5W的400.0nm紫光引起的亮暗感覺相同。於是在400.0nm的光度函數值為

V(400.0nm)={\frac {10^{{-3}}}{2.5}}=0.0004.

衡量光通量的大小,要以光度函數為權重把輻射通量折合成對人眼的有效數量。對波長為  \lambda 的光,輻射強度為  \psi (\lambda ),光通量為  \Phi _{v},則有

\Phi _{v}=K_{{max}}\int V(\lambda )\psi (\lambda )d\lambda

式中  K_{{max}}是波長為555.016nm的光功當量,也叫做最大光功當量,其值為683 lm/W。

───

 

因是以『白點』為參考之『白光方程式』

1 \cdot \vec{R} + 1 \cdot \vec{G} + 1 \cdot \vec{B} = \vec{W}

實質確定了『所選擇』最大『強度』之『紅』 \vec{R} 、『綠』 \vec{G} 、『藍』 \vec{B} 的哩◎

因此『向量空間』之『線性組合』

r \cdot \vec{R} + g \cdot \vec{G} + b \cdot \vec{B}

定義了一個 (r, g, b) 『色彩空間』乎??這些 r, g, b 之所以在 [ 0, 1 ] 區間內『取值』,表達『相對最大』之『百分比』耶!!

Numeric representations

 A typical RGB color selector in graphic software. Each slider ranges from 0 to 255.

 Hexadecimal 8-bit RGB representations of the main 125 colors

A color in the RGB color model is described by indicating how much of each of the red, green, and blue is included. The color is expressed as an RGB triplet (r,g,b), each component of which can vary from zero to a defined maximum value. If all the components are at zero the result is black; if all are at maximum, the result is the brightest representable white.

These ranges may be quantified in several different ways:

  • From 0 to 1, with any fractional value in between. This representation is used in theoretical analyses, and in systems that use floating point representations.
  • Each color component value can also be written as a percentage, from 0% to 100%.
  • In computers, the component values are often stored as integer numbers in the range 0 to 255, the range that a single 8-bit byte can offer. These are often represented as either decimal or hexadecimal numbers.
  • High-end digital image equipment are often able to deal with larger integer ranges for each primary color, such as 0..1023 (10 bits), 0..65535 (16 bits) or even larger, by extending the 24-bits (three 8-bit values) to 32-bit, 48-bit, or 64-bit units (more or less independent from the particular computer’s word size).

For example, brightest saturated red is written in the different RGB notations as:

Notation RGB triplet
Arithmetic (1.0, 0.0, 0.0)
Percentage (100%, 0%, 0%)
Digital 8-bit per channel (255, 0, 0) or sometimes
#FF0000 (hexadecimal)
Digital 16-bit per channel (65535, 0, 0)

In many environments, the component values within the ranges are not managed as linear (that is, the numbers are nonlinearly related to the intensities that they represent), as in digital cameras and TV broadcasting and receiving due to gamma correction, for example.[15] Linear and nonlinear transformations are often dealt with via digital image processing. Representations with only 8 bits per component are considered sufficient if gamma encoding is used.[16]

Following is the mathematical relationship between RGB space to HSI space (hue, saturation, and intensity: HSI color space):

{\displaystyle {\begin{aligned}I&={\frac {R+G+B}{3}}\\S&=1\,-\,{\frac {3}{(R+G+B)}}\,\min(R,G,B)\\H&=\cos ^{-1}\left({\frac {{\frac {1}{2}}((R-G)+(R-B))}{(R-G)^{2}+(R-B)(G-B)}}\right)^{\frac {1}{2}}\end{aligned}}}

Color depth

The RGB color model is one of the most common ways to encode color in computing, and several different binary digital representations are in use. The main characteristic of all of them is the quantization of the possible values per component (technically a Sample (signal) ) by using only integer numbers within some range, usually from 0 to some power of two minus one (2n – 1) to fit them into some bit groupings. Encodings of 1, 2, 4, 5, 8 and 16 bits per color are commonly found; the total number of bits used for an RGB color is typically called the color depth.

Geometric representation

 

The RGB color model mapped to a cube. The horizontal x-axis as red values increasing to the left, y-axis as blue increasing to the lower right and the vertical z-axis as green increasing towards the top. The origin, black is the vertex hidden from view.

See also RGB color space

Since colors are usually defined by three components, not only in the RGB model, but also in other color models such as CIELAB and Y’UV, among others, then a three-dimensional volume is described by treating the component values as ordinary cartesian coordinates in a euclidean space. For the RGB model, this is represented by a cube using non-negative values within a 0–1 range, assigning black to the origin at the vertex (0, 0, 0), and with increasing intensity values running along the three axes up to white at the vertex (1, 1, 1), diagonally opposite black.

An RGB triplet (r,g,b) represents the three-dimensional coordinate of the point of the given color within the cube or its faces or along its edges. This approach allows computations of the color similarity of two given RGB colors by simply calculating the distance between them: the shorter the distance, the higher the similarity. Out-of-gamut computations can also be performed this way.