EEE 508 - Digital Image & Video Processing and Compression http://lina faculty asu edu/eee508/ http://lina.faculty.asu.edu/eee508/ Basic Concepts Prof. P f Li Lina Karam K School of Electrical, Computer, & Energy Engineering Arizona State University karam@asu.edu EEE 508 1 Copyright 2004-2012 by Prof. Lina Karam 1# Basic image/video processing system Analog Image CAMERA x(n1,n2) STORAGE DIGITIZER PROCESS Sampling + Quantization x(t1,t2) • Display • Perform analysis • Reconstruct x(t1,t2) • x(t (t1,tt2) : ANALOG SIGNAL x : real value (t1,t2) : pair of real continuous space (time) variables • x(n1,n2) : DISCRETE SIGNAL (DIGITAL) x : discrete (quantized) real or integer value (n1,n n2) : pair of integer indices EEE 508 2 Copyright 2004-2012 by Prof. Lina Karam 2# Examples • Sampled Black & White Photograph: x(n1,n2) x (n1,n2) scalar indicating piel intensity at location (n1,n2) For example: x = 0 Black x=1 White 0<x<1 • In-between Sampled color video/TV signal xR(n1, n2, n3) xG(n1, n2, n3) xB(n1, n2, n3) EEE 508 3 Copyright 2004-2012 by Prof. Lina Karam 3# How do we process images? • Use DSP concepts as tools • Exploit p visual perception p p properties p p EEE 508 4 Copyright 2004-2012 by Prof. Lina Karam 4# How many possible images are there? • We represent pixels as amplitude values (gray scale). 256 levels 1 0 128 levels 1 0 64 levels 1 0 32 levels 1 • • EEE 508 0 How much to sample (quantize) the gray scale? H Humans can di distinguish ti i h in i the th order d off 100 llevels l off gray (about 40 to 100). 5 Copyright 2004-2012 by Prof. Lina Karam 5# How many possible images are there? • An image has pixels and dimensions, say 200x200 and assume 64 pixel values (64 gray levels). ¾ ¾ ¾ ¾ EEE 508 A 1x1 image → about 64 images A 1x2 image → about (64)2 images A 200x200 image → about (64)40000 images A large but finite number due to human perceptive properties. properties 6 Copyright 2004-2012 by Prof. Lina Karam 6# EEE 508 - Digital Image Processing and Compression Basic 2D DSP Concepts EEE 508 7 Copyright 2004-2012 by Prof. Lina Karam 7# 2D Image Representation x(n1,n2) has 2 axes (n1,n2) + amplitude axis x(n1,n2) 7 12 6 10 5 6 5 6 n2 n2 6 10 12 5 7 6 5 6 n1 n1 EEE 508 8 Copyright 2004-2012 by Prof. Lina Karam 8# Special 2D Signals n2 • 2D unit impulse ⎧1, n1 = n2 = 0 x(n1 , n2 ) = δ (n1 , n2 ) = ⎨ else ⎩0, Note: n1 δ (n1 , n2 ) = δ (n1 )δ (n2 ) n2 • Line impulses ¾ vertical line impulse: n1 x(n1 , n2 ) = δ ( n1 ) n2 ¾ horizontal line impulse: n1 x( n1 , n2 ) = δ ( n2 ) ¾ other line impulses: δ (n1 + n2 ), δ (n1 − n2 ), δ (2n1 − n2 ), δ ( Pn1 + Qn2 ) EEE 508 9 Copyright 2004-2012 by Prof. Lina Karam 9# Special 2D Signals • 2D unit step n2 ⎧1, n1 , n2 ≥ 0 u (n1 , n2 ) = ⎨ else ⎩0, Note: EEE 508 n1 u (n1 , n2 ) = u (n1 )u (n2 ) 10 Copyright 2004-2012 by Prof. Lina Karam 10# Some useful definitions • A 2D signal x(n1,n2) is separable if x(n1, n2) = f(n1)g(n2) • A finite-extent signal is a signal with a finite number of nonzero samples (all images are finite extent signals in practice). practice) • Region of support of a signal: ¾ If R is the region of support of a signal x(n1, n2), ) then x(n1, n2)=0 for (n1, n2) ∉R (i.e., outside R). ¾ The region of support of a signal is the set of points where it can be nonzero. EEE 508 11 Copyright 2004-2012 by Prof. Lina Karam 11# Basic 2D Operations • Shifting x(n1,n2) x(n1-1,n2) n2 n2 n1 x(n1-1,n2-1) n2 n1 n1 • Flipping x(n1,n2) x(-n1,n2) n2 1 x(-n1,-n2) n2 n2 1 n1 n1 n1 1 EEE 508 12 Copyright 2004-2012 by Prof. Lina Karam 12#