🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Intensity & Color (Color vs. Grayscale) PDF

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Document Details

ForemostAntigorite6232

Uploaded by ForemostAntigorite6232

Memorial University of Newfoundland

Dr. Minglun Gong, Dr. Oscar Meruvia-Pastor

Tags

color models computer graphics color theory visual perception

Summary

This document provides notes on intensity and color, including color models, quantization, and other aspects of color theory. Different color models like RGB, CMY, HSV, and YUV are discussed, along with their uses and conversions.

Full Transcript

Intensity & Color (or Color vs. Grayscale) Original Notes by Dr. Minglun Gong Edition by Dr. Oscar Meruvia-Pastor © Copyright Outline Intensity (a.k.a. Luminosity, Brightness, Luminance) Range Quantization Color Color space Color models...

Intensity & Color (or Color vs. Grayscale) Original Notes by Dr. Minglun Gong Edition by Dr. Oscar Meruvia-Pastor © Copyright Outline Intensity (a.k.a. Luminosity, Brightness, Luminance) Range Quantization Color Color space Color models Gong & Meruvia © 2 Range of the Intensity The visible light emitted/reflected from an object varies from very dark to very bright The luminous intensity of a candle is ~1 candela The sunlight is about 100,000 candela per m 2 In nature, there is no upper limit to brightness Relatively hard to capture/represent intensity variations in the whole intensity range The ratio between the maximum and minimum recorded intensities in an image considered is called “dynamic range” Gong & Meruvia © 3 Examples of Dynamic Range Intensity variation smaller than the min is ignored (lack of details in shadowed regions) Intensity value larger than the max is truncated (blow out highlights) Gong & Meruvia © 4 What is High Dynamic Range? Gong & Meruvia © 5 https://en.wikipedia.org/wiki/High-dynamic-range_imaging Quantization of Intensity How to sample the intensity range using a set of discrete numbers? Arithmetic sequence: 𝑰𝟎 = 𝒂, 𝑰𝟏 = 𝒂 + 𝒌, 𝑰𝟐 = 𝒂 + 𝟐𝒌, 𝑰𝟑 = 𝒂 + 𝟑𝒌, … Geometric sequence: 𝑰𝟎 = 𝒂, 𝑰𝟏 = 𝒂 ⋅ 𝒌, 𝑰𝟐 = 𝒂 ⋅ 𝒌𝟐 , 𝑰𝟑 = 𝒂 ⋅ 𝒌𝟑 , … min max Gong & Meruvia © 6 Defining colors WHAT IS RED? (MARY O'NEILL) Red is a sunset For a scientist, color is a Blazing and bright. Red is feeling brave vector quantity, and for With all your might. a computer scientist red Red is a sunburn is, in most cases, Spot on your nose. Sometimes red represented by the Is a red, red rose. vector (255,0,0) in the Red squiggles out RGB color model! When you cut your hand Red is a brick And the sound of a band. Red is hotness You get inside When you're embarrassed And want to hide. Fire-cracker, fire-engine Fire clicker red - Gong & Meruvia © 7 Color A color can be defined using red, green, & blue wavelength combinations Some colors need negative weight for red CIE (Commission Internationale de l’Éclairage) defined 3 standard primaries: X, Y, & Z Can match all visible colors using only positive weights Gong & Meruvia © 8 CIE Chromaticity Diagram and Color Spaces Chromaticity diagram is the 𝑿 + 𝒀 + 𝒁 = 𝟏 plane in the CIE space Can be considered as the colors of lights that have the same total amount of energy Gong & Meruvia © 9 Monitor Gamut The range of colors that can be shown on a specific display device is called gamut The gamut of a typical monitor does not cover the entire CIE space The corners of the triangle depend on the emittance of the phosphors of the monitor Certain colors cannot be shown Gong & Meruvia © 10 Color Model Families RGB: Red, green, & blue CMY & CMYK: Cyan, magenta, yellow (& black) HSV & HSL: Hue, saturation, & value (lightness) YUV & YIQ Gong & Meruvia © 11 RGB Model & the Color Cube Additive color model: Red + Blue = Magenta Blue + Green = Cyan Green + Red = Yellow Red + Blue + Green = White 0.5Red+0G+0.2B = 0.5, 0, 0.2 = ? Used by most light emitting displays such as monitors and projectors Gong & Meruvia © 12 RGB Color Channels Decomposition Gong & Meruvia © 13 sRGB vs. Adobe RGB sRGB (standard RGB) is an RGB color space created by HP & Microsoft Matches what CRT monitors can display Adobe RGB is an RGB color space developed by Adobe in 1998 Has a larger gamut than sRGB https://fstoppers.com/pictures/adobergb -vs-srgb-3167 Gong & Meruvia © 14 CMY Model Subtractive color mode is based on pigment reflectance, as materials only reflect the light they do not absorb: Cyan (C) absorbs red Magenta (M) absorbs green wavelengths Yellow (Y) absorbs blue Used by color printers and reflective media systems Gong & Meruvia © 15 Converting between RGB & CMY RGB → CMY C=1–R M=1–G Y=1–B CMY → RGB R=1–C G=1–M B=1–Y Gong & Meruvia © 16 CMYK Model Adding the 4th ink to color: Black (K) Use black ink directly instead of mixing color inks Convert from CMY to CMYK K = min(C, M, Y) C´ = C – K M´ = M – K Y´ = Y – K Gong & Meruvia © 17 HSV/HSB vs. HSL Model User-oriented color models: Hue – Dominant wavelength Saturation – Excitation purity from white to Hue Value – Luminance from 0 to HS HSL model is similar: Uses Lightness instead of Value Chroma/Saturation is the transition from greyscale to the chosen Gong & Meruvia © 18 hue Converting RGB to HSV or RGB to HSL Max = max(R, G, B); Max = max(R, G, B); Min = min(R, G, B); Min = min(R, G, B); V = Max; L = (Max + Min) / 2; if (Max == 0) if (Min == Max) S = 0; S = 0; else else if (L ≤ ½) S = 1 – Min / Max; S = (Max – Min) / 2L; … else S = (Max – Min) / (2 – Converting HSB/HSV to HSL 2L); https://stackoverflow.com/questions/34 … 23214/convert-hsb-hsv-color-to-hsl PYTHON RGB AND HSV CONVERSION RGB to HSL conversion formula (PYTHON RECIPE BY MICHAEL @ RapidTables.com FOGLEMAN @ ACTIVE STATE) Gong & Meruvia © 20 YUV Model Human visual system (HVS)-based color model One luminance channel (Y) Two chrominance channels Used in PAL analog Chrominance is defined video & digital video as the difference between a color and a Human eyes are more reference white at the sensitive to luminance same luminance than to chrominance 5.5 MHz for Y 1.8 MHz each for U & V Gong & Meruvia © 21 YIQ Model Aligns with human’s color perception sensitivities: Y is the brightness I is the orange-blue axis: Used in NTSC color TV I = V*cos33° - broadcasting U*sin33° Y is the brightness Q is the purple-green Eyes are most sensitive axis: to Y, then to I, then to Q Q= V*sin33° + 4.2 MHz for Y U*cos33° 1.5 MHz to I 0.55 MHz to Q Gong & Meruvia © 22 Converting RGB to YUV or RGB to YIQ Y = 0.299*R + 0.587*G Y = 0.299*R + 0.587*G + 0.114*B + 0.114*B U = 0.492 * (B - Y) I = 0.596*R - 0.275*G - V = 0.877 * (R - Y) 0.321*B Q = 0.212*R - 0.523*G + 0.311*B Gong & Meruvia © 23 But… Why do we have so many color models? Some are older and some are newer. Some are more convenient and intuitive to use for artists (HSV & HSL) Some color models are closely related to the display hardware (RGB). Some are more designed to fit the some of the characteristics of the Human Visual System (YIQ & YUV). Some were developed in different regions of the world at roughly the same time (YIQ/YUV). Some are more convenient for software developers (RGB) Gong & Meruvia © 24 Homework: Check out these Online Resources Color Models & their Meanings! (11m19s) https://www.youtube.com/watch?v=CF4wuPLBaAA Color tutorial: Understanding color spaces | lynda.com (6m) https://www.youtube.com/watch?v=KKX08oOTMkk JPEG Color spaces by Computerphile (7m 30s) https://www.youtube.com/watch?v=LFXN9PiOGtY The HSV color model by Thales Sehn Körting (2mins) https://www.youtube.com/watch?v=NAw2_NtGNaA Beginning Graphic Design: Color (6m 32s) https://www.youtube.com/watch?v=_2LLXnUdUIc HSV Color Theory For Digital Artists (6’) https://www.youtube.com/watch?v=6tyumG7W1lQ Gong & Meruvia © 25 TopHat-evaluated Homework: THE NATURE OF THINGS’ Living Colour (44’) Link available on lecture slides for: 01_visual_perception_OM Evaluation on next Monday! Gong & Meruvia © 27

Use Quizgecko on...
Browser
Browser