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