1 color chapter 12. 2 3 color models and their applications مدل های رنگ متعدی برای...
TRANSCRIPT
1
Color
Chapter 12
2
3
Color models and their applications
مدل های رنگ متعدی برای نمایش یک سطح رنگی رویصفحه مانیتور ، چاپ تصویر رنگی ، تجزیه تحلیل و
تشخیص اطالعات رنگ و . . . ارائه شده است.
: مدلی است که بکمک آن خصوصیات و مدل رنگرفتار رنگ تحت یک شرایط خاص توصیف میشود.
: چیزی که بعنوان ” نور ” و یا رنگ خصوصیات نورهای متفاوت درک میشود ، عمال یک باند باریک از
اسپکتروم الکترو مغناطیس است.
4
Color models and their applications
5
Color models and their applications
6
Color Spectrum seen by passing a white light through a prism
The observation by Sir Isaac Newton in 1666.
Color Spectrum divided into 6 broad regions:Violet, Blue, green, yellow, orange and red.
Note that a color ends abruptly in this spectrum.
7
Wavelengths comprising the visible range of the electromagnetic spectrum
Note that each color blends smoothly in the next color.Chromatic light spans the electromagnetic spectrum from
Wavelength 400 to 700 nm (10-9m), or 4.3x1014 ~ 7.5x1014 Hertzis our visible spectrum.
8
Sensing illuminated objects
نور سفيد صاطح ميكند. عموما فرض ميشود كه منبع نور ،نور سفيد نوري است كه تقريبا داراي انرژي يكساني براي
همه طول موجها در اسپكتروم قابل رويت ميباشد.
9
Sensing illuminated objects
.درك رنگ يك شئي به سه فاكتور كلي بستگي دارد- Spectrum of energy in various wavelengths illuminating the object
surface.
- The spectral reflectance of object surface
- The spectral sensitivity of the sensor irradiated by the light energy from the object surface.
10
Sensing illuminated objects
يك شئي آبي داراي ماد تشكيل دهنده اي در سطح ميباشد كه وقتيكه نور سفيد به آن ميتابد ، همه
فركانسهاي غير از آبي را جذب و فقط فركانس آبي را باز تاب ميدهد.
برنگ اگر نور قرمز رنگ به اين شئي آبي تابانده شود ،ارغواني ديده ميشود.
اگر اتوموبيلی در زير نور شديد خورشيد قرار گيرد ، از خود صاطح ميكند كه IRگرم ميشود و انرژي در باند
توسط چشم انسان ديده نميشود ولي توسط دوربين قابل تشخيص است. IRهاي
11
Sensors in human visual system
There are 3 sets of Cone sensors sensitive to Red, Green and Blue colors in Retina of eye.
These cone sensors have relatively different response to these colors in different humans.
But they have a general behavior in the response.
12
Absorption of light by the red, green and blue cones in the human eye as a function of wavelength
Note, the dominating range of green wavelength that is present in the entire visible spectrum.
13
The Chromaticity diagram
مرکزی بنام1931در سال (International commission on Illumination )CIE
استاندارد ریاضی را پیشنهاد نمود که بر اساس آن کلیه رنگ ها را بتوان نمایش داد.
مقادیری که بکمک آنها رنگ ها نمایش داده میشوند ، نامیده میشوند.CIEپارامتر های
14
The Chromaticity diagram
The Chromaticity diagram
مینامند Chromaticity values را x, yپارامتر های
x + y + z = 1 z = 1 – (x+y)
که مقادیر کروماتیستی x , y بنا براین با استفاده از
رنگ هستند ، کلیه رنگ ها را در فضای دو بعدی بنام دیاگرام
CIE chromaticity .میتوانیم نمایش دهیم
15
16
The Chromaticity diagram
17
Chromaticity DiagramAny color can be located as a point on the Chromaticity Diagram
ZYX
Yy
ZYX
Xx
ZYX
Yy
The pointmarked greenhas 62% Green25% Red and approx.13% Blue.
18
Typical color gamut ( محدوده) of color monitors (triangle) and color printing devices (irregular region)
The boundary of color printing gamut is irregular,
Because, color printing is acombination of additive andsubtractive color mixing.
A process that is much more difficult to control.
But display of colors on monitors is just anaddition of three highly controllable light primaries.
19
20
قرار دارند صادق Cقاعده فوق برای نقاطی که در زیر نقطه سفید نیست.
قطع میکند.Cp را در نقطه purple line خط CC2خط هستند ، از رنگهایpurple lineکلیه رنگ هائی که بر روی
non-spectral هستند ، که طول موج آنها در اسپکتروم قابل رویت قرارندارند.
یعنی Cp از روی رنگ مکمل C2بنا بر این طول موج غالب رنگ نقطه Csp.بدست می آید
21
22
Achromaticرا تصاوير Monochromeتصاوير مينامند ،
چون اطالعات رنگ در آنها وجود ندارد.
23
RGB Color Model تئوری بینائیTristimulus بر این مبنا استوار است که چشم انسان
در coneدرک رنگ را بر اساس تحریک شدن سه مجموعه عصب شبکیه چشم انجام میدهد.
فرض میشود که حد اکثر طول موج حس شده توسط این سیستم بهاندازه
630 nmبرای قرمز ” برای سبز 530 ” برای آبی باشد.450
رنگ تشخیص داده بستگی به پارمتر های متعدی دارد که از جمله ”میزان روشنائی منبع نور ” است.
24
RGB Color Model
تئوری فوق زیر بنای مدل رنگRGB است که برای تصویر و همچنین برای نمایش CCDبرداری توسط دوربین های
تصویر رنگی بر روی صفحه مانیتور بکار میرود.
در بسیاری از کاربرد ها مقادیرRGB:را نرماالیز میکنند
رنگ مورد نظر
25
RGB Color Model
A full color image is used to denote a 24-bit RGB color image.
The total number of colors in 24 bits RGB image is(256)3 = 16,772,216 colors.
26
RGB Color Model
27
RGB, 24 bit color cube, (256)3 = 16,777,216 colors
28
All 216 safe RGB colors. The de facto standard for safe colors, especially in Internet applications.
They are used whenever it is desired that the colors viewed by most people appear the same.
Each safe color is formed by RGB values, but each RGB value can only takeOne of the values of 0, 51, 102, 153, 194 or 255.
Therefore we will have (6)3 = 216 different colors + 16 gray values.
29
The RGB safe-color cubeUnlike the full-colors cube, this cube has valid colors
only on its 6 surface panes.
So the entire surface of the safe-color cube is covered by 3x6x6=216 different colors.
30
CMY and CMYK color models
از این مدل رنگ برای چاپ عکس های رنگی از طریق استفاده yellow , Magenta, Cyanترکیب رنگ های
میشود.
همانطور که میدانید رنگCyan از طریق اضافه کردن رنگ سبز به آبی بدست می آید.
وقتیکه نور سفید به جوهر رنگcyan ، میتابد ، نور باز تاب شده نباید هیچ جزء مربوط به رنگ قرمز را در خود داشته باشد.
جذب میشود و یا بعبارت Cyan یعنی نور قرمز توسط جوهر دیگر جزء قرمز از رنگ سفید کم میشود.
31
CMY and CMYK color models
32
CMY and CMYK color models
33
YIQ color model,The NTSC television standard for encoding,
luminance (Y) and two Chromaticity values, I and Q
34
YIQ color model
35
YIQ color model
یک راه ساده تبدیل یک تصویر رنگی به تصویر و نمایش آن میباشد.Yمنوکرم ، محاسبه پارامتر
36
YIQ color model
.تبدیل معکوس نیز از رابطه زیر بدست می آید
37
YUV encoding
اين مدل در برخی از محصوالت ويدوئی ديجيتال و بکار JPEG, MPEGالگوريتم های فشرده سازی مانند
ميرود.
ميتوانند با Chrominance و Luminanceدر اين روش تعداد بيت متفاوت کد شوند.
فايل ها را به Digital CCDامروزه بسياری از دوربينهای در خروجی در اختيار کاربر قرار ميدهند , YUVفورمت
و يا با اين فورمت ذخيره ميکنند.
)(877.0
)(493.0
11.059.030.0
YRV
YBU
BGRY
38
HSI color Model
هر نور درک شده توسط انسان دارای یک نور و یا Hueفرکانس غالب است که به آن
رنگ نور گفته میشود.
39
HIS color model
40
Converting RGB to HSI color model
41
The intensity of all colors in any of these planes is given by the position of the plane on the vertical intensity axis.
42
Hue and Saturation in HIS color model.The “dot” is an arbitrary color point. Hue is shown by an angle,
Saturation is measured by a metric distance (the length of vector).
43
The HSI color model based on (left) triangular, (right) circular color planes.
The triangles and circles are perpendicular to the vertical intensity
44
Converting RGB to HSI
GBif
GBifH
360
2/12
1
))(()(
)()(2/1cos
BGBRGR
BRGR
),,min()(
31 BGR
BGRS
)(3
1BGRI
It is assumed that R,G,B values have been normalized to the range [0,1]And the angle θ is measured with respect to the red axis of HSI space.
45
Converting HSI to RGB
Given the value of HSI in the interval [0,1]
We find the corresponding RGB values in the same range.
1. RG sector ( 0 ≤ H ≤ 120)
)60cos(
cos1
H
HSIR
RG
)(1 BRG
)1( SIB
46
Converting HSI to RGB
2. GB sector (120 ≤ H ≤ 240)
H = H -120
R = I (1-S)
B = 1 – (R + G)
)60(
cos1
Hcps
HSIG
G
B
47
Converting HSI to RGB
3. BR sector ( 240 ≤ H ≤ 360 )
H = H -240 G = I ( 1- S)
R = 1 – (G + B)
)60cos(
cos1
H
HSIBR
B
48
HSI components of RGB values of color cube.
Hue Saturation Intensity
The Hue angle for Red is zero, and the angle forAll colors in the circle increases from zero to360 degrees. These values of 0~360 are mapped in the range of0~255 gray scale to make them visible.
49
A new approach, Converting the gray level image to a color image
A different transform is applied for each color band of R,B and BThe outputs fR ,fG ,fB are fed respectively to RGB channels of a color TV monitor.
50
An application in AirportsExplosive detection in luggage
An X-ray imageFrom ordinaryarticles
The same luggage witha block of simulated plastic Explosive.
Applying theTransformFunction of Fig.6.25-a
The Explosiveis clearlydetected.
Applying theTransform functionof Fig.6.25-b
You can see through The Explosive.
51
The transform functions for convertingthe gray-scale image to a color image.
Fig. 6.25
(a)
(b)
52
The transform functions for convertingthe gray-scale image to a color image.
53
The transform functions for convertingthe gray-scale image to a color image.
با تغییر دادن فاز تابع سینوسی هنگام نمایش آن در شکل فوق ، رنگ های متفاوتی برای اشیا مختلف مانند لباس ، زمینه ؛ ماده منفجره
و ... موجود در چمدان بدست خواهد آمد.
54
Constructing one color image using severalmonochrome (Spectral band) images.
Application in Remote sensing.
55
Averaging in color images
In color image, the average of an RGB pixel, is obtained by obtaining the average at the neighborhood of a pixel (x,y) at each image plane, and then,
Construct the output image using the 3 new RGB image planes.
56
Visualization of color components as a gray-scale image in different color models
(Where, dark and bright gray scales represent low and high intensity values, respectively).
Original
CMYK
RGB
HSI
57
Reducing the brightness by 30% Using RGB and HIS models. Note that both models produce the same result.
In RGB, each component is multiplied by a constant k = 0.7, In HIS, only the I component is multiplied by k = 0.7 and the rest are
remained unchanged.
58
Color Complements.The hues directly opposite one another on the color circle, are
called Complements.
رنگهای مکمل برای واضح کردن جزئیات موجود در نواحی تیره یک تصویر رنگی مورد استفاده قرار
.میگیرند
End of Chapter 12
60