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

想像如果有一天未來的人類必須由僅存的『古代文獻』?

CIE XYZ色彩空間定義

實驗結果— CIE RGB色彩空間

CIE RGB色彩空間是RGB色彩空間之一,以單色(單一波長)原色的特定集合著稱。

在1920年代,W. David Wright(Wright 1928)和John Guild(Guild 1931)獨立進行了一系列人類視覺實驗,提供了CIE XYZ色彩空間規定的基礎。

CIE RGB原色的色域和原色在CIE 1931 xy色度圖上的位置。

實驗使用2度視角的圓形螢幕。螢幕的一半投影上測試顏色,另一半投影上觀察者可調整的顏色。可調整的顏色是三種原色的混合,它們每個都有固定的色度,但有可調整的明度。

觀察者改變三種原色光的明度直到觀察到混合的顏色匹配了測試顏色。不是所有顏色都可使用這種技術匹配。當沒有匹配的時候,可變數量的一種原色被增加 到測試顏色上,用餘下兩種原色混合與它匹配。對於這種情況,增加到測試顏色上原色的數量被認為是負值。通過這種方式,可以覆蓋完整的人類顏色感知。當測試 顏色是單色的時候,可以把使用的每種原色的數量繪製為測試顏色的波長的函數。這三個函數叫做這個特定實驗的「顏色匹配函數」。

CIE 1931 RGB顏色匹配函數。顏色匹配函數是匹配水平刻度標示的波長的單色測試顏色所需要的原色數量。

儘管Wright和Guild的實驗使用了各種強度的各種原色,和一些不同的觀察者,所有他們的結果都被總結為標準CIE RGB顏色匹配函數  \overline{r}(\lambda) \overline{g}(\lambda) \overline{b}(\lambda),它們是通過使用標準波長為700 nm(紅色 )、546.1 nm(綠色)和435.8 nm(藍色)的三種單色原色獲得的。顏色匹配函數是匹配單色測驗顏色所需要的原色的數量。這些函數展示於右側的(CIE 1931)繪圖中。注意  \overline{r}(\lambda)  \overline{g}(\lambda)在435.8nm處為零,  \overline{r}(\lambda)  \overline{b}(\lambda)在546.1nm處為零,而  \overline{g}(\lambda) \overline{b}(\lambda)在700 nm處為零,因為在這些情況下測試顏色是原色之一。選擇波長546.1 nm和435.8 nm的原色是因為它們是容易再生的水銀蒸氣放電的色線。1931年選擇的700 nm波長難於再生為單色光束,選擇它是因為眼睛的顏色感知在這個波長相當不變化,所以在這個原色波長上的小誤差將對結果有很小的影響。

經過CIE的特別委員會的深思熟慮之後確定了顏色匹配函數和原色(Fairman 1997)。在圖的短波和長波的側的取捨點某種程度上是隨意選擇的;人類眼睛實際上能看到波長直到810 nm的光,但是敏感度要數千倍低於綠色光。定義的這些顏色匹配函數叫做「1931 CIE標準觀察者」。注意勝過指定每種原色的明度,這種曲線通常規範化為在其下有固定的面積。這個面積按如下規定而固定為特定值

   \int_0^\infty \overline{r}(\lambda)\,d\lambda= \int_0^\infty \overline{g}(\lambda)\,d\lambda= \int_0^\infty \overline{b}(\lambda)\,d\lambda

結果的規範化顏色匹配函數經常對源照度按r:g:b比率1:4.5907:0.0601縮放、和為源輻射功率按比率72.0962:1.3791:1縮放來重新生成真正的顏色匹配函數。通過提議標準化原色,CIE建立了客觀顏色表示法的一個國際系統。

給定這些縮放了顏色匹配函數,帶有頻譜功率分布  I(\lambda)的一個顏色的RGB 三色刺激值給出為:

R= \int_0^\infty I(\lambda)\,\overline{r}(\lambda)\,d\lambda
G= \int_0^\infty I(\lambda)\,\overline{g}(\lambda)\,d\lambda
B= \int_0^\infty I(\lambda)\,\overline{b}(\lambda)\,d\lambda

這些都是內積,並可以被認為是無限維頻譜到三維顏色的投影。

格拉斯曼定律

你可能會問:「為什麼可以使用不同原色和它們的不同實際使用強度來總結Wright和Guild的結果?」還可能問:「要匹配的測試顏色不是單色會怎樣?」。對這兩個問題的答案在於人類色彩感知的(幾乎)線性。這種線性被表達為格拉斯曼定律

CIE RGB空間可以被用來以常規方式定義色度:色度坐標是rg:

r= \frac{R}{R+G+B},
g= \frac{G}{R+G+B}.

從Wright–Guild數據構造CIE XYZ色彩空間

在使用CIE RGB顏色匹配函數開發了人類視覺的RGB模型之後,特殊委員會的成員希望開發出與CIE RGB色彩空間有關的另一個色彩空間。它假定Grassmann定律成立,這個新空間通過線性變換而有關於CIE RGB空間。新空間將以三個新顏色匹配函數來定義:  \overline{x}(\lambda)  \overline{y}(\lambda)  \overline{z}(\lambda)。帶有頻譜功率分布I(λ)的顏色的對應的XYZ 三色刺激值為給出為:

X= \int_0^\infty I(\lambda)\,\overline{x}(\lambda)\,d\lambda
Y= \int_0^\infty I(\lambda)\,\overline{y}(\lambda)\,d\lambda
Z= \int_0^\infty I(\lambda)\,\overline{z}(\lambda)\,d\lambda

選擇這個新色彩空間是因為它有如下性質:

  1. 新顏色匹配函數在所有地方都大於等於零。在1931年,計算是憑藉手工或滑尺進行的,正值的規定有用於計算簡化。
  2.   \overline{y}(\lambda)顏色匹配函數精確的等於「CIE標準適應光觀察者」(CIE 1926)的適應光發光效率函數V(λ)。它是描述感知明度對波長的變換的亮度函數。亮度函數可以構造為RGB顏色匹配函數的線性組合的事實是沒有任何方式來保證的,但是被認為幾乎是真實的,因為人類視覺的幾乎線性本質。還有,這個要求的主要原因是計算簡單。
  3. 對於恆定能量白點,要求為x = y = z = 1/3。
  4. 由於色度定義和要求xy為正值的優勢,可以在三角形[1,0],[0,0],[0,1]內見到所有顏色的色域。在實踐中必須把色域完全的充入這個空間中。
  5.   \overline{z}(\lambda)可以在650 nm處被設置為零而仍保持在實驗誤差範圍內。為了計算簡單規定可以這樣做。

在CIE rg色度圖中展示規定CIE XYZ色彩空間的三角形構造。三角形Cb-Cg-Cr就是在CIE xy色度空間中的xy=(0,0),(0,1),(1,0)三角形。連接Cb和Cr的直線是alychne。注意光譜軌跡通過rg=(0,0)於435.8 nm,通過rg=(0,1)於546.1 nm,通過rg=(1,0)於700 nm。還有,均等能量點(E)位於rg=xy=(1/3,1/3)。

 

用幾何術語說,選擇新色彩空間等於在rg色度空間中選擇一個新三角形。在右側的圖形中,rg色度坐標展示在兩個黑色軸上,還有1931標準觀察者的色域。展示為上述要求所確定的是紅色CIE xy色度軸。要求XYZ坐標非負意味著Cr, Cg, Cb形成的三角形必須包圍標準觀察者的整個色域。連接Cr和Cb的直線由  \overline{y}(\lambda)函數等於亮度函數的要求來確定,它叫做alychne。  \overline{z}(\lambda)函數在650 nm處為零的要求意味著連接Cg和Cr的直線必須是Kr區域內的色域的切線。這定義了點Cr的位置。均等能量點定義自x = y = 1/3的要求對連接Cb和Cg的直線做了限制,最後,色域充入空間的要求對此線作了第二個限制,它要非常靠近在綠色區域的色域,這規定了Cg和Cb的位置。上面描述的變換是從CIE RGB空間到XYZ空間的線性變換。CIE特殊委員會確定了標準變換如下:

380 nm到780 nm之間的(間隔5 nm)CIE 1931標準色度觀察者XYZ函數

 \begin{bmatrix}X\\Y\\Z\end{bmatrix}=\frac{1}{b_{21}} \begin{bmatrix} b_{11}&b_{12}&b_{13}\\ b_{21}&b_{22}&b_{23}\\ b_{31}&b_{32}&b_{33} \end{bmatrix} \begin{bmatrix}R\\G\\B\end{bmatrix}=\frac{1}{0.17697} \begin{bmatrix} 0.49&0.31&0.20\\ 0.17697&0.81240&0.01063\\ 0.00&0.01&0.99 \end{bmatrix} \begin{bmatrix}R\\G\\B\end{bmatrix}

要求3確定了XYZ顏色匹配函數的積分必須相等,可通過要求2確定的適應光發光效率函數的積分得到它。必須注意到制表的敏感度曲線有一定量的任意性在其中。單獨的XYZ敏感度曲線可以按合理的精度測量。但是整體的光度曲線(它事實上是這個三個曲線的加權和)是主觀的,因為它涉及到問測試人兩個光源是否有同樣的明度,即使它們是完全不同的顏色。同樣的,X、Y和Z的曲線的相對大小(magnitude)也是任意的。你也可以定義有兩倍幅值的X敏感度曲線的有效色彩空間。這個新色彩空間將有不同的形狀。CIE 1931和1964 XYZ色彩空間的敏感度曲線被縮放為有相同的曲線下面積。

 

重新建構今人『色彩空間』,方能破解新發掘之重要的圖像檔! !他們會怎麼作呢??

這個『無厘頭』的『問題』,果真是『無所說』乎??!!

若說『來者強於逝者』,當已能用『軟體模擬』及『數字實驗』耶!!??

故而只需靠『此刻假設』、『那時驗證』法,即可得其『真實』吧◎

 

Atomic Spectra


Neon spectrum
Argon
Hydrogen
Helium
Iodine
Nitrogen
Neon
Mercury
Sodium

This is an attempt to give a reasonable accurate picture of the appearance of the neon spectrum, but both the images are composite images. The image below is composed of segments of three photographs to make the yellow and green lines more visible along with the much brighter red lines. Then the image below was reduced and superimposed on the image above, because with the exposure reasonable for the bright tube, only the red lines were visible on the photograph.

Some of the visible lines of neon:

l nm
Color
540.1
green
585.2
yellow
588.2
yellow
603.0
orange
607.4
orange
616.4
orange
621.7
red-orange
626.6
red-orange
633.4
red
638.3
red
640.2
red
650.6
red
659.9
red
692.9
red
703.2
red
This is a section of the sign shown below, which has a central neon section and another gas mixture producing blue light around it. Such signs are excited by voltages of a few thousand volts produced by a transformer that raises the voltage of the ordinary AC line voltage.

Index
HyperPhysics***** Quantum Physics R Nave
Go Back

Atomic Spectra


Mercury spectrum
Argon
Hydrogen
Helium
Iodine
Nitrogen
Neon
Mercury
Sodium
At left is a mercury spectral tube excited by means of a 5000 volt transformer. At the right of the image are the spectral lines through a 600 line/mm diffraction grating.

The prominent mercury lines are at 435.835 nm (blue), 546.074 nm (green), and a pair at 576.959 nm and 579.065 nm (yellow-orange). There are two other blue lines at 404.656 nm and 407.781 nm and a weak line at 491.604 nm.

Hologram viewed wih mercury light
Index

Reference
Jenkins & White
Ch. 21

HyperPhysics***** Quantum Physics R Nave
Go Back

 

Diffraction grating

In optics, a diffraction grating is an optical component with a periodic structure, which splits and diffracts light into several beams travelling in different directions. The emerging coloration is a form of structural coloration.[1][2] The directions of these beams depend on the spacing of the grating and the wavelength of the light so that the grating acts as the dispersive element. Because of this, gratings are commonly used in monochromators and spectrometers.

For practical applications, gratings generally have ridges or rulings on their surface rather than dark lines. Such gratings can be either transmissive or reflective. Gratings which modulate the phase rather than the amplitude of the incident light are also produced, frequently using holography.[3]

The principles of diffraction gratings were discovered by James Gregory, about a year after Newton’s prism experiments, initially with items such as bird feathers.[4] The first man-made diffraction grating was made around 1785 by Philadelphia inventor David Rittenhouse, who strung hairs between two finely threaded screws.[5] This was similar to notable German physicist Joseph von Fraunhofer‘s wire diffraction grating in 1821.[6]

Diffraction can create “rainbow” colors when illuminated by a wide spectrum (e.g., continuous) light source. The sparkling effects from the closely spaced narrow tracks on optical storage disks such as CDs or DVDs are an example, while the similar rainbow effects caused by thin layers of oil (or gasoline, etc.) on water are not caused by a grating, but rather by interference effects in reflections from the closely spaced transmissive layers (see Examples, below). A grating has parallel lines, while a CD has a spiral of finely-spaced data tracks. Diffraction colors also appear when one looks at a bright point source through a translucent fine-pitch umbrella-fabric covering. Decorative patterned plastic films based on reflective grating patches are very inexpensive, and are commonplace.

An incandescent light bulb viewed through a transmissive diffraction grating.[dubious ]

 

Diffraction Grating

When there is a need to separate light of different wavelengths with high resolution, then a diffraction grating is most often the tool of choice. This “super prism” aspect of the diffraction grating leads to application for measuring atomic spectra in both laboratory instruments and telescopes. A large number of parallel, closely spaced slits constitutes a diffraction grating. The condition for maximum intensity is the same as that for the double slit or multiple slits, but with a large number of slits the intensity maximum is very sharp and narrow, providing the high resolution for spectroscopic applications. The peak intensities are also much higher for the grating than for the double slit.

When light of a single wavelength , like the 632.8nm red light from a helium-neon laser at left, strikes a diffraction grating it is diffracted to each side in multiple orders. Orders 1 and 2 are shown to each side of the direct beam. Different wavelengths are diffracted at different angles, according to the grating relationship.

 

Illustration Calculation

 

Grating diffraction of helium-neon laser

 

Index

Grating concepts

Diffraction concepts

HyperPhysics***** Light and Vision R Nave
Go Back

Diffraction Grating

A diffraction grating is the tool of choice for separating the colors in incident light.
This illustration is qualitative and intended mainly to show the clear separation of the wavelengths of light. There are multiple orders of the peaks associated with the interference of light through the multiple slits. The intensities of these peaks are affected by the diffraction envelope which is determined by the width of the single slits making up the grating. The overall grating intensity is given by the product of the intensity expressions for interference and diffraction. The relative widths of the interference and diffraction patterns depends upon the slit separation and the width of the individual slits, so the pattern will vary based upon those values.

The condition for maximum intensity is the same as that for a double slit. However, angular separation of the maxima is generally much greater because the slit spacing is so small for a diffraction grating.

 

The diffraction grating is an immensely useful tool for the separation of the spectral lines associated with atomic transitions. It acts as a “super prism”, separating the different colors of light much more than the dispersion effect in a prism. The illustration shows the hydrogen spectrum. The hydrogen gas in a thin glass tube is excited by an electrical discharge and the spectrum can be viewed through the grating.

 

  The tracks of a compact disc act as a diffraction grating, producing a separation of the colors of white light. The nominal track separation on a CD is 1.6 micrometers, corresponding to about 625 tracks per millimeter. This is in the range of ordinary laboratory diffraction gratings. For red light of wavelength 600 nm, this would give a first order diffraction maximum at about 22° .

 

Discussion Calculation

 

Index

Grating concepts

HyperPhysics***** Light and Vision R Nave
Go Back

 

 

 

 

 

 

 

 

 

 

GoPiGo 小汽車︰格點圖像算術《色彩空間》標準化

『標準』得靠『科學實驗』才能建立,因此當『色彩匹配』出現『紅綠藍』之『負值』時,能是『可製造』之『物理光源』嗎?

rg color space

 Normalized rg Color Space

r, g, and b chromaticity coordinates are ratios of the one tristimulus value over the sum of all three tristimulus values. A neutral object infers equal values of red, green and blue stimulus. The lack of luminance information in rg prevents having more than 1 neutral point where all three coordinates are of equal value. The white point of the rg chromaticity diagram is defined by the point (1/3,1/3). The white point has one third red, one third green and the final third blue. On an rg chromaticity diagram the first quadrant where all values of r and g are positive forms a right triangle. With max r equals 1 unit along the x and max g equals 1 unit along the y axis. Connecting a line from the max r (1,0) to max g (0,1) from a straight line with slope of negative 1. Any sample that falls on this line has no blue. Moving along the line from max r to max g, shows a decrease in red and an increase of green in the sample, without blue changing. The further a sample moves from this line the more blue is present in the sample trying to be matched.

RGB Color specification System

 The CIE 1931 RGB Color matching functions. The color matching functions are the amounts of primaries needed to match the monochromatic test primary at the wavelength shown on the horizontal scale.

RGB is a color mixture system. Once the color matching function are determined the tristimulus values can be determined easily. Since standardization is required to compare results, CIE established standards to determine color matching function.[5]

  1. The reference stimuli must be monochromatic lights R, G, B. With wavelengths \lambda_R=700.0nm, \lambda_G=546.1nm, \lambda_B=435.8nm respectively.
  2. The basic stimulus is white with equal energy spectrum. Require a ratio of 1.000:4.5907:0.0601 (RGB) to match white point.

Therefore, a white with equi-energy lights of 1.000 + 4.5907 + 0.0601 = 5.6508 lm can be matched by mixing together R, G and B. Guild and Wright used 17 subjects to determine RGB color matching functions.[6] RGB color matching serve as the base for rg chromaticity. The RGB color matching functions are used to determine the tristimulus RGB values for a spectrum. Normalizing the RGB tristimulus values converts the tristimulus into rgb. Normalized RGB tristimulus value can be plotted on an rg chromaticity diagram.

An example of color matching function below.  [F_{\lambda}] is any monochromatic. Any monochromatic can be matched by adding reference stimuli R[R], G[G] and  B[B]. The test light is also to bright to account for this reference stimuli is added to the target to dull the saturation. Thus  R is negative.  [R], [G] and  [B] can be defined as a vector in a three-dimensional space. This three-dimensional space is defined as the color space. Any color  [F] can be reached by matching a given amount of  [R], [G] and  [B].

[F_{\lambda}]+R[R] =G[G]+B[B]
  [F_{\lambda}]=-R[R]+ G[G]+B[B]

The negative  [R] calls for color matching functions that are negative at certain wavelengths. This is evidence of why the  {\overline {r}} color matching function appears to have negative tristimulus values.

 

由於『無有』為『零』已是『極限』矣!所以

【一張圖】

Diagram in CIE rg chromaticity space showing the construction of the triangle specifying the CIE XYZ color space. The triangle Cb-Cg-Cr is just the xy = (0, 0), (0, 1), (1, 0) triangle in CIE xy chromaticity space. The line connecting Cb and Cr is the alychne. Notice that the spectral locus passes through rg = (0, 0) at 435.8 nm, through rg = (0, 1) at 546.1 nm and through rg = (1, 0) at 700 nm. Also, the equal energy point (E) is at rg = xy = (1/3, 1/3).

 

【一段文】

Construction of the CIE XYZ color space from the Wright–Guild data

Having developed an RGB model of human vision using the CIE RGB matching functions, the members of the special commission wished to develop another color space that would relate to the CIE RGB color space. It was assumed that Grassmann’s law held, and the new space would be related to the CIE RGB space by a linear transformation. The new space would be defined in terms of three new color matching functions  {\overline {x}}(\lambda ) {\overline {y}}(\lambda ), and  {\overline {z}}(\lambda ) as described above. The new color space would be chosen to have the following desirable properties:

  1. The new color matching functions were to be everywhere greater than or equal to zero. In 1931, computations were done by hand or slide rule, and the specification of positive values was a useful computational simplification.
  2. The  {\overline {y}}(\lambda ) color matching function would be exactly equal to the photopic luminous efficiency function V(λ) for the “CIE standard photopic observer”.[12] The luminance function describes the variation of perceived brightness with wavelength. The fact that the luminance function could be constructed by a linear combination of the RGB color matching functions was not guaranteed by any means but might be expected to be nearly true due to the near-linear nature of human sight. Again, the main reason for this requirement was computational simplification.
  3. For the constant energy white point, it was required that x = y = z = 1/3.
  4. By virtue of the definition of chromaticity and the requirement of positive values of x and y, it can be seen that the gamut of all colors will lie inside the triangle [1, 0], [0, 0], [0, 1]. It was required that the gamut fill this space practically completely.
  5. It was found that the  {\overline {z}}(\lambda ) color matching function could be set to zero above 650 nm while remaining within the bounds of experimental error. For computational simplicity, it was specified that this would be so.

In geometrical terms, choosing the new color space amounts to choosing a new triangle in rg chromaticity space. In the figure above-right, the rg chromaticity coordinates are shown on the two axes in black, along with the gamut of the 1931 standard observer. Shown in red are the CIE xy chromaticity axes which were determined by the above requirements. The requirement that the XYZ coordinates be non-negative means that the triangle formed by Cr, Cg, Cb must encompass the entire gamut of the standard observer. The line connecting Cr and Cb is fixed by the requirement that the  {\overline {y}}(\lambda ) function be equal to the luminance function. This line is the line of zero luminance, and is called the alychne. The requirement that the  {\overline {z}}(\lambda ) function be zero above 650 nm means that the line connecting Cg and Cr must be tangent to the gamut in the region of Kr. This defines the location of point Cr. The requirement that the equal energy point be defined by x = y = 1/3 puts a restriction on the line joining Cb and Cg, and finally, the requirement that the gamut fill the space puts a second restriction on this line to be very close to the gamut in the green region, which specifies the location of Cg and Cb. The above described transformation is a linear transformation from the CIE RGB space to XYZ space. The standardized transformation settled upon by the CIE special commission was as follows:

The numbers in the conversion matrix below are exact, with the number of digits specified in CIE standards.[11]

{\displaystyle {\begin{bmatrix}X\\Y\\Z\end{bmatrix}}={\frac {1}{b_{21}}}{\begin{bmatrix}b_{11}&b_{12}&b_{13}\\b_{21}&b_{22}&b_{23}\\b_{31}&b_{32}&b_{33}\end{bmatrix}}{\begin{bmatrix}R\\G\\B\end{bmatrix}}={\frac {1}{0.176{,}97}}{\begin{bmatrix}0.490{,}00&0.310{,}00&0.200{,}00\\0.176{,}97&0.812{,}40&0.010{,}630\\0.000{,}0&0.010{,}000&0.990{,}00\end{bmatrix}}{\begin{bmatrix}R\\G\\B\end{bmatrix}}}

While the above matrix is exactly specified in standards, going the other direction uses an inverse matrix that is not exactly specified, but is approximately:

{\displaystyle {\begin{bmatrix}R\\G\\B\end{bmatrix}}={\begin{bmatrix}0.418{,}47&-0.158{,}66&-0.082{,}835\\-0.091{,}169&0.252{,}43&0.015{,}708\\0.000{,}920{,}90&-0.002{,}549{,}8&0.178{,}60\end{bmatrix}}\cdot {\begin{bmatrix}X\\Y\\Z\end{bmatrix}}}

The integrals of the XYZ color matching functions must all be equal by requirement 3 above, and this is set by the integral of the photopic luminous efficiency function by requirement 2 above. The tabulated sensitivity curves have a certain amount of arbitrariness in them. The shapes of the individual X, Y and Z sensitivity curves can be measured with a reasonable accuracy. However, the overall luminosity curve (which in fact is a weighted sum of these three curves) is subjective, since it involves asking a test person whether two light sources have the same brightness, even if they are in completely different colors. Along the same lines, the relative magnitudes of the X, Y, and Z curves are arbitrary. Furthermore, one could define a valid color space with an X sensitivity curve that has twice the amplitude. This new color space would have a different shape. The sensitivity curves in the CIE 1931 and 1964 XYZ color spaces are scaled to have equal areas under the curves.

 

指出『困難』與『目的』乎??

故知歷史『資訊夏農熵』者

三十六計》南北朝‧檀道濟

瞞天過海

備周則意怠;常見則不疑。陰在陽之內,不在陰之外。太陽,太陰 。

唐 太宗貞觀十七年,太宗領軍三十萬東征,太宗會暈船,薛仁貴怕皇上不敢過海而退兵,故假扮為一豪民,拜見唐太宗,邀請太宗文武百官到他家作客,豪民家飾以繡 幔彩錦,環繞於室,好不漂亮,太宗與百官遂於豪民家飲酒作樂。不久,房室搖晃,杯酒落地,太宗等人驚嚇,揭開繡幔彩錦,發現他與三十萬大軍已在海上。古時 皇帝自稱天子,故瞞「天」過海的天,指的是皇帝,此計遂稱為瞞天過海。

兵法講究『陰陽』,伺候打探『消息』,事件給予『情報』。常見則『發生頻率』高,因太普通故不生疑,認為少有『資訊價值』也 !若說有人能從此處建立『資訊理論』,當真是『資訊 bit 』比特值極高的乎?

克勞德·夏農

克勞德·艾爾伍德·夏農Claude Elwood Shannon,1916年4月30日-2001年2月26日),美國數學家電子工程師密碼學家,被譽為資訊理論的創始人。[1][2]夏農是密西根大學學士,麻省理工學院博士。

1948年,夏農發表了劃時代的論文——通訊的數學原理,奠定了現代資訊理論的基礎。不僅如此,夏農還被認為是數位計算機理論和數位電路設計理論的創始人。1937年,21歲的夏農是麻省理工學院的碩士研究生,他在其碩士論文中提出,將布爾代數應用於電子領域,能夠構建並解決任何邏輯和數值關係,被譽為有史以來最具水平的碩士論文之一[3]。二戰期間,夏農為軍事領域的密分碼析——密碼破譯和保密通訊——做出了很大貢獻。

───

無奈這把『資訊尺』用了許多 丈二金剛摸不着頭的『術語』───傳輸器、通道、接收器、雜訊源、熵、期望值、機率、資訊內容… ,維基百科詞條讀來宛若『天書』耶??

Entropy (information theory)

In information theory, systems are modeled by a transmitter, channel, and receiver. The transmitter produces messages that are sent through the channel. The channel modifies the message in some way. The receiver attempts to infer which message was sent. In this context, entropy (more specifically, Shannon entropy) is the expected value (average) of the information contained in each message. ‘Messages’ can be modeled by any flow of information.

In a more technical sense, there are reasons (explained below) to define information as the negative of the logarithm of the probability distribution. The probability distribution of the events, coupled with the information amount of every event, forms a random variable whose expected value is the average amount of information, or entropy, generated by this distribution. Units of entropy are the shannon, nat, or hartley, depending on the base of the logarithm used to define it, though the shannon is commonly referred to as a bit.

The logarithm of the probability distribution is useful as a measure of entropy because it is additive for independent sources. For instance, the entropy of a coin toss is 1 shannon, whereas of m tosses it is m shannons. Generally, you need log2(n) bits to represent a variable that can take one of n values if n is a power of 2. If these values are equally probable, the entropy (in shannons) is equal to the number of bits. Equality between number of bits and shannons holds only while all outcomes are equally probable. If one of the events is more probable than others, observation of that event is less informative. Conversely, rarer events provide more information when observed. Since observation of less probable events occurs more rarely, the net effect is that the entropy (thought of as average information) received from non-uniformly distributed data is less than log2(n). Entropy is zero when one outcome is certain. Shannon entropy quantifies all these considerations exactly when a probability distribution of the source is known. The meaning of the events observed (the meaning of messages) does not matter in the definition of entropy. Entropy only takes into account the probability of observing a specific event, so the information it encapsulates is information about the underlying probability distribution, not the meaning of the events themselves.

Generally, entropy refers to disorder or uncertainty. Shannon entropy was introduced by Claude E. Shannon in his 1948 paper “A Mathematical Theory of Communication“.[1] Shannon entropy provides an absolute limit on the best possible average length of lossless encoding or compression of an information source. Rényi entropy generalizes Shannon entropy.

Definition

Named after Boltzmann’s Η-theorem, Shannon defined the entropy Η (Greek letter Eta) of a discrete random variable X with possible values {x1, …, xn} and probability mass function P(X) as:

\Eta(X) = \mathrm{E}[\mathrm{I}(X)] = \mathrm{E}[-\ln(\mathrm{P}(X))].

Here E is the expected value operator, and I is the information content of X.[4][5] I(X) is itself a random variable.

The entropy can explicitly be written as

\Eta(X) = \sum_{i=1}^n {\mathrm{P}(x_i)\,\mathrm{I}(x_i)} = -\sum_{i=1}^n {\mathrm{P}(x_i) \log_b \mathrm{P}(x_i)},

where b is the base of the logarithm used. Common values of b are 2, Euler’s number e, and 10, and the unit of entropy is shannon for b = 2, nat for b = e, and hartley for b = 10.[6] When b = 2, the units of entropy are also commonly referred to as bits.

In the case of p(xi) = 0 for some i, the value of the corresponding summand 0 logb(0) is taken to be 0, which is consistent with the limit:

\lim_{p\to0+}p\log (p) = 0.

When the distribution is continuous rather than discrete, the sum is replaced with an integral as

\Eta(X) = \int {\mathrm{P}(x)\,\mathrm{I}(x)} ~dx = -\int {\mathrm{P}(x) \log_b \mathrm{P}(x)} ~dx,

where P(x) represents a probability density function.

One may also define the conditional entropy of two events X and Y taking values xi and yj respectively, as

 \Eta(X|Y)=\sum_{i,j}p(x_{i},y_{j})\log\frac{p(y_{j})}{p(x_{i},y_{j})}

where p(xi, yj) is the probability that X = xi and Y = yj. This quantity should be understood as the amount of randomness in the random variable X given the event Y.

── 摘自《W!o+ 的《小伶鼬工坊演義》︰神經網絡【學而堯曰】六

 

或解顏色『匹配色彩』古今談☆

The Wright – Guild Experiments and the Development ofthe CIE 1931 RGB and XYZ Color Spaces

Phil Service

Flagstaff, Arizona, USA

29 March 2016

 

 

 

 

 

 

 

 

 

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.

 

 

 

 

 

 

 

 

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

『眼睛』並非單純的『物理量』度量儀表,『感官知覺』雖有相當之『共性』,『差異』還是存在的。因此明白『完美的黑』 ─ 入眼光譜為零 ─ 與『理想的白』─ 所有可見光輻射強度均等 ─ 之所以為重要『色覺參考』思過半矣!或可『讀』『解』公孫龍之『白馬非馬論』乎?

[/wc_column][/wc_row]

白馬

白羊

白狐

白雪

』色是各種叫白色東西,所共有顏色。有這種顏色嗎?然而『白馬』的白、『白羊』的白和『白狐』的白,雖然在其類中都是稱之為者,彼此類間確又有所不同,當然也與『共相抽象的『』色有所不同。比方說把『白羊』之『白』用之於馬,『那馬』──  羊白之馬 ──叫做『黃馬』,為什麼呢?因為『白羊』之白近之於馬類』之然它羊類』之

許多抽象概念,從『具體』的物來看,不過是『該物屬性之一。說不定還不是『物理』上的屬性,就像『』與『』的不同,更不要說世界上尚有『色弱』之人,若是彼二人爭論『物之顏色』的異同,恐怕最好求之於物理『量測儀器』較好。更不要說它還可以是『模糊』的,舉例說『禿頭』一詞︰設想一個『濃髮』之人『掉一根』頭髮,不會就變成了『禿頭』的吧!那一根一根的掉呢?掉到『哪一根』才讓他成為禿頭』的人了?果真能說是那一根的『』?冬雪陽春,不如踏雪尋梅吧!!

馬形字

馬形

白馬

牛頭馬面

馬形雲

馬『』是看起來『』馬的東西,『』字的構創之來歷。但是『』能回答『馬是什麼嗎?』,也許只因人們心中有著的『概念』,它不是的『概念』,也不同於的『概念』,由於馬牛羊外『不同 ,正以『區別』這些不同的動物。想當日創生『』『』字之時,卻遇著了『牛頭馬面』來訪,這兩個字會『寫的』和今天不一樣嗎?

過去有一個『瞎子摸象』的故事,因為『見不著』象,於是各說各話,所以不能說用『』來取象沒有大用。那就說『同一張』『』又怎麼會因為『幾條線』的不同,就『變臉』不象『那個人』了呢?

臉表情符號

夏日炎炎,何不行到水窮處,坐看雲起時,見著『形如白馬』之雲,正奔騰!!

── 弗雷格的理念就是想讓『表達』和『論證清晰明白 ──

─── 摘自《白馬非馬論

 

如是者當聽聞『三原色』說︰

原色

原色是指不能透過其他顏色的混合調配而得出的「基本色」。

以不同比例將原色混合,可以產生出其他的新顏色。以數學的向量空間來解釋色彩系統,則原色在空間內可作為一組基底向量,並且能組合出一個「色彩空間」。由於人類肉眼有三種不同顏色的感光體,因此所見的色彩空間通常可以由三種基本色所表達,這三種顏色被稱為「三原色」。一般來說疊加型的三原色是紅色綠色藍色(又稱三基色,用於電視機、投影儀等顯示設備);而消減型的三原色是洋紅色黃色青色(用於書本、雜誌等的印刷)。

 

以及

格拉斯曼定律 (色彩)

格拉斯曼定律是一個關於光學理論的經驗法測,他說明了人類對色彩的感知(大約)是線性的。這個定律是由格拉斯曼所發現的。

敘述

若兩單色光組合成一測試色光,則觀測者感知到的三原色數值為兩單色光分別被單獨觀測的三原色數值之和。換句話說,如果光束一及光束二為單色光,而  {\displaystyle (R_{1},G_{1},B_{1})}  {\displaystyle (R_{2},G_{2},B_{2})}分別為觀測者對光束一及光束二的感知三原色數值,當此二光束合併時,觀測者感知的三原色數值為  {\displaystyle (R,G,B)},其中:

{\displaystyle R=R_{1}+R_{2}\,}
  {\displaystyle G=G_{1}+G_{2}\,}
  {\displaystyle B=B_{1}+B_{2}\,}

更一般的來說,格拉斯曼定律說明了任一光束的三原色座標為

{\displaystyle R=\int _{0}^{\infty }I(\lambda )\,{\bar {r}}(\lambda )\,d\lambda }
  {\displaystyle G=\int _{0}^{\infty }I(\lambda )\,{\bar {g}}(\lambda )\,d\lambda }
  {\displaystyle B=\int _{0}^{\infty }I(\lambda )\,{\bar {b}}(\lambda )\,d\lambda }

  I(\lambda)為該光束對波長的強度分布;  {\displaystyle {\bar {r}}(\lambda )}  {\displaystyle {\bar {g}}(\lambda )}  {\displaystyle {\bar {b}}(\lambda )}則分別為人眼中三種錐狀細胞對不同波長的反應強度。

 

自能曉得任選『自然』或『科技』中『可調變』之『紅』、『綠』 、『藍』,比方講用

磷光體

磷光體(Phosphor)是產生冷發光現象的物質,包括亮度衰減緩慢的(>1ms)磷光材料和發光衰減在幾十奈秒的螢光材料。磷光材料在雷達螢幕及夜光玩具上用得較多,螢光材料在CRT和電漿顯示器、傳感器和發光二極體中更為常見。

磷光體一般是各種過渡金屬化合物或者稀土金屬化合物。磷光體長用在陰極射線管顯示器和螢光燈中。CRT磷光體在第二次世界大戰時標準化,表示方法為P加數字。

元素的發光原理是化學發光而不是磷光[1],所以磷不是磷光體。

 

製造

Cathode ray tubes

 Spectra of constituent blue, green and red phosphors in a common cathode ray tube.

Cathode ray tubes produce signal-generated light patterns in a (typically) round or rectangular format. Bulky CRTs were used in the black-and-white household television (“TV”) sets that became popular in the 1950s, as well as first-generation, tube-based color TVs, and most earlier computer monitors. CRTs have also been widely used in scientific and engineering instrumentation, such as oscilloscopes, usually with a single phosphor color, typically green. Phosphors for such applications may have long afterglow, for increased image persistence.

The phosphors can be deposited as either thin film, or as discrete particles, a powder bound to the surface. Thin films have better lifetime and better resolution, but provide less bright and less efficient image than powder ones. This is caused by multiple internal reflections in the thin film, scattering the emitted light.

White (in black-and-white): The mix of zinc cadmium sulfide and zinc sulfide silver, the ZnS:Ag+(Zn,Cd)S:Ag is the white P4 phosphor used in black and white television CRTs. Mixes of yellow and blue phosphors are usual. Mixes of red, green and blue, or a single white phosphor, can also be encountered.

Red: Yttrium oxidesulfide activated with europium is used as the red phosphor in color CRTs. The development of color TV took a long time due to the search for a red phosphor. The first red emitting rare earth phosphor, YVO4:Eu3+, was introduced by Levine and Palilla as a primary color in television in 1964.[21] In single crystal form, it was used as an excellent polarizer and laser material.[22]

Yellow: When mixed with cadmium sulfide, the resulting zinc cadmium sulfide (Zn,Cd)S:Ag, provides strong yellow light.

Green: Combination of zinc sulfide with copper, the P31 phosphor or ZnS:Cu, provides green light peaking at 531 nm, with long glow.

Blue: Combination of zinc sulfide with few ppm of silver, the ZnS:Ag, when excited by electrons, provides strong blue glow with maximum at 450 nm, with short afterglow with 200 nanosecond duration. It is known as the P22B phosphor. This material, zinc sulfide silver, is still one of the most efficient phosphors in cathode ray tubes. It is used as a blue phosphor in color CRTs.

The phosphors are usually poor electrical conductors. This may lead to deposition of residual charge on the screen, effectively decreasing the energy of the impacting electrons due to electrostatic repulsion (an effect known as “sticking”). To eliminate this, a thin layer of aluminium (about 100 nm) is deposited over the phosphors, usually by vacuum evaporation, and connected to the conductive layer inside the tube. This layer also reflects the phosphor light to the desired direction, and protects the phosphor from ion bombardment resulting from an imperfect vacuum.

To reduce the image degradation by reflection of ambient light, contrast can be increased by several methods. In addition to black masking of unused areas of screen, the phosphor particles in color screens are coated with pigments of matching color. For example, the red phosphors are coated with ferric oxide (replacing earlier Cd(S,Se) due to cadmium toxicity), blue phosphors can be coated with marine blue (CoO·nAl2O3) or ultramarine (Na8Al6Si6O24S2). Green phosphors based on ZnS:Cu do not have to be coated due to their own yellowish color.[2]

 

,只要一條『白光方程式』︰

colormodels.py

# sRGB (ITU-R BT.709) standard phosphor chromaticities
SRGB_Red = xyz_color (0.640, 0.330)
SRGB_Green = xyz_color (0.300, 0.600)
SRGB_Blue = xyz_color (0.150, 0.060)
SRGB_White = xyz_color (0.3127, 0.3290) # D65


def init (
    phosphor_red   = SRGB_Red,
    phosphor_green = SRGB_Green,
    phosphor_blue  = SRGB_Blue,
    white_point    = SRGB_White):
……
    global PhosphorRed, PhosphorGreen, PhosphorBlue, PhosphorWhite
    PhosphorRed   = phosphor_red
    PhosphorGreen = phosphor_green
    PhosphorBlue  = phosphor_blue
    PhosphorWhite = white_point
    global xyz_from_rgb_matrix, rgb_from_xyz_matrix
    phosphor_matrix = numpy.column_stack ((phosphor_red, phosphor_green, phosph# normalize white point to Y=1.0     normalized_white = white_point.copy()     xyz_normalize_Y1 (normalized_white)     # Determine intensities of each phosphor by solving:     #     phosphor_matrix * intensity_vector = white_point     intensities = numpy.linalg.solve (phosphor_matrix, normalized_white)     # construct xyz_from_rgb matrix from the results     # construct xyz_from_rgb matrix from the results     xyz_from_rgb_matrix = numpy.column_stack (         (phosphor_red   * intensities [0],          phosphor_green * intensities [1],          phosphor_blue  * intensities [2]))     # invert to get rgb_from_xyz matrix     rgb_from_xyz_matrix = numpy.linalg.inv (xyz_from_rgb_matrix) </pre>    <span style="color: #666699;">,就可形成一個『顯色空間』耶!!??</span> <pre class="lang:default decode:true">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.colormodels

In [2]: 磷光紅 = colorpy.colormodels.SRGB_Red

In [3]: 磷光綠 = colorpy.colormodels.SRGB_Green

In [4]: 磷光藍 = colorpy.colormodels.SRGB_Blue

In [5]: 參考白 = colorpy.colormodels.SRGB_White

In [6]: 磷光紅
Out[6]: array([ 0.64,  0.33,  0.03])

In [7]: 磷光綠
Out[7]: array([ 0.3,  0.6,  0.1])

In [8]: 磷光藍
Out[8]: array([ 0.15,  0.06,  0.79])

In [9]: 參考白
Out[9]: array([ 0.3127,  0.329 ,  0.3583])

In [10]: 磷光矩陣 = numpy.column_stack ((磷光紅, 磷光綠, 磷光藍))

In [11]: 磷光矩陣
Out[11]: 
array([[ 0.64,  0.3 ,  0.15],
       [ 0.33,  0.6 ,  0.06],
       [ 0.03,  0.1 ,  0.79]])

In [12]: 光度歸一白 = 參考白.copy()

In [13]: 光度歸一白
Out[13]: array([ 0.3127,  0.329 ,  0.3583])

In [14]: colorpy.colormodels.xyz_normalize_Y1(光度歸一白)
Out[14]: array([ 0.95045593,  1.        ,  1.08905775])

In [15]: 光度歸一白
Out[15]: array([ 0.95045593,  1.        ,  1.08905775])

In [16]: 白光分量強度 = numpy.linalg.solve(磷光矩陣, 光度歸一白)

In [17]: 白光分量強度
Out[17]: array([ 0.64436062,  1.1919478 ,  1.20320526])

In [18]: 由RGB轉XYZ矩陣 = numpy.column_stack (
   ....:      (磷光紅 * 白光分量強度[0],
   ....:       磷光綠 * 白光分量強度[1],
   ....:       磷光藍 * 白光分量強度[2]))

In [19]: 由RGB轉XYZ矩陣
Out[19]: 
array([[ 0.4123908 ,  0.35758434,  0.18048079],
       [ 0.21263901,  0.71516868,  0.07219232],
       [ 0.01933082,  0.11919478,  0.95053215]])

In [20]: 由XYZ轉RGB矩陣 = numpy.linalg.inv(由RGB轉XYZ矩陣)

In [21]: 由XYZ轉RGB矩陣
Out[21]: 
array([[ 3.24096994, -1.53738318, -0.49861076],
       [-0.96924364,  1.8759675 ,  0.04155506],
       [ 0.05563008, -0.20397696,  1.05697151]])

In [22]: 

 

 

 

 

 

 

 

 

 

 

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

想要理解什麼是『灰色』其實並不容易!?

Grey

Grey (British English) or gray (American English;[citation needed] see spelling differences) is an intermediate color between black and white. It is a neutral or achromatic color, meaning literally that it is a color “without color.”[2] This means that there are equal components of red, green, and blue. The variations in intensity of these colors uniformly produce different shades of grey. It is the color of a cloud-covered sky, of ash and of lead.[3]

The first recorded use of grey as a color name in the English language was in AD 700.[4] Grey is the dominant spelling in European and Commonwealth English, although gray remained in common usage in the UK until the second half of the 20th century.[5] Gray has been the preferred American spelling since approximately 1825,[6] although grey is an accepted variant.[7][8]

In Europe and the United States, surveys show that grey is the color most commonly associated with neutrality, conformity, boredom, uncertainty, old age, indifference, and modesty. Only one percent of respondents chose it as their favorite color.[9]

 

 

因為『純灰』指稱沒有『色相』 HUE 之『顏色』也◎

色相

色相指的是色彩的外相,是在不同波長的照射下,人所感覺不同的顏色,如紅色黃色藍色等。

HSL和HSV色彩空間中,H指的就是色相,是以紅色為0(360度);黃色為60度;綠色為120度;青色為180度;藍色為240度;品紅色為300度。

顏色名稱 紅綠藍含量 角度 代表物體
紅色 R255,G0,B0 血液草莓
橙色 R255,G128,B0 30° 橙子
黃色 R255,G255,B0 60° 香蕉杧果
黃綠 R128,G255,B0 90° 檸檬
綠色 R0,G255,B0 120° 樹葉
青綠 R0,G255,B128 150° 軍裝
青色 R0,G255,B255 180° 水面天空
靛藍 R0,G128,B255 210° 水面天空
藍色 R0,G0,B255 240° 樹根墨水
紫色 R128,G0,B255 270° 葡萄茄子
品紅 R255,G0,B255 300° 桃子
紫紅 R255,G0,B128 330° 墨水
 
編碼RGBHSB/HSL中的色相

 

彷彿人眼所見『彩色世界』的『三原色』之『均等色』哩!!莫要以為只有『無光』才是『黑』??人人之不同或未必有『相同』之『知覺』,如何求其『齊頭一致』耶!!

Black

Black is the darkest color, resulting from the absence or complete absorption of light. Like white and grey, it is an achromatic color, literally a color without hue.[1] It is one of the four primary colors in the CMYK color model, along with cyan, yellow, and magenta, used in color printing to produce all the other colors. Black is often used to represent darkness; it is the symbolic opposite of white (or brightness).

Black was one of the first colors used by artists in neolithic cave paintings. In the 14th century, it began to be worn by royalty, the clergy, judges and government officials in much of Europe. It became the color worn by English romantic poets, businessmen and statesmen in the 19th century, and a high fashion color in the 20th century.[2]

In the Roman Empire, it became the color of mourning, and over the centuries it was frequently associated with death, evil, witches and magic. According to surveys in Europe and North America, it is the color most commonly associated with mourning, the end, secrets, magic, force, violence, evil, and elegance.[3]

Science

Physics

In the visible spectrum, black is the absorption of all colors.

Black can be defined as the visual impression experienced when no visible light reaches the eye. Pigments or dyes that absorb light rather than reflect it back to the eye “look black”. A black pigment can, however, result from a combination of several pigments that collectively absorb all colors. If appropriate proportions of three primary pigments are mixed, the result reflects so little light as to be called “black”.

This provides two superficially opposite but actually complementary descriptions of black. Black is the absorption of all colors of light, or an exhaustive combination of multiple colors of pigment. See also primary colors.

In physics, a black body is a perfect absorber of light, but, by a thermodynamic rule, it is also the best emitter. Thus, the best radiative cooling, out of sunlight, is by using black paint, though it is important that it be black (a nearly perfect absorber) in the infrared as well.

In elementary science, far ultraviolet light is called “black light” because, while itself unseen, it causes many minerals and other substances to fluoresce.

On January 16, 2008, researchers from Troy, New York‘s Rensselaer Polytechnic Institute announced the creation of the then darkest material on the planet. The material, which reflected only 0.045 percent of light, was created from carbon nanotubes stood on end. This is 1/30 of the light reflected by the current standard for blackness, and one third the light reflected by the previous record holder for darkest substance.[30] As of February 2016, the current darkest material known is claimed to be Vantablack.[31][32]

A material is said to be black if most incoming light is absorbed equally in the material. Light (electromagnetic radiation in the visible spectrum) interacts with the atoms and molecules, which causes the energy of the light to be converted into other forms of energy, usually heat. This means that black surfaces can act as thermal collectors, absorbing light and generating heat (see Solar thermal collector).

Absorption of light is contrasted by transmission, reflection and diffusion, where the light is only redirected, causing objects to appear transparent, reflective or white respectively.

故,所謂『光譜』生『色彩知覺』

Spectral color

A spectral color is a color that is evoked by a single wavelength of light in the visible spectrum, or by a relatively narrow band of wavelengths, also known as monochromatic light. Every wavelength of visible light is perceived as a spectral color, in a continuous spectrum; the colors of sufficiently close wavelengths are indistinguishable.

The spectrum is often divided into named colors, though any division is somewhat arbitrary: the spectrum is continuous. Traditional colors include: red, orange, yellow, green, blue, and violet.

The division used by Isaac Newton, in his color wheel, was: red, orange, yellow, green, blue, indigo and violet; a mnemonic for this order is “Roy G. Biv“. In modern divisions of the spectrum, indigo is often omitted.

One needs at least trichromatic color vision for there to be a distinction between spectral and non-spectral colours[dubious ]: trichromacy gives a possibility to perceive both hue and saturation in the chroma. In color models capable of representing spectral colors,[1] such as CIELUV, a spectral color has the maximal saturation.

The CIE xy chromaticity diagram. The spectrum colors are the colors on the horseshoe-shaped curve on the outside of the diagram. All other colors are not spectral: the bottom straight line is the line of purples, whilst within the interior of the diagram are unsaturated colors that are various mixtures of a spectral color or a purple color with white, a grayscale color. White is in the central part of the interior of the diagram, since when all colors of light are mixed together, they produce white.

In color spaces

 This metrically accurate diagram shows that the spectral locus is almost flat on the red – bright green segment, is strongly curved around green, and becomes less curved between green/cyan and blue

In color spaces which include all, or most spectral colors, they form a part of boundary of the set of all real colors. If luminance is counted, then spectral colors form a surface, otherwise their locus is a curve in a two-dimensional chromaticity space.

Theoretically, only RGB-implemented colors which might be really spectral are its primaries: red, green, and blue, whereas any other (mixed) color is inherently non-spectral. But due to different chromaticity properties of different spectral segments, and also due to practical limitations of light sources, the actual distance between RGB pure color wheel colors and spectral colors shows a complicated dependence on the hue. Due to location of R and G primaries near the almost “flat” spectral segment, RGB color space is reasonably good with approximating spectral orange, yellow, and bright (yellowish) green, but is especially poor in reaching a visual appearance of spectral colors between green and blue, as well as extreme spectral colors. The sRGB standard has an additional problem with its “red” primary which is shifted to orange due to a trade-off between purity of red and its reasonable luminance, so that the red spectral became unreachable. Some samples in the table below provide only rough approximations of spectral and near-spectral colors.

CMYK is usually even poorer than RGB in its reach of spectral colors, with notable exception of process yellow, which is rather close to spectral colors due to aforementioned flatness of the spectral locus in the red–green segment.

Note that spectral color are universally included to scientific color models such as CIE 1931, but industrial and consumer color spaces such as sRGB, CMYK, and Pantone, do not include any of spectral colors.

 

,暫不論『光譜色』鮮矣哉,『日光白』豈不是共通之『參考點』乎??

白色

白色是一種包含光譜中所有顏色光的顏色,通常被認為是「無色」的,(但和黑色的無色正相反),其明度最高,色相為零。可以將光譜中三原色的光:紅色藍色綠色按一定比例混合得到白光。光譜中所有可見光的混合也是白光。

白光

以前許多科學家認為,白光是最基本的光,其他顏色的光是在白光上添加了某些元素。但英國科學家艾薩克·牛頓的研究,揭露了白光是由光譜中各種顏色的光組成的。現在光學中,稱黑體在加熱到不同溫度釋放出的輻射光都叫做「白光」,最低發光溫度為2848 K,相當於白熾燈泡的溫度;劇場中白光等溫度達到3200K;白天天光的溫度相當於5400K,但是由多種顏色的光組成的,從最低溫度的紅光到將近25000K的紫光都包括在內。但並不是所有黑體輻射都是白光,宇宙背景輻射也是黑體輻射,只有3K。

標準白光

國際照明協會所規定的標準白光是6500K時的黑體輻射,相當於白天天光

White

White is an achromatic color, a color without hue.[1]

Light with a spectral composition that stimulates all three types of the color sensitive cone cells of the human eye in nearly equal amounts appears white. White is one of the most common colors in nature, the color of sunlight, and the color of sunlight reflected by snow, milk, chalk, limestone and other common minerals. In many cultures white represents or signifies purity, innocence, and light, and is the symbolic opposite of black, or darkness. According to surveys in Europe and the United States, white is the color most often associated with perfection, the good, honesty, cleanliness, the beginning, the new, neutrality, and exactitude.[2]

In ancient Egypt and ancient Rome, priestesses wore white as a symbol of purity, and Romans wore a white toga as a symbol of citizenship. In the Middle Ages and Renaissance a white unicorn symbolized chastity, and a white lamb sacrifice and purity; the widows of kings dressed in white rather than black as the color of mourning. It sometimes symbolizes royalty; it was the color of the French kings (black being the color of the queens) and of the monarchist movement after the French Revolution as well as of the movement called the White Russians (not to be confounded with Belarus, literally “White Russia”) who fought the Bolsheviks during the Russian Civil War (1917–1922). Greek and Roman temples were faced with white marble, and beginning in the 18th century, with the advent of neoclassical architecture, white became the most common color of new churches, capitols and other government buildings, especially in the United States. It was also widely used in 20th century modern architecture as a symbol of modernity, simplicity and strength.

White is an important color for almost all world religions. The Pope, the head of the Roman Catholic Church, has worn white since 1566, as a symbol of purity and sacrifice. In Islam, and in the Shinto religion of Japan, it is worn by pilgrims; and by the Brahmins in India. In Western cultures and in Japan, white is the most common color for wedding dresses, symbolizing purity and virginity. In many Asian cultures, white is also the color of mourning.[3]

The white color on television screens and computer monitors is created with the RGB color model by mixing red, green and blue light at equal intensities.[citation needed]

Science

Physics

White is the color the human visual system senses when the incoming light to the eye stimulates all three types of color sensitive cone cells in the eye in nearly equal amounts.[24] Materials that do not emit light themselves appear white if their surfaces reflect back most of the light that strikes them in a diffuse way.

In 1666, Isaac Newton demonstrated that white light could be broken up into its composite colors by passing it through a prism, then using a second prism to reassemble them. Before Newton, most scientists believed that white was the fundamental color of light.

White light can be generated by the sun, by stars, or by earthbound sources such as fluorescent lamps, white LEDs and incandescent bulbs. On the screen of a color television or computer, white is produced by mixing the primary colors of light: red, green and blue (RGB) at full intensity, a process called additive mixing (see image below). White light can be fabricated using light with only two wavelengths, for instance by mixing light from a red and cyan laser or yellow and blue lasers. This light will however have very few practical applications since color rendering of objects will be greatly distorted.

The fact that light sources with vastly different spectral power distributions can result in a similar sensory experience is due to the way the light is processed by the visual system. One color that arise from two different spectral power distributions is called a metamerism.

The International Commission on Illumination defines white (adapted) as “a color stimulus that an observer who is adapted to the viewing environment would judge to be perfectly achromatic and to have a luminance factor of unity. The color stimulus that is considered to be the adapted white may be different at different locations within a scene.[25]

The adaptation mentioned in the CIE definition above is the chromatic adaptation by which the same colored object in a scene experienced under very different illuminations will be perceived as having nearly the same color. The same principle is used in photography and cinematography where the choice of white point determines a transformation of all other color stimuli. Changes in or manipulation of the white point can be used to explain some optical illusions such as The dress.

Many of the light sources that emit white light emit light at almost all visible wavelengths (sun light, incandescent lamps of various Color temperatures). This has led to the notion that white light can be defined as a mixture of “all colors” or “all visible wavelengths”. This misconception is widespread[26][27] and might originally stem from the fact that Newton discovered that sunlight is composed of light with wavelengths across the visible spectrum. Concluding that since “all colors” produce white light then white must be made up of “all colors” is a common logical error called affirming the consequent, which might be the cause of the misunderstanding.

Why snow, clouds and beaches are white

Snow is a mixture of air and tiny ice crystals. When white sunlight enters snow, very little of the spectrum is absorbed; almost all of the light is reflected or scattered by the air and water molecules, so the snow appears to be the color of sunlight, white. Sometimes the light bounces around inside the ice crystals before being scattered, making the snow seem to sparkle.[28]

In the case of glaciers, the ice is more tightly pressed together and contains little air. As sunlight enters the ice, more light of the red spectrum is absorbed, so the light scattered will be bluish.[29]

Clouds are white for the same reason as ice. They are composed of water droplets or ice crystals mixed with air, very little light that strikes them is absorbed, and most of the light is scattered, appearing to the eye as white. Shadows of other clouds above can make clouds look gray, and some clouds have their own shadow on the bottom of the cloud.[30]

Many mountains with winter or year-round snow cover are named accordingly: Mauna Kea means white mountain in Hawaiian, Mont Blanc means white mountain in French. Changbai Mountains literally meaning perpetually white mountains, marks the border between China and Korea.

Beaches with sand containing high amounts of quartz or eroded limestone also appear white, since quartz and limestone reflect or scatter sunlight, rather than absorbing it. Tropical white sand beaches may also have a high quantity of white calcium carbonate from tiny bits of seashells ground to fine sand by the action of the waves.[31]

所以『色彩空間』須『定義』

白點

白點white point),在技術文檔中常被稱作參考白色(reference white)或目標白色(target white),是一組三色視覺值(tristimulus values)或色度值(Chromaticity)。它被用來在圖像捕獲、編碼和再現時定義白色[1]白點的數值不是恆定的,需要按照使用場合的不同對它的數值做出相應的更改。例如在室內攝影時常用白熾燈來照明,而白熾燈的光線色溫相對日光較低,因而呈現出偏橙的顏色。倘若在這種情況下依然使用以日光為準的白點數值來定義白色,攝影的結果就會出現偏色的問題。

White point

A white point (often referred to as reference white or target white in technical documents) is a set of tristimulus values or chromaticity coordinates that serve to define the color “white” in image capture, encoding, or reproduction.[1] Depending on the application, different definitions of white are needed to give acceptable results. For example, photographs taken indoors may be lit by incandescent lights, which are relatively orange compared to daylight. Defining “white” as daylight will give unacceptable results when attempting to color-correct a photograph taken with incandescent lighting.

Illuminants

An illuminant is characterized by its relative spectral power distribution. The white point of an illuminant is the chromaticity of a white object under the illuminant, and can be specified by chromaticity coordinates, such as the x, y coordinates on the CIE 1931 chromaticity diagram (hence the use of the relative SPD and not the absolute SPD, because the white point is only related to color and unaffected by intensity).[2]

Illuminant and white point are separate concepts. For a given illuminant, its white point is uniquely defined. A given white point, on the other hand, generally does not uniquely correspond to only one illuminant. From the commonly used CIE 1931 chromaticity diagram, it can be seen that almost all non-spectral colors (all except those on the line of purples), including colors described as white, can be produced by infinitely many combinations of spectral colors, and therefore by infinitely many different illuminant spectra.

Although there is generally no one-to-one correspondence between illuminants and white points, in the case of the CIE D-series standard illuminants, the spectral power distributions are mathematically derivable from the chromaticity coordinates of the corresponding white points.[3]

Knowing the illuminant’s spectral power distribution, the reflectance spectrum of the specified white object (often taken as unity), and the numerical definition of the observer allows the coordinates of the white point in any color space to be defined. For example, one of the simplest illuminants is the “E” or “Equal Energy” spectrum. Its spectral power distribution is flat, giving the same power per unit wavelength at any wavelength. In terms of both the 1931 and 1964 CIE XYZ color spaces, its color coordinates are [k, k, k], where k is a constant, and its chromaticity coordinates are [x, y] = [1/3, 1/3].

Diagram of the CIE 1931 color space that shows the Rec. 2020 (UHDTV) color space in the outer triangle and Rec. 709 (HDTV) color space in the inner triangle. Both Rec. 2020 and Rec. 709 use Illuminant D65 for the white point.

 

方可確定吧☆