24 Aralık 2020 Perşembe

Renk Uzayı - RGB

Giriş
İnsan gözünün görebildiği gamut şöyle
Açıklaması şöyle. Yani çoğu monitor insan gözünün görebildiğinden daha az renk gösteriyor.
Most computer monitors aren't capable of displaying any spectral color. Some of the RGB monitors could display at most three of them: some red wavelength, some green and some blue. This is because the gamut of the human vision is not triangular, instead it's curved and resembles a horseshoe:

In the image above, the black curve represents the spectral colors, with the wavelengths in nm denoted by green numbers. The colored triangle is the sRGB gamut, the standard gamut that most "usual" computer monitors are supposed to have.

As you can see, the black curve doesn't even touch the triangle, which means that sRGB monitors can't display any of the corresponding colors.
İnsan gözünde RGB renkleri için alıcılar (reseptörler) var. Açıklaması şöyle.
Our ability to separate different colors from each others depends crucially on how many different receptors we have for colored light.

Humans have three different receptors for light, which means that we can characterize colors by three numbers, just like the RGB-codes of colors on your screen.

At the end of the day, what determines with colors we perceive is how the wave-form is projected onto these three numbers. Since there is an infinite set of wave forms, there is an infinite mixture of colors that we will perceive as identical (for every perceived color).

Some animals have more than three types of color receptors, and can therefore distinguish more wave-forms of light. You can say that their color perception is higher dimensional (4D,5D,... etc) than our 3 dimensional color perception.
Ancak alıcılar mükemmel çalışmıyorlar. Farklı yoğunluktaki şeyleri aynı renk olarak görebiliriz. Açıklaması şöyle.
The light that hits your eye is a mixture of many different pure wave lengths, all at different intensities.

The red sensor in your eye computes the weighted average of those intensities, the green sensor computes a different weighted average etc.

Each type of sensor computes one number. Your brain interprets those three numbers as a color.

There are many different combinations of intensities that all produce the same three weighted averages and therefore all look identical to your brain.
RGB ve Bellekteki Formatlar
RGB renkleri farklı Integer Formatlarında saklanabilir. Bazıları şöyle.
5/5/5 format: As 15-bit integers (5 bits per component).
5/6/5 format: As 16-bit integers (5 bits each for red and blue, and 6 bits for green).
8/8/8 format: As 24-bit integers (8 bits per component).
8/8/8/8 format: As 32-bit integers (8 bits each for red, green, blue, and alpha).
16/16/16 format: As 48-bit integers (16 bits per component).
32 bit gösterim şöyledir.
struct RGBA
{
  char r;
  char g;
  char b;
  char a;
};
8 Bit Truecolor
Eski RGB renk uzayında her şey 8 bit saklanıyordu. Açıklaması şöyle. Burada blue renk için sadece 2 bit kullanılıyordu. Çünkü insan gözü mavi renge daha az hassas
The other form is where the 8 bits directly describe red, green, and blue values, typically with three bits for red, three bits for green and two bits for blue. This second form is often called 8-bit truecolor
8 bit truecolor ile 3D oyunlar bile yapılmış. Açıklaması şöyle
... the original Quake from id software back in '97 decided to go with 256 color modes due to highcolor (15/16 bit color) and truecolor (16M colors) video cards were still relatively rare. 
Alpha Kanalı
RGBA Renk uzayı 4. eksen olarak Alpha kanalını da içerir. Açıklaması şöyle. Alpha kanalı 1 ise renk mat, 0 ise renk saydamdır yani arkadaki rengi gösterir. RGB rengi RGB + Alpha = 1 olarak düşünülebilir.
Some RGB colors also contain a fourth component, called the alpha component, which is 0 greater and 1 or less (from fully transparent to fully opaque). Such RGB colors are called RGBA colors in this document. RGB colors without an alpha component are generally considered to be fully opaque (and to have an implicit alpha component of 1).
Bir diğer not şöyle.
An RGB color
- is white, black, or a shade of gray (achromatic) if it has equal red, green, and blue components, and
- is a "Web safe" color if its red, green, and blue components are each a multiple of 0.2.
RGB to Greysecale
RGB renk uzayından Greyscale (Gri Tonlamalı) resme geçiş için Renk Uzayı - GreyScale yazısına bakabilirsiniz.

Hiç yorum yok:

Yorum Gönder