240 373 Image Processing Montri Karnjanadecha montricoe psu

  • Slides: 22
Download presentation
240 -373 Image Processing Montri Karnjanadecha montri@coe. psu. ac. th http: //fivedots. coe. psu.

240 -373 Image Processing Montri Karnjanadecha montri@coe. psu. ac. th http: //fivedots. coe. psu. ac. th/~montri 240 -373: Chapter 1: Introduction 1

Chapter 1 Introduction 240 -373: Chapter 1: Introduction 2

Chapter 1 Introduction 240 -373: Chapter 1: Introduction 2

Definition of Image Processing • Processing of an image, typically by a computer, to

Definition of Image Processing • Processing of an image, typically by a computer, to produce another image • The computer processing of pictures ( the manipulation of images by computer) 240 -373: Chapter 1: Introduction 3

Applications of Image Processing • • • Pictorial databases Graphic design Medical imaging Object

Applications of Image Processing • • • Pictorial databases Graphic design Medical imaging Object recognition Picture enhancement Microscopy 240 -373: Chapter 1: Introduction 4

Digital Image Processing System Console Image digitizer Input image storage Computer Output image storage

Digital Image Processing System Console Image digitizer Input image storage Computer Output image storage Image recorder Program library 240 -373: Chapter 1: Introduction 5

Image Shape • An image is usually defined as rectangular grids of pixels •

Image Shape • An image is usually defined as rectangular grids of pixels • Image(1. . M, 1. . N), Image (10, 5( 240 -373: Chapter 1: Introduction 6

Color Standards • A pixel color is represented as a point in 3 -D

Color Standards • A pixel color is represented as a point in 3 -D space. Axis may be labeled as independent colors such as R, G, B or may use other independent indicators such as Hue, lightness, saturation. • RBG, HSV, HSL are the most popular. 240 -373: Chapter 1: Introduction 7

RGB • RGB (Red green blue) – For CRT display (TV, computer monitor) –

RGB • RGB (Red green blue) – For CRT display (TV, computer monitor) – Additive combination of r g and b 240 -373: Chapter 1: Introduction 8

HSV • HSV (Hue Saturation Value) Hue is effectively a measure of the wavelength

HSV • HSV (Hue Saturation Value) Hue is effectively a measure of the wavelength of the main color. It has a value between 0 -255 (0 -360 o, Red = 0 o, Green=120 o and Blue=240 o. ) Hue can be calculated from RGB values as follows: Rh = R - min (R, G, B) Gh = G - min (R, G, B) Bh = B - min (R, G, B) At least on of these values is 0. Hue value is in between. 240 -373: Chapter 1: Introduction 9

HSV For example if Rh = 0 Hue angle = (240 x. Bh +

HSV For example if Rh = 0 Hue angle = (240 x. Bh + 120 x. Gh ) / (Bh + Gh) If two are zero, then hue is the angle corresponding to the third non-zero color. If three are zero, then there is no color hue. The monitor will display a gray level (between black and white). 240 -373: Chapter 1: Introduction 10

Saturation • Saturation is the amount of pure hue in the final color If

Saturation • Saturation is the amount of pure hue in the final color If Saturation = 0, final color is without hue ( white light only) If Saturation = 255, no white light in final color Saturation = (max(R, G, B) - min (R, G, B)) / max(R, G, B) 240 -373: Chapter 1: Introduction 11

Value • Value (brightness) is a measure of the intensity of the brightest component

Value • Value (brightness) is a measure of the intensity of the brightest component and given by Value = max(R, G, B) 240 -373: Chapter 1: Introduction 12

The HSV Model 240 -373: Chapter 1: Introduction 13

The HSV Model 240 -373: Chapter 1: Introduction 13

HSV Example Given R=100, G=200, B= 40, convert this RGB color model to HSV.

HSV Example Given R=100, G=200, B= 40, convert this RGB color model to HSV. Rh = 100 - min(100, 200, 40) = 60 Gh = 200 - min (100, 200, 40) = 160 Bh = 40 - min (100, 200, 40) = 0 H = (60*0 + 160*(120*256/360))/(60+160( 240 -373: Chapter 1: Introduction 14

HSV Example (Continued( Saturation = (max(R, G, B) - min (R, G, B)) /

HSV Example (Continued( Saturation = (max(R, G, B) - min (R, G, B)) / max(R, G, B) = (max(100, 200, 40)-min(100, 200, 40/(( max(100, 200, 40( 200 -40)/200) = %80 = 0. 8 = Saturation = 80*256/100 = 204 Value = max(100, 200, 40)200 = %78 = 100/256*200 = 240 -373: Chapter 1: Introduction 15

240 -373: Chapter 1: Introduction 16

240 -373: Chapter 1: Introduction 16

HLS (Hue Lightness Saturation) • Similar to HSV except that the hue angle start

HLS (Hue Lightness Saturation) • Similar to HSV except that the hue angle start at Blue = 0 o, and the model is double cone with a lightness axis going from L=0 (black) to L=1 (white) • For HLS, hue is calculated the same way as for HSV model except Blue = 0 and lightness and saturation are given by: • Lightness = (max(R, G, B) - min(R, G, B))/2 (max+min)/(max-min) if L <= 0. 5 (max-min)/(2 -max-min) otherwise • Saturation = 240 -373: Chapter 1: Introduction 17

HLS 240 -373: Chapter 1: Introduction 18

HLS 240 -373: Chapter 1: Introduction 18

The Human Vision • Better than any camera yet developed • Eye has 2

The Human Vision • Better than any camera yet developed • Eye has 2 classes of discrete light receptors; Cones and rods • 6 -7 million cones, sensitive to bright light • >= 75 Million rods, sensitive to light intensity but not color • eye color perceptions 240 -373: Chapter 1: Introduction 21

Color Additive • Problem with CRT 240 -373: Chapter 1: Introduction 22

Color Additive • Problem with CRT 240 -373: Chapter 1: Introduction 22