|
Mavzu. Kompyuter grafikasi va uning turlari
|
bet | 8/10 | Sana | 18.05.2024 | Hajmi | 4,86 Mb. | | #241356 |
Bog'liq Mavzu. Kompyuter grafikasi va uning turlari rejaThe RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array o f colors. The name o f the model comesfrom the initials o f the three additive primary colors, red, green, and blue.
The main purpose o f the RGB color model is for the sensing, representation, and display o f images in electronic systems, such as televisions and computers, though it has also been used in conventional photography. Before the electronic age, the RGB color model already had a solid theory behind it, based in human perception o f colors.
RGB is a device-dependent color model: different devices detect or reproduce a given RGB value differently, since the color elements (such as phosphors or dyes) and their response to the individual R, G, and В levels vary from manufacturer to manufacturer, or even in the same device over time. Thus an RGB value does not define the same color across devices without some kind o f color management.
Typical RGB input devices are color TV and video cameras, image scanners, video games, and digital cameras. Typical RGB output devices are TV sets o f various technologies (CRT, LCD, plasma, OLED, Ouantum-Dots etc.), computer and mobile phone displays, video projectors, multicolor LED displays, and large screens such as JumboTron. Color printers, on the other hand, are not RGB devices, but subtractive color devices (typically CMYK color model).
*(8. BarBaraZukinHeiman. PH.D. and others Practical Photoshop CS6, Level lCopyright €> 2009-2012 by. 53 pg.)
Rangning CM modeli
Ushbu model ranglaming yutilish (ayirish) primjipini amalga oshiriladigan qurilmalarda tasvir hosil qilishda rangni ifodalash uchun qo’llaniladi. Bu prinipp eng avvalo qog’ozga pechat qiluvchi qurilmalarda qo’llaniladi. Ushbu modelning atalishi asosiy subtraktiv ranglar - havorang( ) qirmizi (Madenta) va sariq ( ) ranglar nomidan tuzilgan.
M tizimining asosiy ranglari va ulaming qo’shilishi
Oq qog’ozga sariq bo’yoqning surtilishi qaytgan ko’k numing yutilishini bildiradi. Havorang bo’yoq qizil nurni, qirmizi bo’yoq - yashil rangni yutadi. Bo’yoqlar kombinaipyasi yashil, qizil, ko’k, va qora ranglarning qoplanishini ta’minlaydi .
Amalda, bo’yoqlarning ideal emasligi bilan bog’liq holda, qora rangni ranglarni aralashtirish bilan hosil qilish qiyin, shuning uchun printerlarda yana qora rang (black) ham ishlatiladi. Unda model M V deb ataladi.
SHuni ham ta’kidlash lozimki, har qanday bo’yoq ham yuqorida ko’rsatilgan M ranglari ayirmasini ta’minlayvermaydi. Bu haqida quyida to’laroq keltirilgan.
Quydagi jadvalda R( В va M modellaridagi ba’zi ranglar keltirilgan
Rang
|
RGB modeli
|
|
|
M modeli
|
|
|
R
|
|
в
|
C
|
M
|
|
Qizil
|
1
|
0
|
0
|
0
|
1
|
1
|
Sariq
|
1
|
1
|
0
|
0
|
0
|
1
|
To’q yashil
|
0
|
1
|
0
|
1
|
0
|
1
|
Havorang
|
0
|
1
|
1
|
1
|
0
|
0
|
Ko’k
|
0
|
0
|
1
|
1
|
1
|
0
|
Qirmizi
|
1
|
0
|
1
|
0
|
1
|
0
|
Qora
|
0
|
0
|
0
|
1
|
1
|
1
|
Oq
|
1
|
1
|
1
|
0
|
0
|
0
|
To form a color with RGB, three light beams (one red, one green, and one bine) must be superimposed (for example by emission from a black screen, or by reflection from a white screen). Each o f the three beams is called a component o f that color, and each o f them can have an arbitrary intensity, from fully off tofully on, in the mixture.
The RGB color model is additive in the sense that the three light beams are added together, and their light spectra add, wavelengthfor wavelength, to make thefinal color's spectrum.
Zero intensity for each component gives the darkest color (no light, considered the black), and full intensity o f each gives a white; the quality o f this white depends on the nature o f the primary light sources, but i f they are properly balanced, the result is a neutral white matching the system's white point. When the intensities for all the components are the same, the result is a shade o fgray, darker or lighter depending on the intensity. When the intensities are different, the result is a colorized hue, more or less saturated depending on the difference o f the strongest and weakest o f the intensities o f the primary colors employed.
When one o f the components has the strongest intensity, the color is a hue near this primary color (reddish, greenish, or bluish), and when two components have the same strongest intensity, then the color is a hue o f a secondary color (a shade o f cyan, magenta or yellow). A secondary color is formed by the sum o f two primary colors o f equal intensity: cyan is green+blue, magenta is red+blue, and yellow is red green. Every secondary color is the complement o f one primary color; when a primary and its complementary secondary color are added together, the result is white: cyan complements red, magenta complements green, and yellow complements blue.
*(8. BarBaraZukinHeiman. PH.D. and others Practical Photoshop© CS6, Level ICopyright €> 2009-2012 by. 53 pg.)
Ranglarning boshqa modellari
RGB modelida mavjud bo’lagn manfiy koeffiiqentlar muammosini hal etish uchun Xalqaro Yoritish Komissiya (СГЕ) tomonidan XYZ kolorimetriya tizimi qabul qilindi. XYOK XYZ tizimida asosiy ranglar sifatida yana uch rang qabul qilindi, ammo bular shartli, real bo’lmagan ranglardir.
YUqorida ко’rib chiqilgan rang modellari u yoki bu tarzda ba’zi asosiy ranglarning qo’shilishidan foydalanadi. Endi esa ulardan boshqacha, alternativ tipga qo’shsa bo’ladigan rang modelini ко’rib chiqamiz.
HSV modelida rang ton N (hue), to’yinganlik S (saturation), yorqinlik yoritilganlik V (value) bilan ifodalanadi. N ning qiymati 0 dan 360 gacha bo’lgan graduslarda o’lchanadi, chunki bu erda kamalak ranglari aylana bo’yicha quyidagi tartibda joylashtiriladi: qizil, zarg’aldoq, sariq, yashil, havorang, ko’k, binafsha. S va V ning qiymati (0... 1) sohada aniqlanadi.
Aylana bo’yicha bir - birlarining ro’parasida joylashgan, ya’ni bir - birlaridan N bo’yicha 180^ ga farq qiluvchi ranglar bir - birlariga qo’shimcha ranglardir. Rangni HSV parametrlari orqali berish grafik tizimlarda tez-tez uchrab turadi, shu bilan birga odatda konus ochilgan holda ko’rsatiladi.
HSV ga o’xshash qurilgan boshqa rang modellari ham mavjud, masalan, HLS (Hue, Lighting, Saturation) modeli ham rang konusidan foydalanadi.
Sanab o’tilgan barcha rang modellari rangni uch parametr bilan bayon etadi. Ular ranglarni ancha keng sohalarda ifodalaydi. Endi esa rang bir son bilan, ammo ranglarning (nozik turlarning) chegaralangan sohasi uchun, beriladigan modelni ko’rib chiqamiz.
Amaliyotda oq-qora (kulrang) yarim tonli tasvirlardan tez-tez foydalaniladi. Kulrang ranglar RC В modelida bir xil tashkil etuvchilar,
ya’ni ri=gi=bi bilan ifodalanadi. SHunday qilib, kulrang tasvirlar uchun uchta sondan foydalanishga zarurat yo’q, birgina sonning o’zi etarli. Bu rang modelini qisqrtirish imkonini beradi. Har bir gradusda yorqinlik El bilan aniqlanadi. E1=0 qora rangga, El ning maksimal qiymati - oq rangga to’g’ri keladi.
Misol tariqasida RC В tizimda berilgan rangli tasvirni kulrang gradauiyadagiga aylantirishni ko’rib chiqamiz (xuddi oq - qora ekranli televizorda rangli filmni ko’rsatish o’xshash holat). Buning uchun quyidagi nisbatan foydalanish mumkin:
U=0,299R+0,587G+0,114B,
bu erda R, va В lar koeffmientlar odamning mos ravishdagi ranglarga turlicha sezgirligini, va, undan tashqari, ularning yig’indisi birga teng ekanligini hisobga oladi. O’z-o’zidan ma’lumki,
teskari almashtirish bo’lmish R=Y,G=Y,B=Y kulranglar gradauiyasidan boshqa natija bermaydi.
Turli rang modellaridan foydalanishga yana bir misol keltiramiz. Rangli fotografiyalarni JPEG formatidagi grafikaviy faylga yozishda R( В modelidan (Y, Co, Cr) modeliga almashtirish amalga oshiriladi. Bu rastr tasviridagi axborot hajmini yanada siqish uchun foydalaniladi. JPEG fayllarini o’qishda qaytadan RGB ga almashtirish bajariladi.
Modellarning turli-tumanligi ulardan turli sohalarda foydalanish bilan bog’liq. Rang modellaridan har biri tasvimi kiritish, uni ekranda ko’rinadigan holatga keltirish (vizualizauiya), qog’ozga pechat qilish, tasvir ustida ishlash, fayllarda saqlash, kolorimetrik hisob-kitoblar va o’lchovlar kabi ayrim operauiyalarni samaraliroq bajarish uchun ishlab chiqilgandir.
Bir modelning boshqasiga almashtirilishi tasvirdagi ranglarning buzilishiga olib kelishi mumkin.
|
| |