17
Multimedia Systems & Interfaces Karrie G. Karahalios Spring 2007

Multimedia Systems & Interfaces

  • Upload
    marcy

  • View
    27

  • Download
    0

Embed Size (px)

DESCRIPTION

Multimedia Systems & Interfaces. Karrie G. Karahalios Spring 2007. Overview. Filters Edge Detection Non Photo-realistic Rendering. Image Filtering Overview. http://www.courses.fas.harvard.edu/~ext12559/lectures/2005-11-29-Filtering.pdf by Chris Wren. Spatial domain - PowerPoint PPT Presentation

Citation preview

Page 1: Multimedia Systems & Interfaces

Multimedia Systems &Interfaces

Karrie G. KarahaliosSpring 2007

Page 2: Multimedia Systems & Interfaces

Overview

• Filters

• Edge Detection

• Non Photo-realistic Rendering

Page 4: Multimedia Systems & Interfaces

Spatial and Frequency Domains

• Spatial domain– refers to planar region of

intensity values

• Frequency domain– think of each color plane

as a sinusoidal function of changing intensity values

– apply DFT to subsets of pixels for compression

Page 5: Multimedia Systems & Interfaces

Convolution Filters

• Filter an image by replacing each pixel in the source with a weighted sum of its neighbors

• Define the filter using a convolution mask, also referred to as a kernel– non-zero values in small neighborhood, typically

centered around a central pixel– generally have odd number of rows/columns

Page 6: Multimedia Systems & Interfaces

Mean Filter

Convolution filterSubset of image

9549648

22813455

33191545

23141220

111

111

111

9

1

Page 7: Multimedia Systems & Interfaces

Mean Filter

Convolution filterSubset of image

9549648

22813455

33191545

23141220

111

111

111

9

1

Page 8: Multimedia Systems & Interfaces

Common 3x3 Filters

• Low/High pass filter

• Blur operator

• H/V Edge detector

121

212

121

13

1

111

191

111

121

000

121

101

202

101

111

111

111

9

1

Page 9: Multimedia Systems & Interfaces

Edge Detection

• Identify areas of strong intensity contrast– filter unecessary data;

preserve important properties

• Fundamental technique– object recognition, orientation– image segmentation– e.g., use gestures as input– identify shapes, match to

templates, invoke commands

Page 10: Multimedia Systems & Interfaces

Characteristics of Edges

• Identify high slope in first derivative

• Pixel is on an edge if value of the gradient exceeds a threshold

http://www.pages.drexel.edu/~weg22/edge.html

Page 11: Multimedia Systems & Interfaces

Basic Method

• Step 1: filter noise using mean filter

• Step 2: compute spatial gradient

• Step 3: mark points > threshold as edges

Page 12: Multimedia Systems & Interfaces

Compute Spatial Gradient

• Compute partials

• Compute gradient

• Compute length

• Divide by length

jy

Iix

II

y

I

x

IyxI

),(

y

I

x

II

22

I

IG

Page 13: Multimedia Systems & Interfaces

Compute Partials

121

000

121

4

1

y

I

987

654

321

PPP

PPP

PPP

101

202

101

4

1

x

I P3 – P1 + 2*P6 – 2*P4+ P9 – P7

987

654

321

PPP

PPP

PPPP7 – P1 + 2*P8 – 2*P2

+ P9 – P3

Page 14: Multimedia Systems & Interfaces

Mark Edge Points

• Given gradient at each pixel and threshold – mark pixels where gradient

> threshold as edges

• Canny algorithm extends basic method

http://www.cee.hw.ac.uk/hipr/html/sobel.html

Page 15: Multimedia Systems & Interfaces

Compute Edge Direction

• Compute direction of maximum change

y

x

G

G1tan

xG

yG

Page 16: Multimedia Systems & Interfaces

Apply Non-Max Suppression

• For each pixel– If G(x,y) < either neighbor

along Normal direction, then set G(x,y) = 0

• Suppress local change when larger change nearby – helps reduce false positives

Page 17: Multimedia Systems & Interfaces

Hysteresis

• Oscillation of gradient at threshold

• Use two thresholds – T1 and T2 with T2 > T1

• Mark pixel as edge pixel if G(x,y) > T2 – keep pixels along normal direction with

G(x,y) > T1