Visible Color. 700 (red) 580 (yellow) 520 (green)

Similar documents
Physical Color. Color Theory - Center for Graphics and Geometric Computing, Technion 2

Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

CS452/552; EE465/505. Color Display Issues

CS635 Spring Department of Computer Science Purdue University

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Lecture 12 Color model and color image processing

Reading. 2. Color. Emission spectra. The radiant energy spectrum. Watt, Chapter 15.

Illumination and Shading

Game Programming. Bing-Yu Chen National Taiwan University

Fall 2015 Dr. Michael J. Reale

Main topics in the Chapter 2. Chapter 2. Digital Image Representation. Bitmaps digitization. Three Types of Digital Image Creation CS 3570

The Display pipeline. The fast forward version. The Display Pipeline The order may vary somewhat. The Graphics Pipeline. To draw images.

Digital Image Processing COSC 6380/4393. Lecture 19 Mar 26 th, 2019 Pranav Mantini

Digital Image Processing. Introduction

Digital Image Processing

Lecture 1 Image Formation.

Computer Graphics. Bing-Yu Chen National Taiwan University

The Elements of Colour

Visualisatie BMT. Rendering. Arjan Kok

3D graphics, raster and colors CS312 Fall 2010

Image Formation. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Introduction to Computer Graphics with WebGL

Colour Reading: Chapter 6. Black body radiators

Color, Edge and Texture

Image Analysis. 1. A First Look at Image Classification

(0, 1, 1) (0, 1, 1) (0, 1, 0) What is light? What is color? Terminology

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Chapter 4 Color in Image and Video

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Color. making some recognition problems easy. is 400nm (blue) to 700 nm (red) more; ex. X-rays, infrared, radio waves. n Used heavily in human vision

Lecture 11. Color. UW CSE vision faculty

CS 445 HW#6 Solutions

Light Transport Baoquan Chen 2017

Chapter 5 Extraction of color and texture Comunicação Visual Interactiva. image labeled by cluster index

Introduction to color science

Image Analysis and Formation (Formation et Analyse d'images)

Image Processing. Color

INTRODUCTION. Slides modified from Angel book 6e

Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008

Computer Graphics Lecture 2

Mech 296: Vision for Robotic Applications

ITP 140 Mobile App Technologies. Colors

Announcements. Lighting. Camera s sensor. HW1 has been posted See links on web page for readings on color. Intro Computer Vision.

ECE-161C Color. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

The Viewing Pipeline Coordinate Systems

Pop Quiz 1 [10 mins]

Introduction to Video and Image Processing

CS 111: Digital Image Processing Fall 2016 Midterm Exam: Nov 23, Pledge: I neither received nor gave any help from or to anyone in this exam.

Color Dithering with n-best Algorithm

CS770/870 Spring 2017 Color and Shading

SRM INSTITUTE OF SCIENCE AND TECHNOLOGY

Lecture #13. Point (pixel) transformations. Neighborhood processing. Color segmentation

The exam begins at 2:40pm and ends at 4:00pm. You must turn your exam in when time is announced or risk not having it accepted.

Image Formation. Camera trial #1. Pinhole camera. What is an Image? Light and the EM spectrum The H.V.S. and Color Perception

Noise Model. Important Noise Probability Density Functions (Cont.) Important Noise Probability Density Functions

Image Acquisition Image Digitization Spatial domain Intensity domain Image Characteristics

Motivation. Intensity Levels

Color Space Transformations

UNIT-2 IMAGE REPRESENTATION IMAGE REPRESENTATION IMAGE SENSORS IMAGE SENSORS- FLEX CIRCUIT ASSEMBLY

Graphics Hardware and Display Devices

CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Basic relations between pixels (Chapter 2)

CIE L*a*b* color model

this is processed giving us: perceived color that we actually experience and base judgments upon.

CS 464 Review. Review of Computer Graphics for Final Exam

Polytechnic Institute of NYU Fall 2012 EL5123/BE DIGITAL IMAGE PROCESSING

What is it? How does it work? How do we use it?

National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor

Hue, Saturation & Intensity

Introduction to Computer Science (I1100) Data Storage

Color to Binary Vision. The assignment Irfanview: A good utility Two parts: More challenging (Extra Credit) Lighting.

CHAPTER 3 FACE DETECTION AND PRE-PROCESSING

Survey in Computer Graphics Computer Graphics and Visualization

Computer Graphics MTAT Raimond Tunnel

All forms of EM waves travel at the speed of light in a vacuum = 3.00 x 10 8 m/s This speed is constant in air as well

Lighting. Camera s sensor. Lambertian Surface BRDF

Spectral Color and Radiometry

COMP3421. Global Lighting Part 2: Radiosity

Sources, Surfaces, Eyes

When this experiment is performed, subjects find that they can always. test field. adjustable field

Laboratory of Applied Robotics

Digital Image Processing. Week 4

Color Image Processing

CS 4495 Computer Vision. Segmentation. Aaron Bobick (slides by Tucker Hermans) School of Interactive Computing. Segmentation

Scalar Visualization

CHAPTER 3 COLOR MEASUREMENT USING CHROMATICITY DIAGRAM - SOFTWARE

Lecture 1. Computer Graphics and Systems. Tuesday, January 15, 13

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

What is an Image? Image Acquisition. Image Processing - Lesson 2. An image is a projection of a 3D scene into a 2D projection plane.

3. Raster Algorithms. 3.1 Raster Displays. (see Chapter 1 of the Notes) CRT LCD. CS Dept, Univ of Kentucky

Image Processing: Final Exam November 10, :30 10:30

Chapter - 2 : IMAGE ENHANCEMENT

Digital Halftoning. Prof. George Wolberg Dept. of Computer Science City College of New York

Extensions of One-Dimensional Gray-level Nonlinear Image Processing Filters to Three-Dimensional Color Space

Scalar Field Visualization I

CS130 : Computer Graphics Lecture 2: Graphics Pipeline. Tamar Shinar Computer Science & Engineering UC Riverside

Multimedia Databases. 2. Summary. 2 Color-based Retrieval. 2.1 Multimedia Data Retrieval. 2.1 Multimedia Data Retrieval 4/14/2016.

Computing for Scientists Visualization (VIS) (April 02, 2013 April 18, 2013) Jie Zhang Copyright

11. Image Data Analytics. Jacobs University Visualization and Computer Graphics Lab

Transcription:

Color Theory

Physical Color Visible energy - small portion of the electro-magnetic spectrum Pure monochromatic colors are found at wavelengths between 380nm (violet) and 780nm (red) 380 780 Color Theory - Center for Graphics and Geometric Computing, Technion 2

Visible Color Eye can perceive other colors as combination of several pure colors Most colors may be obtained as combination of small number of primaries Output devices exploits this phenomena 580 (yellow) 520 (green) 700 (red) Color Theory - Center for Graphics and Geometric Computing, Technion 3

Gamma Correction The CRT devices are not linear The amount of light emitted from the CRT screen is not linearly proportional to the voltage applied to its tube. If V min and V max are considered black and white intensities, respectively, (V min + V max ) / 2 is not 50% gray. Color Theory - Center for Graphics and Geometric Computing, Technion 4

Gamma Correction (cont d) A little bit of electronics: The electronic tube s (including CRT s) characteristic graph of the current I with respect to its voltage V is a polynomial function of the form I = kv β (for semiconductor devices, I = k e dv ) The power reaching the eye is W = IV =V kv β = kv γ Assume n intensity levels, I j, 1 j n on a linear scale. We seek the voltage require for each of these intensity levels, I j Color Theory - Center for Graphics and Geometric Computing, Technion 5

We have I j =kv j γ or Gamma Correction (cont d) V j = (I j / k) 1/γ This voltage computation that compensates for the nonlinearity of the CRT is denoted Gamma Correction Each CRT has its own γ value that the manufacturer provides with the CRT. Typically γ [2, 3] Color Theory - Center for Graphics and Geometric Computing, Technion 6

Non-Linearity of the Eye The human eye is sensitive to intensity of light logarithmically. Given four light sources of relative intensities of 1, 2, 9 and 10, the eye will distinguish between 1 and 2 much easier than between 9 and 10. It is therefore better to select our intensity levels on an exponential scale: I j+1 = r I j for some unknown constant r. Assume we have n = 256 intensity levels. Question: How can we derive r? Color Theory - Center for Graphics and Geometric Computing, Technion 7

Non-Linearity of the Eye (cont d) If I 0 =L 0 and I 255 =L 1, then, Or L 1 = I 255 = I 0 r 255 = L 0 r 255 r = (L 1 / L 0 ) 1/255 The factor of (L 1 / L 0 ) is know as the dynamic range of the CRT From practical tests r should be at most 1.01 for the eye to see the different gray levels continuously Color Theory - Center for Graphics and Geometric Computing, Technion 8

Mach Banding Another (very important to predators) property of animal and human eyes is the ability to perform edge/motion detection Named after Mach who discovered this phenomena in 1865, Mach banding could be seen in poor imagery Mach bands are seen in conjunction with C -1 and C 0 continuous surfaces. Color Theory - Center for Graphics and Geometric Computing, Technion 9

Dynamic Range The Human eye has a huge dymanic range See in full day light See in moon light 8 Bits has difficulties covering such a large range Modern graphics systems supports more bits per color (New NVidia/ATI graphics cards support 32 bits per color or 128 bits per pixel!) Algorithms were developed in recent years to support and merge several low range images into one image and display it on contemporary hardware Color Theory - Center for Graphics and Geometric Computing, Technion 10

Dynamic Range (cont d) Color Theory - Center for Graphics and Geometric Computing, Technion 11

Dynamic Range (cont d) Color Theory - Center for Graphics and Geometric Computing, Technion 12

Dynamic Range (cont d) Color Theory - Center for Graphics and Geometric Computing, Technion 13

Dynamic Range (cont d) Color Theory - Center for Graphics and Geometric Computing, Technion 14

The CIE Diagram (1931 & 1976) Universal standard Color (ignoring intensity) represented as affine combination of 3 primaries X, Y, Z x = X / (X + Y + Z). Same for y and z. Note x + y + z = 1 Y is selected to specifically follow the human-eye sensitivity. Z Y X 400nm 500nm 600nm 700nm Color Theory - Center for Graphics and Geometric Computing, Technion 15

CIE Diagram (1931 & 1976) Universal standard Color (ignoring intensity) represented as affine combination of 3 primaries X, Y, Z 3D vector (x,y,z) s. t. x+y+z=1 Colors are in the interior of rightangle unit triangle formed by two of the primaries Not all possible colors are visible Visible colors contained in horseshoe region Pure colors (hues) located on boundary of the region Color Theory - Center for Graphics and Geometric Computing, Technion 16

The CIE Diagram (cont d) In 3 space the plot of x, y, z looks as in the drawing on the right Not all possible colors are visible Visible colors contained in horse-shoe region Pure colors (hues) located on boundary of the region Consider the plot of x, y only once x, y are known so is z. 400nm Z Y X 500nm 600nm 700nm Color Theory - Center for Graphics and Geometric Computing, Technion 17

The CIE Diagram (cont d) Color white is point W=(1/3,1/3,1/3) Any visible color C is blend of a hue C and W Purity of color measured by its saturation: y D W C C d 1 d 2 x saturation(c) = d 1 d + 1 d 2 Complement of C is (only) other hue D on line through C and W Color Theory - Center for Graphics and Geometric Computing, Technion 18

The CIE Diagram (cont d) Color enhancement of an image increasing the saturation of the colors moves them towards the boundary of the visible region unsaturated saturated Color Theory - Center for Graphics and Geometric Computing, Technion 19

Color Gamuts Not every color output device is capable of generating all visible colors in CIE diagram y Usually color generated as affine combination of three primaries P, Q, R Possible colors bounded by triangle in XYZ space with vertices P, Q, R This triangle is called the output device s gamut P W Q R x Color Theory - Center for Graphics and Geometric Computing, Technion 20

Color Gamuts (cont d) Example: Primaries of low quality color monitor: y RED P.628.346.026 = = GREEN Q.286.588.144 BLUE R.150.070. 780 x Different color displays use different P, Q, R Same RGB image data, displayed on two monitors will look different! Question: Given P,Q,R of two color monitors and image I, what must be done in order for I to look the same on both monitors? Color Theory - Center for Graphics and Geometric Computing, Technion 21

The RGB Color Model Common in describing emissive color displays Red, Green and Blue are the primary colors in this model Color (including intensity) described as combination of primaries colormodels Color Theory - Center for Graphics and Geometric Computing, Technion 22

The RGB Color Model C G B W M Y colormixing R Col = rr + gg + bb r,g,b [0, 1] Yellow = Red+Green (1, 1, 0) Cyan = Green+Blue (0, 1, 1) Magenta = Red+Blue (1, 0, 1) White = Red+Green+Blue (1, 1, 1) Gray = 0.5 Red+0.5 Blue+0.5 Green (0.5, 0.5, 0.5) Main diagonal of RGB cube represents shades of gray Color Theory - Center for Graphics and Geometric Computing, Technion 23

The CMY Color Model Used mainly in color printing, where the primary colors are subtracted from the background white. Cyan, Magenta and Yellow primaries are the complements of Red, Green and Blue Primaries (dyes) subtracted from white paper which absorbs no energy Red = White-Cyan = White-Green-Blue (0, 1, 1) Green = White-Magenta = White-Red-Blue (1, 0, 1) Blue = White-Yellow = White-Red-Green (1, 1, 0) (r,g,b) = (1-c,1-m,1-y) C G Bl B Y R M Color Theory - Center for Graphics and Geometric Computing, Technion 24

The YIQ Color Model Human eye more sensitive to changes in luminance (intensity) than to changes in hue or saturation Luminance useful for displaying grayscale version of color signal (e.g. B&W TV) Luminance Y affine combination of R,G & B I & Q null blend (zero sum) of R,G & B Conversion 0.30 ( y, i, q) = ( r, g, b) 0.59 0.11 0.60 0.28 0.32 Green component dominates luminance value 0.21 0.52 0.31 Color Theory - Center for Graphics and Geometric Computing, Technion 25

The HSV Color Model People naturally mix colors based on Hue, Saturation and Value Resulting coordinate system is cylindrical H angle around V axis S [0,1] distance from V axis V [0,1] - luminance R Y M 120 240 V 1.0 W G B colormodels 0 C Color Theory - Center for Graphics and Geometric Computing, Technion 26 H S

Color Quantization High-quality color resolution for images - 8 bits per primary = 24 bits = 16.7M different colors Reducing number of colors select subset (colormap/pallete) and map all colors to the subset Used for devices capable of displaying limited number of different colors simultaneously. E.g. an 8 bit display. R 0 quantization to 4 colors reps B Color Theory - Center for Graphics and Geometric Computing, Technion 27

Color Quantization Example 256 colors 64 colors 16 colors 4 colors Color Theory - Center for Graphics and Geometric Computing, Technion 28

Color Quantization Issues How are the representative colors chosen? Fixed representatives, image independent - fast Image content dependent - slow Which image colors are mapped to which representatives? Nearest representative - slow By space partitioning - fast R 0 quantization to 4 colors reps B Color Theory - Center for Graphics and Geometric Computing, Technion 29

Choosing the Representatives R uniform quantization to 4 colors image-dependent quantization to 4 colors R 0 B 0 B large quantization error small quantization error Color Theory - Center for Graphics and Geometric Computing, Technion 30

Uniform Quantization Fixed representatives - lattice structure on RGB cube Image independent - no need to analyze input image Some representatives may be wasted Fast mapping to representatives by discarding least significant bits of each component Common way for 24 8 bit quantization retain 3+3+2 most significant bits of R, G and B components R uniform quantization to 4 colors 0 B large quantization error Color Theory - Center for Graphics and Geometric Computing, Technion 31

Median-Cut Quantization Image colors partitioned into n cells, s.t. each cell contains approximately same number of image colors Recursive algorithm Image representatives - centroids of image colors in each cell Image color mapped to rep. of containing cell not necessarily nearest representative R image-dependent quantization to 4 colors 0 B small quantization error Color Theory - Center for Graphics and Geometric Computing, Technion 32

Quantization uniform 256 colors median-cut 8 colors Color Theory - Center for Graphics and Geometric Computing, Technion 33

Binary Dithering Improve quality of quantized image by distributing quantization error original threshold dithered Color Theory - Center for Graphics and Geometric Computing, Technion 34

Binary Dithering B&W Threshold map upper half of gray-level scale to white and lower half to black If else 1 I ( i, j) > 2 I ( i, j) = 1; I ( i, Each pixel produces some quantization error Distribute quantization error use local threshold Use matrix of thresholds for each n n pixels If else end; I ( i, I ( i, I ( i, j) j) j) > = = M 1 0 mod n, Color Theory - Center for Graphics and Geometric Computing, Technion 35 ( i j) j = 0; mod n )

Dithering For four color input use 2 2 matrix (gray levels 0 to 255) 1 1 0 2 128 64 1 1 3 1 threshold dither dither For 16 gray-levels use 4 4 matrix (gray levels 0 to 255) 0 12 16 3 15 8 4 11 7 2 14 1 13 10 6 9 5 How to build n n matrix for n 2 gray-levels? Build matrix to generate 2 k final colors? Build 4 4 matrix from 256 gray-levels? Color Theory - Center for Graphics and Geometric Computing, Technion 36

Halftoning Displaying (printing) image on device with lower color range & higher resolution Most common in printing (high dpi) Pixels grouped together group pattern used to replace color-scale E.g. 2x2 blocks emulating 5 gray-scale levels Color Theory - Center for Graphics and Geometric Computing, Technion 37

Quantization + Dithering uniform uniform + dithering median-cut 8 colors median-cut + dithering Color Theory - Center for Graphics and Geometric Computing, Technion 38

Error Diffusion Reduce quantization error by propagating accumulated error from pixel to (some of) its neighbors in scanline order before thresholding FloydSteinberg(I) For x := 1 to XMax do For y := 1 to YMax do err := I(x,y)-(I(x,y)>128)*255; I(x,y) := (I(x,y)>128)*255; I(x+1,y) := I(x+1,y)+err*7/16; I(x-1,y+1) := I(x-1,y+1)+err*3/16; I(x,y+1) := I(x,y+1)+err*5/16; I(x+1,y+1) := I(x+1,y+1)+err*1/16; end end 3 7 5 1 dither error-diffusion Note: error propagation weights must sum to one Color Theory - Center for Graphics and Geometric Computing, Technion 39

Error Diffusion (cont d) Here are more examples of FS dithering the Utah teapot: Color Theory - Center for Graphics and Geometric Computing, Technion 40