Computers and Imaging

Similar documents
Image Perception & 2D Images

Introduction to Color Theory

Wireless Communication

Colors in Images & Video

LECTURE 07 COLORS IN IMAGES & VIDEO

COLOR and the human response to light

Lecture 8. Color Image Processing

Multimedia Systems Color Space Mahdi Amiri March 2012 Sharif University of Technology

Image and video processing (EBU723U) Colour Images. Dr. Yi-Zhe Song

Dr. Shahanawaj Ahamad. Dr. S.Ahamad, SWE-423, Unit-06

Digital Image Processing Color Models &Processing

Color image processing

CHAPTER 3 I M A G E S

Images and Colour COSC342. Lecture 2 2 March 2015

COLOR. and the human response to light

Introduction to Multimedia Computing

Figure 1: Energy Distributions for light

IMAGES AND COLOR. N. C. State University. CSC557 Multimedia Computing and Networking. Fall Lecture # 10

Mahdi Amiri. March Sharif University of Technology

MULTIMEDIA SYSTEMS

Indexed Color. A browser may support only a certain number of specific colors, creating a palette from which to choose

6. Graphics MULTIMEDIA & GRAPHICS 10/12/2016 CHAPTER. Graphics covers wide range of pictorial representations. Uses for computer graphics include:

Fig Color spectrum seen by passing white light through a prism.

IMAGE PROCESSING >COLOR SPACES UTRECHT UNIVERSITY RONALD POPPE

Digital Image Processing. Lecture # 8 Color Processing

Introduction & Colour

12 Color Models and Color Applications. Chapter 12. Color Models and Color Applications. Department of Computer Science and Engineering 12-1

Introduction to computer vision. Image Color Conversion. CIE Chromaticity Diagram and Color Gamut. Color Models

For a long time I limited myself to one color as a form of discipline. Pablo Picasso. Color Image Processing

Visual Perception. Overview. The Eye. Information Processing by Human Observer

Images and Graphics. 4. Images and Graphics - Copyright Denis Hamelin - Ryerson University

MOTION GRAPHICS BITE 3623

CS 565 Computer Vision. Nazar Khan PUCIT Lecture 4: Colour

Color. Chapter 6. (colour) Digital Multimedia, 2nd edition

Color Image Processing

Color images C1 C2 C3

Digital Imaging & Photoshop

Color. Used heavily in human vision. Color is a pixel property, making some recognition problems easy

Introduction. The Spectral Basis for Color

Color Image Processing. Gonzales & Woods: Chapter 6

Digital Imaging and Image Editing

Interactive Computer Graphics

Image is a spatial representation of an object or a scene. (image of a person, place, object)

Digital Image Processing. Lecture # 6 Corner Detection & Color Processing

Color: Readings: Ch 6: color spaces color histograms color segmentation

Color & Compression. Robin Strand Centre for Image analysis Swedish University of Agricultural Sciences Uppsala University

PHOTOSHOP. pixel based image editing software (pixel=picture element) several small dots or pixels make up an image.

Fundamentals of Multimedia

Color Theory: Defining Brown

Introduction to Computer Vision and image processing

Color. Used heavily in human vision. Color is a pixel property, making some recognition problems easy

CATEGORY SKILL SET REF. TASK ITEM

Overview of graphics

Digital Imaging - Photoshop

B.Digital graphics. Color Models. Image Data. RGB (the additive color model) CYMK (the subtractive color model)

Unit 4.4 Representing Images

YIQ color model. Used in United States commercial TV broadcasting (NTSC system).

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

6 Color Image Processing

Compression and Image Formats

Lecture 3: Grey and Color Image Processing

Coreldraw Crash Course

In order to manage and correct color photos, you need to understand a few

Human Vision, Color and Basic Image Processing

Sampling Rate = Resolution Quantization Level = Color Depth = Bit Depth = Number of Colors

Digital Image Processing (DIP)

Histograms and Color Balancing

CMPSC 390 Visual Computing Spring 2014 Bob Roos Review Notes Introduction and PixelMath

EECS490: Digital Image Processing. Lecture #12

Chapter 11. Preparing a Document for Prepress and Printing Delmar, Cengage Learning

Imaging Process (review)

Color Image Processing

Computer Graphics: Graphics Output Primitives Primitives Attributes

Unit 8: Color Image Processing

Raster Graphics. Overview קורס גרפיקה ממוחשבת 2008 סמסטר ב' What is an image? What is an image? Image Acquisition. Image display 5/19/2008.

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Raster Graphics 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Computer Graphics. Rendering. Rendering 3D. Images & Color. Scena 3D rendering image. Human Visual System: the retina. Human Visual System

Cvision 2. António J. R. Neves João Paulo Silva Cunha. Bernardo Cunha. IEETA / Universidade de Aveiro

Output Model. Coordinate Systems. A picture is worth a thousand words (and let s not forget about sound) Device coordinates Physical coordinates

Introduction to Color Science (Cont)

To discuss. Color Science Color Models in image. Computer Graphics 2

Objective Explain design concepts used to create digital graphics.

ENEE408G Multimedia Signal Processing

Raster (Bitmap) Graphic File Formats & Standards

Images. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 38

the eye Light is electromagnetic radiation. The different wavelengths of the (to humans) visible part of the spectra make up the colors.

CS 262 Lecture 01: Digital Images and Video. John Magee Some material copyright Jones and Bartlett

05 Color. Multimedia Systems. Color and Science

Photoshop 01. Introduction to Computer Graphics UIC / AA/ AD / AD 205 / F05/ Sauter.../documents/photoshop_01.pdf

Waitlist. We ll let you know as soon as we can. Biggest issue is TAs

Color Reproduction. Chapter 6

Digital Images. Back to top-level. Digital Images. Back to top-level Representing Images. Dr. Hayden Kwok-Hay So ENGG st semester, 2010

Colour. Why/How do we perceive colours? Electromagnetic Spectrum (1: visible is very small part 2: not all colours are present in the rainbow!

CIE tri-stimulus experiment. Color Value Functions. CIE 1931 Standard. Color. Diagram. Color light intensity for visual color match

Color and More. Color basics

Image Optimization for Print and Web

Color and Images. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 16

Photoshop Elements Week 1 - Photoshop Elements Work Environment

Specific structure or arrangement of data code stored as a computer file.

Stamp Colors. Towards a Stamp-Oriented Color Guide: Objectifying Classification by Color. John M. Cibulskis, Ph.D. November 18-19, 2015

Transcription:

Computers and Imaging Telecommunications 1 P. Mathys Two Different Methods Vector or object-oriented graphics. Images are generated by mathematical descriptions of line (vector) segments. Bitmap or raster graphics. Images are made up of individual dots or pixels which are arranged in rows and columns.

Vector Graphics: Example Outline of letter S specified by points that are connected using Bézier cubic spline curves. The letter S as it is printed after filling the outline specified on the left. Bitmap Graphics: Example The letter S is placed on a grid of pixels, each of which can be black or white. The letter S as it is printed, without the grid itself being visible.

Vector Graphics: Resizing Original size Enlarged by factor of 2 Enlarged by factor of 4 Resizing works well, but requires substantial computational resources. Bitmap Graphics: Resizing Original size Enlarged by factor of 2 Enlarged by factor of 4 Resizing is problematic due to spatial quantization effect of underlying grid.

Vector Graphics Good for storing images composed of lines, circles and polygons, or images that can be decomposed into simple geometrical objects. Can be easily rescaled and rotated. Cannot easily accommodate very complex images, such as photographs where color information may vary from pixel to pixel. Bitmap Graphics Are easy to edit in memory and display on TV monitors due to the arrangement of the pixels in a rectangular array. Pixel values can be modified individually. Uncompressed images can become very large and require a lot of memory. Resizing and rotation do not work very well and may distort the image significantly.

Bitmap versus Vector Graphics Vector graphics are well suited for graphs, e.g., in spreadsheets, and for scalable fonts, e.g., PostScript or TrueType fonts. Bitmap graphics are used for general purpose images and, in particular, photographs. On the WWW, bitmap graphics are by far the most popular and we will concentrate on them in the following slides. Bitmap Black and White Image Suppose we want to draw a B&W image on a computer screen. We first subdivide the screen into small rectangles or squares called pixels. A typical TV screen has about 300x400 = 120,000 pixels. A high resolution Computer monitor has about 1000x1300 = 1,300,000 pixels.

Screen with 9x13 = 117 Pixels x 0 1 2 3 4 5 6 7 8 9 10 11 12 y 0 Pixels (x,y) 1 2 3 4 5 6 (1,6) 7 8 (4,8) Black and White Image To draw a B&W image, we paint some of the pixels black and leave the rest white. For instance, the letter A in its simplest form, would look like this:

Black and White Image To make more fancy letters, we have to use more pixels as shown by the following improved letter A: What can m Bits Describe? In general, if we have m bits, we can represent m n = 2 different objects. Examples: 2 0 = 1, 2 1 = 2, 2 2 = 4, 2 3 = 8, 2 4 = 16

Powers of 2 Each additional bit doubles the number of objects that can be described. Suppose now we have n objects. How many bits do we need to describe them? The answer is m bits, where m is equal to x rounded up to the nearest integer, and x = log(n)/log(2) Colors Humans can distinguish about 10,000 colors simultaneously, but many more colors can be perceived, although not simultaneously. A truecolor display or printer uses 24 bits per pixel, corresponding to 16.8 million (2^24=16,777,216) different colors. The most common bitmap formats use either 1,4,8,16, or 24 bits per pixel.

Additive (RGB) Colors (Almost) all colors can be generated by combining light from red (R), green (G) and blue (B) sources with the right intensities. For example, adding R and G in equal amounts results in yellow, and adding R, G, and B in equal amounts results in white. Used for TV and Computer Displays Subtractive (CMY) Colors Starting from white light, we can use a yellow (Y) filter to remove blue, a cyan (C) filter to remove red, and a magenta (M) filter to remove green. In this way also (almost) all possible colors can be generated. Used in Photography and Printing

Subtractive (CMY) Colors White consists of equal amounts of red, blue and green, i.e., W = R+G+B. Cyan filter blocks red: W-R = R+G+B-R = G+B = C Magenta filter blocks green: W-G = R+G+B-G = R+B = M Yellow filter blocks blue: W-B = R+G+B-B = R+G = Y Additive (RGB) Colors Colors are described in the form of 3 numbers, e.g., (20,235,109), where the first number is the amount of red (R), the second is the amount of green (G), and the third is the amount of blue (B). Examples (in hex):

Additive Colors (R,G,B) (Almost) all visible colors can be made up from red, green, and blue components in the right proportions. If we use 8 bits for each, R, G, and B, then we can represent 2^24=16.7 Mio colors. The values of R, G, and B are then in the range 0..255 each. Black is (0,0,0), white is (255,255,255). In between, e.g., (128,128,128) lies gray. Photographic Image (R,G,B) R G B

R,G,B Components Photographic Image (C,M,Y) C M Y

C,M,Y Components Complementary Colors Suppose a specific color X is represented by X = (R,G,B) where R, G, B each take on values 0 255. Then the complementary color C(X) is C(X) = W-X = (255-R,255-G,255-B) Examples: Red = (255,0,0) ==> C(Red) = (0,255,255) = Cyan Green = (0,255,0) => C(Green) = (255,0,255) = Magenta Blue = (0,0,255) ==> C(Blue) = (255,255,0) = Yellow

True Color (24 bits/pixel) This image has about 50,000 different colors. Using Fewer Bits per Pixel To use fewer bits per pixel, the number of different colors must generally be reduced. If 8 bits or less are used per pixel, then the colors are usually defined in a palette. A palette is a mapping from an index (e.g. 0..255) to a 24-bit (R,G,B) value that is used to display the image. The palette must be stored in a file together with the image.

256 Color Palette, Optimized <-- Original 256 Color Palette, Windows <-- Original

16 Color Palette, Windows <-- Original 2 Color Palette <-- Original

Use of Palettes GIF files always use palettes with a maximum of 256 distinct colors. JPEG files do not use palettes. BMP files may or may not use palettes. When they use palettes, the maximum number of colors is 256. The quality of photographic images is usually degraded when palettes are used. Different Wavelengths

C.I.E. Committee International D Eclairage RGB Color Model

HSV Color Model Hue Saturation Value More About Color By adjusting the amounts of R, G, and B present in a pixel, most of the visible colors can be produced. Because there are 3 color components, we cannot show all possibilities in a 2- dimensional graph. The following slides show mixtures of any 2 color components (the third component is fixed at zero).

Mixing Red and Green (B=0) 0 51 102 153 204 255 0 51 102 153 204 255 Mixing Red and Blue (G=0) 0 51 102 153 204 255 0 51 102 153 204 255

Mixing Blue and Green (R=0) 0 51 102 153 204 255 0 51 102 153 204 255 Color Hue, Saturation, Value The R,G,B color model is not always the most convenient to describe the coloring of a pixel. Often it is more appropriate to talk about the more intuitive quantities color hue (H), color saturation (S), and brightness value (V). The result is the H,S,V model.

Color Hue Color hue corresponds to the average spectral wavelength of a color. The convention is to use an angle between 0 and 360 degrees (measured counterclockwise). Examples: Red: 0 deg. Green: 120 deg. Blue: 240 deg. Yellow: 60 deg. Cyan: 180 deg. Magenta: 300 deg. Color Hue from R,G,B Compute intermediate quantities I, Q as I = R - G/2 - B/2, Q = sqrt(3)*(g-b)/2 Then compute H in degrees as (atan is inverse tangent) H = (180/pi)*atan(Q/I) If I<0 and Q>0 add 180 to H If I<0 and Q<0 subtract 180 from H

Color Saturation, Value Color saturation is a measure for the purity of a color. Mathematically, the saturation S is defined as max{r,g,b} - min{r,g,b} S = --------------------------------- max{r,g,b} Value is a measure for brightness, defined by V = max{r,g,b}/255 (RGB) => (HSV) Example (RGB) = #6495ED (in hex) Hex => decimal: 64,95,ED => 100,149,237 I = 100-149/2-237/2 = -93 Q = (sqrt(3)/2)*(149-237) = -76.2 atan(-76.2/-93) = 39.3 deg H = 39.3-180 = -140.7 deg S = (237-100)/237 = 0.58, V = 237/255 = 0.93 (HSV) = (-141 deg, 0.58, 0.93)

Color Hue, Saturation (V=255) Hue Saturation YUV Model The YUV model defines a color space in terms of a luminance (Y), and two chrominance (U,V) components. Here Luminance: Y = 0.30*R + 0.59*G + 0.11*B, Chrominance (blue): U = 0.49*(B-Y), Chrominance (red): V = 0.88*(R-Y). Used for TV (PAL and NTSC). MPEG files can also use this model for (lossy) data compression.

Y,Cb,Cr Model A similar model, that was originally developed for color TV (and compatibility with black and white TV), is the luminance (Y), and chrominance (Cb,Cr) model. For HDTV and computer displays Luminance: Y = 0.21*R + 0.72*G + 0.07*B, Chrominance (blue): Cb = 0.54*(B-Y), Chrominance (red): Cr = 0.64*(R-Y). Older monitors use slightly different constants. JPEG and MPEG use (slight variants of) this model for lossy data compression. Image Processing, Enhancement By varying specific components in the R,G,B model, and/or in the H,S,V model, and/or in the Y,Cb,Cr model, images can be enhanced or modified. Examples include: Contrast reduction/enhancement, Brightness and gamma correction, Color component/hue/saturation correction, Image filtering (blur/sharpen). The following slides show some examples.

Original Image Contrast Reduced Note: Horizontal axis shows input in range 0...1, vertical axis shows corresponding output in range 0 1 for Y and R,G,B.

Luminance Increased What is shown here is a linear increase in brightness that affects dark pixels (value near 0) by the same amount as bright pixels (value near 1). Luminance Decreased What is shown here is a linear decrease in brightness that affects dark pixels (value near 0) by the same amount as bright pixels (value near 1).

Contrast Increased This makes bright pixels brighter and dark pixels darker. Note the non-linearity (where the curves go flat) which arises because output values >1 and <0 are not possible. Gamma Correction This is a non-linear brightness correction that increases the brightness of dark pixels more than of those pixels which are already bright. This usually works best to brighten a dark image.

Decrease in Color Saturation Hue and brightness value (V) are not affected by this. A reduction in color saturation just changes the image towards a black and white image. Color Hue Change: +45 deg. Originally, red (R) is at 0 degrees. Changing the hue by +45 degrees moves red towards yellow, green towards cyan and blue towards purple.

Color Hue Change: -30 deg. Originally, red (R) is at 0 degrees. Changing the hue by -30 degrees moves red towards purple, green towards yellow and blue towards cyan. Max. Increase in Value (V) Because V=max{R,G,B}, only one color component needs to be pushed to the maximum, and color hue and saturation are preserved.

Max. Increase in Luminance (Y) Because Y=0.3*R+0.59*G+0.11*B, all three color components need to be pushed to the maximum and the image becomes nearly white. Is the Display Linear? To find out, we make one half of the full brightness in 2 ways (shown here for gray): (a) We set (R,G,B)=(0.5,0.5,0.5). (b) We make a checkerboard pattern with equal areas of pure white and pure black. If brightness differs, display is non-linear.

Enlarged Test Pattern For a linear display characteristic the gray frame with (R,G,B) = (0.5,0.5,0.5) should appear to have the same brightness as the pure white/black checkerboard pattern. Gamma Correction A TV display has characteristic z = γ y where y is the input and z is the output of the display. Gamma correction uses y = 1/γ x where x is the input and y is the output of the correction. y y x x

Chart to Determine Gamma Resolution Do our eyes have the same resolution for the red, green and blue color components? No! The resolution is best for green and worst for blue. <-- Resolution chart in GIF format.

JPEG Adapts to Human Eye The JPEG image format makes use of our inability to distinguish fine details in the red and blue color components to compress the image data. The R and B components are low-pass filtered (and the excessive data is thrown away) when an image is converted to JPEG format. <-- Resolution chart in JPEG format.