Tutorial on Image Processing - Bilkent...

Preview:

Citation preview

Pinar Duygulu June 2005

1

Tutorial on Image Processing

Pinar DuyguluBilkent University

Pinar Duygulu June 2005

2

Reference Material

Computer Vision – A Modern Approach, Forsyth & Poncewww.cs.berkeley.edu /~daf

Digital Image ProcessingGonzalez and Woods

Pinar Duygulu June 2005

3

Related Links

Computer Vision Homepagewww.cs.cmu.edu/afs/cs/project/cil/www/vision.html

Compendium of visionwww.dai.ed.ac.uk/CVonline

IEEE Publications:www.ieeexplore.org

More links www.cs.bilkent.edu.tr/~duygulu/Links/CVLinks

Computer Vision course Homepagewww.cs.bilkent.edu.tr/~duygulu/Courses/CS554/

Pinar Duygulu June 2005

4

What do you see in the picture?

Pinar Duygulu June 2005

5

Image Representation

• Digital Images are 2D arrays (matrices) of numbers• Each pixel is a measure of the brightness (intensity of light)

– that falls on an area of an sensor (typically a CCD chip)

adapted from Octavia Camps, Penn State

Pinar Duygulu June 2005

6

Image Representation

RGB Greyscale Binary

Pinar Duygulu June 2005

7

Image I/O

img = imread(‘dnm.jpg')imshow(img)

size(img)90 150 3

Pinar Duygulu June 2005

8

RGB Channels

R = img(:,:,1)G = img(:,:,2)B = img(:,:,3)imshow(R)imshow(G)imshow(B)

Pinar Duygulu June 2005

9

Color Spaces

Pinar Duygulu June 2005

10

Color Spaces

Luv HSV

Pinar Duygulu June 2005

11

RGB

Pinar Duygulu June 2005

12

HSV

Pinar Duygulu June 2005

13

Filtering

1 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 1 X 1/ 491 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 1

Pinar Duygulu June 2005

14

Filtering - Smoothing

1 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 1 X 1/ 491 1 1 1 1 1 11 1 1 1 1 1 11 1 1 1 1 1 1

Pinar Duygulu June 2005

15

Filtering

-1 0 1-1 0 1-1 0 1

Pinar Duygulu June 2005

16

Filtering – Edge Detection

-1 0 1-1 0 1-1 0 1

Sobel Operator

Pinar Duygulu June 2005

17

Filtering – Edge Detection

-1 –1 –10 0 01 1 1

Sobel Operator

Pinar Duygulu June 2005

18

Canny Edge Detector

Pinar Duygulu June 2005

19

Texture

VisTex Texture Database

Pinar Duygulu June 2005

20

Filter Banks

• Represent image using the responses of a collection of filters

Pinar Duygulu June 2005

21

Histogram

Cou

nts

Grey-value

Pinar Duygulu June 2005

22

Histogram

h = imhist(R)bar(h)

Pinar Duygulu June 2005

23

Pinar Duygulu June 2005

24

Segmentation using histogram

imshow(B > 140 )

Pinar Duygulu June 2005

25

Histogram Similarity

Pinar Duygulu June 2005

26

Histogram Similarity

Pinar Duygulu June 2005

27

Localized Features

Pinar Duygulu June 2005

28

Statistics 1 2 3 255 254 2534 5 6 245 253 2501 4 2 250 251 254

253 254 249 2 2 2254 254 254 3 3 3254 254 254 4 4 4

mean2(I)> 127.7778

b = I(1:3,1:3) b = I(1:3,4:6) b = I(4:6,1:3) b = I(4:6,4:6)mean2(b) mean2(b) mean2(b) mean2(b)> 3.1111 > 251.6667 > 253.3333 > 3

Pinar Duygulu June 2005

29

Statistics

2 254 2 253 2 249245 5 250 4 253 64 254 4 254 4 254255 2 253 1 254 33 254 3 254 3 254

250 4 254 1 251 2

mean2(I)> 127.7778

b = I(1:3,1:3) b = I(1:3,4:6) b = I(4:6,1:3) b = I(4:6,4:6)mean2(b) mean2(b) mean2(b) mean2(b)> 113.3333 > 142.1111 > 142 > 113.6667

Pinar Duygulu June 2005

30

Segmentation

Pinar Duygulu June 2005

31

Segmentation

adapted from Martial Hebert, CMU

Pinar Duygulu June 2005

32

Face detection

Pinar Duygulu June 2005

33

Moving Object Detection

Recommended