Images. Why An Example. Lecture 15: Graphics and Visualisation: Images and Colour

Similar documents
Overview. Raster Graphics and Color. Overview. Display Hardware. Liquid Crystal Display (LCD) Cathode Ray Tube (CRT)

Outline. Quantizing Intensities. Achromatic Light. Optical Illusion. Quantizing Intensities. CS 430/585 Computer Graphics I

CBIR: Colour Representation. COMPSCI.708.S1.C A/P Georgy Gimel farb

1. Introduction to image processing

Computer Vision. Color image processing. 25 August 2014

Green = 0,255,0 (Target Color for E.L. Gray Construction) CIELAB RGB Simulation Result for E.L. Gray Match (43,215,35) Equal Luminance Gray for Green

A simpler version of this lesson is covered in the basic version of these teacher notes.

Color Balancing Techniques

Digital Image Basics. Introduction. Pixels and Bitmaps. Written by Jonathan Sachs Copyright Digital Light & Color

THE BASICS OF COLOUR THEORY

Digital Image Fundamentals. Selim Aksoy Department of Computer Engineering Bilkent University

1. Three-Color Light. Introduction to Three-Color Light. Chapter 1. Adding Color Pigments. Difference Between Pigments and Light. Adding Color Light

Data Storage 3.1. Foundations of Computer Science Cengage Learning

HSI BASED COLOUR IMAGE EQUALIZATION USING ITERATIVE n th ROOT AND n th POWER

CULTURAL HISTORY Primary Colors - Part 1 of 2 by Neal McLain

UNIVERSITY OF LONDON GOLDSMITHS COLLEGE. B. Sc. Examination Sample CREATIVE COMPUTING. IS52020A (CC227) Creative Computing 2.

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Calibration Best Practices

Color Theory for Floral Design

Pantone Matching System Color Chart PMS Colors Used For Printing

Fundamentals of Image Analysis and Visualization (the short version) Rebecca Williams, Director, BRC-Imaging

1 Laboratory #5: Grating Spectrometer

PANTONE Solid to Process

Microsoft Picture Manager. Picture Manager

Chapter 2. Point transformation. Look up Table (LUT) Fundamentals of Image processing

UNDERSTANDING DIFFERENT COLOUR SCHEMES MONOCHROMATIC COLOUR

Perception of Light and Color

Conquering Color. Dina Wakley

GIS Tutorial 1. Lecture 2 Map design

At the core of this relationship there are the three primary pigment colours RED, YELLOW and BLUE, which cannot be mixed from other colour elements.

Expert Color Choices for Presenting Data

Automatic and Objective Measurement of Residual Stress and Cord in Glass

Technical Paper DISPLAY PROFILING SOLUTIONS

The Information Processing model

Application software. 3-channel LED KNX controller Electrical / Mechanical characteristics : see product information. Application software ref.

Choosing Colors for Data Visualization Maureen Stone January 17, 2006

VISUAL ARTS VOCABULARY

A Proposal for OpenEXR Color Management

CS 325 Computer Graphics

Process Yellow PMS 100 PMS 101 PMS 102 Pantone Yellow PMS 103 PMS 104 PMS 105 PMS 106 PMS 107 PMS 108 PMS 109 PMS 110 PMS 111

Important Notes Color

3D Input Format Requirements for DLP Projectors using the new DDP4421/DDP4422 System Controller ASIC. Version 1.3, March 2 nd 2012

Graphic Design Basics. Shannon B. Neely. Pacific Northwest National Laboratory Graphics and Multimedia Design Group

ROBOTRACKER A SYSTEM FOR TRACKING MULTIPLE ROBOTS IN REAL TIME. by Alex Sirota, alex@elbrus.com

Using Image J to Measure the Brightness of Stars (Written by Do H. Kim)

Color quality guide. Quality menu. Color quality guide. Page 1 of 6

Choosing a digital camera for your microscope John C. Russ, Materials Science and Engineering Dept., North Carolina State Univ.

Simplify your palette

SOMERS POINT BRAND IDENTITY STYLE GUIDE

The following guidelines will help ensure that our identity is used properly and effectively.

RGB Workflow Key Communication Points. Journals today are published in two primary forms: the traditional printed journal and the

MassArt Studio Foundation: Visual Language Digital Media Cookbook, Fall 2013

Comparison of different image compression formats. ECE 533 Project Report Paula Aguilera

Photoshop- Image Editing

Colour Science Typography Frontend Dev

TCS DIGITAL COLOR WHEEL VERSION 4.1 USER GUIDE

LED Bulb Manual. Aeotec by Aeon Labs LED Bulb.

Making the most of your conference poster. Dr Krystyna Haq Graduate Education Officer Graduate Research School

ColourSpace Conversions

Introduction to MATLAB (Basics) Reference from: Azernikov Sergei

Measurement with Ratios

INTRODUCTION IMAGE PROCESSING >INTRODUCTION & HUMAN VISION UTRECHT UNIVERSITY RONALD POPPE

Color. & the CIELAB. System

Multivariate data visualization using shadow

Quantitative vs. Categorical Data: A Difference Worth Knowing Stephen Few April 2005

Denis White Laboratory for Computer Graphics and Spatial Analysis Graduate School of Design Harvard University Cambridge, Massachusetts 02138

PLOTTING DATA AND INTERPRETING GRAPHS

Scanners and How to Use Them

MGL Avionics. MapMaker 2. User guide

TekBots TM Oregon State University. usb_cam User Guide. Version 1.0 By Adriaan Smit OSU EE Graduate Student

Dealing with Data in Excel 2010

The Contribution of Street Lighting to Light Pollution

Using MATLAB to Measure the Diameter of an Object within an Image

DESIGN ELEMENTS OF DESIGN

Introduction to Light, Color, and Shadows

A Beer s Law Experiment

High level code and machine code

This activity will show you how to draw graphs of algebraic functions in Excel.

Filters for Black & White Photography

How To Color Print

ATOMIC SPECTRA. Apparatus: Optical spectrometer, spectral tubes, power supply, incandescent lamp, bottles of dyed water, elevating jack or block.

UNIVERSITY OF CALICUT

Math Content by Strand 1

THE BOHR QUANTUM MODEL

Armstrong Atlantic State University Engineering Studies MATLAB Marina Image Processing Primer

White paper. CCD and CMOS sensor technology Technical white paper

5+5 Defence Initiative Logo

Introduction to graphics and LCD technologies. NXP Product Line Microcontrollers Business Line Standard ICs

EFX Keying/Alpha plugins for After Effects

Using Microsoft Picture Manager

FILE PREPARATION GUIDE

Light and its effects

ELEMENTS OF ART & PRINCIPLES OF DESIGN

Designing a Graphical User Interface

Nuclear Science and Technology Division (94) Multigroup Cross Section and Cross Section Covariance Data Visualization with Javapeño

Managerial Economics Prof. Trupti Mishra S.J.M. School of Management Indian Institute of Technology, Bombay. Lecture - 13 Consumer Behaviour (Contd )

Colour Image Segmentation Technique for Screen Printing

Transcription:

Images Lecture 15: Graphics and Visualisation: Images and Colour Another way of viewing a single variable that is a function of two independent variables is to display it as a 2D image. The Z, or height, values of the function is encoded by an intensity value or colour. The human visual system is highly proficient at interpreting this form of display if the data represents intensity. However, the visual system can have difficulty if the data represents some other quantity such as height. Images in standard formats such as gif, tiff, and jpeg are stored so that each pixel value lies in the range [,255]. Why -255 The range [, 255] is chosen so that each pixel can be represented by 8 bits (one byte). : Black 128: Grey 255: White Colour images will typically consist of three 2D arrays in the range [, 255] for each of the red, green, and blue channels. When you read an image into Matlab, Matlab stores the image as a matrix of numbers - each number lies in the range [, 255]. To save memory, Matlab uses the type uint8 (an unsigned 8 bit integer which can represent the values [, 255] only) to represent the numbers in the image matrix: An Example >> picci = imread('shape1.jpg'); >> whos Name Size Bytes Class picci 149x148 2252 uint8 array >> imagesc(z); % Rescale values in array Z to the full % range of the current colour map, % displaying the contents of the array % as an image. >> axis image; % Like axis equal - displays the image % with the correct aspect ratio. 1

Mathematical Operations on unit8 Data Matlab does not allow mathematical operations such as multiplication on data of type uint8 because numerical overflow is very likely. If you want perform a mathematical operation to an image, you need to cast it into an array of doubles. For example: >> picci = double(picci); % Cast from uint8 to double. >> whos Name Size Bytes Class picci 149x148 176416 double array Note that the memory used is now 8 times larger. A uint8 uses 8 bits, a double uses 64 bits. Note that Matlab's syntax for casting differs from most other languages. For example in Java, C, or C++ you would write: picci = (double)picci; Colour Colour is a very interesting quantity in that it is not absolute - it is just a perception that lives in our heads. Colour is a function of the dominant wavelength of the light. Photometrically, colour is on a linear scale from about 4nm up to 7nm. 7 Colour wheels Perceptually, colour is very different - it is perceived to be a cyclic quantity, not a linear one. Colour is often described in terms of the "colour wheel": Colour Spaces There are two main models for representing colour: 1. The RGB (Red-Green-Blue) model. 2. The HSV (Hue-Saturation-Value) or HSI (Hue- Saturation-Intensity) model. Note that red and violet are next to each other and not at distant ends of the spectrum. 2

RGB RGB represents colour in terms of 3 independent axes - one in each of the primary colours: red, green, and blue. An additive model The RGB colour model is an additive model. The colours present in the light are added to form new colours. Red + Green = Yellow Red + Blue = Magenta Blue + Green = Cyan Greyscale The greyscale spectrum lies on the line joining the black and white vertices.. Red +. Green +. Blue = Black.5 Red +.5 Green +.5 Blue = Grey 1. Red + 1. Green + 1. Blue = White The RGB model is used for colour monitors and video cameras. The RGB model is the standard representation for colour, although this is starting to change. HSV or HSI The HSI model is a perceptual model of colour space. Think of it as a 3D elliptical blob: The central vertical axis the greyscale, with intensity (brightness) varying from (black) at the bottom to 1 (white) at the top. The angle around the "equator" the hue value (red, orange, yellow, green, blue, indigo, violet, and back to red again). The axis radially outwards from the central vertical axis the saturation (purity how little the colour is diluted by white light) of the colour. 3

The HSV model At the perimeter (with saturation 1), we have "solid" colours. As we move inwards, we obtain the "pastel" colours. At the central axis (with saturation ), we have no colour - just a grey value. Specifying a colour in terms of hue, saturation, and intensity is much easier and more intuitive than working in RGB. However, graphics systems prefer colour specified in terms of RGB because hardware is built around this model. The conversion between HSV and RGB is quite complicated. Matlab provides conversion functions for you: >> rgb2hsv % Convert from RGB to HSV. >> hsv2rgb % Convert from HSV to RGB. Variation comparison of HSI Hues Saturation Intensity Colour maps A colour map is simply a table of colours specified in terms of red, green, and blue components. The contents of the colour table is arbitrary. A colour map allows you to map a single number into a colour. For example, when you display an image, the value of each pixel is used as an index into the colour map. If a pixel has a value of 53, the colour that the pixel is displayed as will simply be whatever is in the corresponding entry of the colour table. Colour Maps in Matlab Matlab provides a number of colour maps and functions for generating colour maps: >> colormap(gray) % The gray colour map is a 64 x 3 array % of RGB values giving a greyscale. >> colormap(hot) % The hot colour map is a set of RGB % values providing a set of temperature % colours: black-red-yellow-white. >> gray(8) % Make a grey colour map with 8 % entries. ans = % Black.1429.1429.1429.2857.2857.2857 % Dark grey.4286.4286.4286.5714.5714.5714.7143.7143.7143 % Light grey.8571.8571.8571 % White % red green blue 4

Colour Map in Matlab >> hot(8) ans =.3333.6667 % Make a hot colour map % with 8 entries..3333.6667.5 % Dark red % Red % Yellow % White Hue for cyclic data We said earlier that perceptually colour is cyclic. Actually, it is just the hue component that is cyclic. The saturation and intensity axes are perceived as linear. Therefore, if you have a property that is cyclic, then the most appropriate way to represent it is with hue. Note that the imagesc function rescales image values to the full range of the current colour map so that all the pixel values get fully "spread" across the colour map. The function image uses the pixel values directly to lookup colour values from the colour map. Type help graph3d at the Matlab command prompt for a full list of the colour maps that Matlab provides. Greyscale not suitable for cyclic data If you try to represent something cyclic via a greyscale, you get a nasty discontinuity at the wrap-around point. Colour for region classification Note also that we tend to view different colours (hues) as indicating different classifications of regions. The classic example is on maps: Variations in intensity or saturation level should be used to indicate the level of some quantity that changes along a linear scale. 5

Use colour wisely If you were to look at the same map which only displayed altitude above sea level as a grey value, then your perception of the map would be very different. Depending on the context, the presence of different colours (hues) can be either be an aid, or a distraction, in the visualisation of data. 6