Color. Summary Color is complex The human visual system is complex and very good at processing light Together they comprise a system that we aren’t even.

Slides:



Advertisements
Similar presentations
Image Data Representations and Standards
Advertisements

Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
A Digital Imaging Primer Nick Dvoracek Instructional Resources Center University of Wisconsin Oshkosh.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Color & Light, Digitalization, Storage. Vision Rods work at low light levels and do not see color –That is, their response depends only on how many photons,
Topic 4 - Image Mapping - I DIGITAL IMAGING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Histograms – Chapter 4 Continued.
HISTOGRAM TRANSFORMATION IN IMAGE PROCESSING AND ITS APPLICATIONS Attila Kuba University of Szeged.
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
HISTOGRAM TRANSFORMATION IN IMAGE PROCESSING SHINTA P TEKNIK INFORMATIKA STMIK MDP 2011.
School of Computing Science Simon Fraser University
CS 4731: Computer Graphics Lecture 24: Color Science
Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-
CIS 310: Visual Programming, Spring 2006 Western State College 310: Visual Programming Ray Tracing.
School of Computer Science & Information Technology G6DPMM - Lecture 6 Colour Science & Colour Models.
09/12/02 (C) 2002, University of Wisconsin, CS 559 Last Time Color and Color Spaces –Recall RGB and XYZ Programming assignment 2.
01/31/02 (C) 2002, UNiversity of Wisconsin, CS 559 Last Time Color and Color Spaces.
9/14/04© University of Wisconsin, CS559 Spring 2004 Last Time Intensity perception – the importance of ratios Dynamic Range – what it means and some of.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
Tal Mor  Create an automatic system that given an image of a room and a color, will color the room walls  Maintaining the original texture.
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
Colour Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour.
The Digital Image.
2001 by Jim X. Chen: 1 The purpose of a color model is to allow convenient specification of colors within some color gamut.
Any questions about the current assignment? (I’ll do my best to help!)
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Lab #5-6 Follow-Up: More Python; Images Images ● A signal (e.g. sound, temperature infrared sensor reading) is a single (one- dimensional) quantity that.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
1 Color. 2 What is Color Try describing the color “red” to a blind person Color is merely a concept, something we “see” within our minds –It’s interpretation.
2/3/04© University of Wisconsin, CS559 Spring 2004 Last Time Color –Transforming between two color spaces –A gamut is the set of displayable colors in.
I-1 Steps of Image Generation –Create a model of the objects –Create a model for the illumination of the objects –Create an image (render) the result I.
Computer Graphics Raster Devices Transformations Areg Sarkissian.
Manipulating contrast/point operations. Examples of point operations: Threshold (demo) Threshold (demo) Invert (demo) Invert (demo) Out[x,y] = max – In[x,y]
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
Color Dr. Craig Reinhart. What is Color? Color is merely a concept, something we “see” within our minds –It’s interpretation involves both physics and.
Point Operations – Chapter 5. Definition Some of the things we do to an image involve performing the same operation on each and every pixel (point) –We.
September 17, 2013Computer Vision Lecture 5: Image Filtering 1ColorRGB HSI.
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
CSC361/ Digital Media Burg/Wong
Which is the Pink Pen? Here is the Pink Pen (Example taken from
Optimizing Web Graphics Session #6 INP150. Image Types Types  Bitmap / Raster---dots  Bitmap images are made of individual pixels arranged in patterns.
1 Artificial Intelligence: Vision Stages of analysis Low level vision Surfaces and distance Object Matching.
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
09/17/02 (C) 2002, University of Wisconsin, CS 559 Last Time Color Spaces File formats.
Color Dr. Craig Reinhart. What is Color? Color is merely a concept, something we “see” within our minds –It’s interpretation involves both physics and.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Image Manipulation CSC361/661 – Digital Media Spring 2002 Burg/Wong.
COMPUTER GRAPHICS. Can refer to the number of pixels in a bitmapped image Can refer to the number of pixels in a bitmapped image The amount of space it.
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
Digital Images are represented by manipulating this…
Hank Childs, University of Oregon Volume Rendering, pt 1.
Computer Science 121 Scientific Computing Winter 2014 Chapter 14 Images.
3-1 Chapter 3: Image Display The goodness of display of an image depends on (a) Image quality: i) Spatial resolution, ii) Quantization (b) Display device:
David Luebke 1 2/5/2016 Color CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
TOPIC 4 INTRODUCTION TO MEDIA COMPUTATION: DIGITAL PICTURES Notes adapted from Introduction to Computing and Programming with Java: A Multimedia Approach.
David Luebke2/23/2016 CS 551 / 645: Introductory Computer Graphics Color Continued Clipping in 3D.
Graphics II Image Processing I. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia Technology course of University.
ECE 638: Principles of Digital Color Imaging Systems Lecture 12: Characterization of Illuminants and Nonlinear Response of Human Visual System.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Initial Display Alternatives and Scientific Visualization
Half Toning Dithering RGB CMYK Models
Week 7 - Monday CS361.
ECE 638: Principles of Digital Color Imaging Systems
Computer Vision Lecture 4: Color
Color Model By : Mustafa Salam.
Presentation transcript:

Color

Summary Color is complex The human visual system is complex and very good at processing light Together they comprise a system that we aren’t even close to understanding but utilize very effectively

Other Related Topics And what good talk on color would dare to leave out these topics…

The GretagMacBeth TM ColorChecker®

The JOBO Card

Gamma RGB values from a camera (for instance) are linear RGB values viewed on a monitor are non-linear Gamma correction is a non-linear pre-adjustment of the linear RGB values to match (or meet the expectations of) the non-linear human visual system when viewing a non-linear monitor Implemented as a look-up table R’G’B’ RGB

Gamma Correction Linear RGB from camera Uncorrected Linear RGB on monitor Corrected Linear RGB from camera Corrected Linear RGB on monitor

Alpha In computer graphics, we often speak of 32- bit RGB The additional 8-bits is not another color basis, but rather a value called Alpha Alpha defines how colors combine with one another in an operation called Alpha Blending

Alpha Blending In 3D computer graphics objects naturally obscure other objects Depending on the make-up of the object in front –You may not see the object in back, the object in front is opaque –You may only see the object in back, the object in front is translucent –You may see some combination of both objects

Alpha Blending The specification of an objects opacity is done through alpha The basic formula is one of linear interpolation The alpha value of the object in back is ignored In the event that we have multiple objects stacked, then the z-buffer rendering performs this calculation in order, back to front

Color Space Quantization There are times (used to be times?) when our hardware does not (did not?) support 2 24 (24-bit) colors The alternative is (was?) typically an 256 (8-bit) color palette system –This is what the GIF file format supports The question then arises as to which 256 colors we should choose

Scalar Quantization Create 256 uniformly spaced bins Place actual colors into the closest bin Simply put, divide the components (or just drop low order bits) Does not account for non-uniform distribution of colors in a scene (and therefore doesn’t work very well) But it’s easy to implement

Color Space Quantization The popularity (populosity) algorithm prescribes that we select the 256 most frequently used colors in the scene we are displaying Create a histogram of all 2 24 possible colors Keep only the top 256

Popularity (Populosity) Algorithm COUNT COLOR INDEX Color Frequency Histogram Create color frequency histogram Sort histogram by count Keep the 256 colors with the largest counts Convert all other scene colors to the closest kept color

Popularity (Populosity) Algorithm This algorithm works fine for a small amount of original scene colors (relative to the target number of colors) When the number of different colors in the original scene is much greater than the target number, the algorithm breaks down –Especially where small scene objects are concerned

Median-Cut Algorithm Rather than just histogram and keep the most popular colors, the median-cut algorithm attempts to find colors that represent equal numbers of colors in the original scene –Map color pixels onto the color cube –Recursively split the cube into smaller cubes, attempting to keep the number of pixels in each cube the same –The procedure ends when n (the target number of colors) cubes are created –The centroids of the cubes are the retained colors –All other pixel colors in each cube are set to the cube centroid color

Quantization But what happens when the number of available colors is only 2? (monochrome display device) Popularity and median-cut algorithms won’t produce suitable results in this scenario

Threshold If we merely select a threshold and set pixel values below it to black and above it to white we lose a lot of information

Threshold The human visual system is so good that we can still see the picture (in our minds) even though the data (taken in by the eyes) is minimal

Dither By replacing individual pixels with a pattern of binary values, the human visual system can be fooled into seeing shades The problem with pure thresholding is that all of the error ends up in the pixel being processed With dithering, we attempt do distribute the error to surrounding pixels

Floyd-Steinberg Dithering For each pixel display the closest available color compute error = actualColor – displayedColor spread error over (weighted addition) neighboring actual pixels to the right and below 7 * error 16 1 * error 16 5 * error 16 3 * error 16 Current pixel

Floyd-Steinberg Dithering Again, the human visual system is so good that we can still see the picture (in our minds) even though the data (taken in by the eyes) is minimal

Dithering Other dithering techniques involve replacing pixels with patterns meant to approximate the amount of “ink” (intensity) on the page The downside of these approaches are that the display size is typically larger than the actual image

Chromatic Adaptation The human visual system interprets colors as being constant under varying illuminants –White looks white under fluorescent, incandescent, daylight, etc. (well, most of the time) We would like to do this algorithmically –We don’t know exactly how the human visual system achieves this goal

Chromatic Adaptation Using the XYZ color space (for whatever it is good for) requires knowledge of the ambient white point –e.g. D50, D65, etc. –This is referred to as relative colorimetry Through some mathematical magic –Given an X 1 Y 1 Z 1 point relative to a specific white point –That point can be converted to an X 2 Y 2 Z 2 point relative to a different white point

Chromatic Adaptation Thus, given an image taken under one light source, we can convert it to appear as though it was taken under a different light source This is the process known as Chromatic Adaptation There are various published ways to do this but the most widely used is Bradford Adaptation

Bradford Adaptation Bradford Transformation Matrix

Color Image Statistics All the obvious stuff –Count the number of unique colors –Count the number of “important” colors –Average red, green, blue –etc. All based on the color histogram

Color Histogram Not computationally feasible to create a linear histogram like we did for gray level images –Gray level images: 2 n bins for an n-bit image –For a color image n=24 which 16,777,216 bins So we resort to other forms

Color Histogram 3D histogram –Display the distribution as points in a 3D cube –Give the user tools to rotate the cube 2D histogram –2D array where the vertical axis is one color and the horizontal is another Bins represent count of colors with those two component values (third component is a wild card) –Amounts to planar projections of the 3D histogram

Color Histogram Neither approach is easy to use Both require the user to develop a sense of what they are looking at Color is hard!

Plugins I’ve posted plugins for –Floyd-Steinberg Dither –RGB to HSV –RGB to HLS –RGB to YPbPr –Bradford Chromatic Adaptation Transformation This merely repeat the math on page 290 – it does not do any image manipulations (just wanted to prove that the book didn’t have any errors)

[a few selected] References How the Retina Works – Helga Kolb American Scientist, Volume 91 Calculation From the Original Experimental Data of the CIE 1931 RGB Standard Observer Spectral Chromaticity Coordinates and Color Matching Functions – D.A. Broadbent University de Sherbrooke Eye, Brain, and Vision – David H. Hubel Scientific American Library 1988 RGB Coordinates of the Macbeth ColorChecker – Danny Pascale The RGB Code: The Mysteries of Color Revealed – Danny Pascale