Top Banner
1 Comp300a: Introduction to Computer Vision L. QUAN
29

1 Comp300a: Introduction to Computer Vision L. QUAN.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Comp300a: Introduction to Computer Vision L. QUAN.

1

Comp300a: Introduction to Computer Vision

L. QUAN

Page 2: 1 Comp300a: Introduction to Computer Vision L. QUAN.

2

Course organisation

• Lectures on Tuesday and Thursday

• 4 labs (or mini-projects)

• Mid-term and final

• 30% labs+30% midterm+40%final

Page 3: 1 Comp300a: Introduction to Computer Vision L. QUAN.

3

What is Computer Vision about?

These fields are all closely related to 2d images, but different:

Image processing: 2D images 2D images, well-defined pb.

Computer vision: 2D images 3D reconstruction, hard ill-posed inverse pb.

Computer graphics: 3D 2D, well-posed forward pb

(+analysis &Interpretation)

Page 4: 1 Comp300a: Introduction to Computer Vision L. QUAN.

4

What are applications?

• modeling for graphics• visualization• photo/video manipulation and editing• robot navigation• autonomous vehicules• guiding tools for blind• security and monitoring• object/face recognition, OCR• medical applications• visual communication• digital libraries• …

Page 5: 1 Comp300a: Introduction to Computer Vision L. QUAN.

5

What am I doing?

Some examples

Page 6: 1 Comp300a: Introduction to Computer Vision L. QUAN.

6

Overview• Introduction

– intersection of vision, graphics and image-based modeling and rendring– some basic mathematical tools (linear algebra, homogeneous coordinates, and optimisation)

• Modeling– Digital photography– Basic radiometry– Geometric modeling of camera– Camera calibration and pose estimation

• Image features– Filtering– Edge detection, polygonal approximation– Points of interest detection

• 3D reconstruction by multiple views: stereovision– Epipolar geometry– Computing correspondences– 3D reconstruction

Page 7: 1 Comp300a: Introduction to Computer Vision L. QUAN.

7

http://www.dai.ed.ac.uk/CVonline/

On-line computer vision courses

Page 8: 1 Comp300a: Introduction to Computer Vision L. QUAN.

8

1. Basic Digital photography and image manipulations

Page 9: 1 Comp300a: Introduction to Computer Vision L. QUAN.

9

Page 10: 1 Comp300a: Introduction to Computer Vision L. QUAN.

10

Digital Images

World Camera Digitizer DigitalImage

Image Formation:

(i) What determines where the image of a 3D point appears on the 2D image?

(ii) What determines how bright that image point is?

(iii) How is a digital image represented?

(iv) Some simple operations on 2D images?today

Reflectance, radiometry

geometry

Page 11: 1 Comp300a: Introduction to Computer Vision L. QUAN.

11

210 209 204 202 197 247 143 71 64 80 84 54 54 57 58 206 196 203 197 195 210 207 56 63 58 53 53 61 62 51 201 207 192 201 198 213 156 69 65 57 55 52 53 60 50 216 206 211 193 202 207 208 57 69 60 55 77 49 62 61 221 206 211 194 196 197 220 56 63 60 55 46 97 58 106 209 214 224 199 194 193 204 173 64 60 59 51 62 56 48 204 212 213 208 191 190 191 214 60 62 66 76 51 49 55 214 215 215 207 208 180 172 188 69 72 55 49 56 52 56 209 205 214 205 204 196 187 196 86 62 66 87 57 60 48 208 209 205 203 202 186 174 185 149 71 63 55 55 45 56 207 210 211 199 217 194 183 177 209 90 62 64 52 93 52 208 205 209 209 197 194 183 187 187 239 58 68 61 51 56 204 206 203 209 195 203 188 185 183 221 75 61 58 60 60 200 203 199 236 188 197 183 190 183 196 122 63 58 64 66 205 210 202 203 199 197 196 181 173 186 105 62 57 64 63

x = 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

414243444546474849505152535455

What is a digital image?

y =

Pixel: picture elementTypically: 0 = black 255 = white

Black/white=grayscale image

Page 12: 1 Comp300a: Introduction to Computer Vision L. QUAN.

12

Color Image

Page 13: 1 Comp300a: Introduction to Computer Vision L. QUAN.

13

Three types of images:

– Gray-scale images I(x,y) [0..255]

– Binary images I(x,y) {0 , 1}

– Color images IR(x,y) IG(x,y) IB(x,y)

Page 14: 1 Comp300a: Introduction to Computer Vision L. QUAN.

14

Image qualtiy:

• resolution (size, #pixels, aspect ratio)• color depth• compression

Page 15: 1 Comp300a: Introduction to Computer Vision L. QUAN.

15

This graphic shows the relative sizes of a frame of 35mm film (red), the D60 image sensor (yellow), and a 1/1.8 CCD used in another digital camera (blue).

Resolution:

Page 16: 1 Comp300a: Introduction to Computer Vision L. QUAN.

16

 

Image Width x height Aspect Ratio

35 mm film 36 x 24 mm 1.50

Display monitor 1024 x 768 1.33

Nikon Coolpix 990 2048 x 1536 1.33

Photo paper 4 x 6 inches 1.50

Photo paper 8 x 10 inches 1.25

Cannon EOS D60 3072 x 2048 1.5

HDTV 16 x 9 1.80

Aspect ratio:

Page 17: 1 Comp300a: Introduction to Computer Vision L. QUAN.

17

Effects of down-sampling (reducing number of pixels):

4 x 432 x 32128 x 128

Page 18: 1 Comp300a: Introduction to Computer Vision L. QUAN.

18

Resolution isn't the only factor, equally important is color depth, pixel-depth, or bit-depth.

Color depth: #bit for each pixel in each channel

Page 19: 1 Comp300a: Introduction to Computer Vision L. QUAN.

19

2 gray levels(1 bit/pixel)

BINARY IMAGE

8 gray levels(3 bits/pixel)

256 gray levels(8 bits/pixel)

Effects of reducing number of bits for each pixel:

Page 20: 1 Comp300a: Introduction to Computer Vision L. QUAN.

20

A heavily compressed image A less compressed one

Compression:

Page 21: 1 Comp300a: Introduction to Computer Vision L. QUAN.

21

Image processing

1) Basic (global and nonlinear) operators

2) Spatial Domain

3) Frequency Domain

- Histogram equalization

- Gamma correction

etc...

later

Page 22: 1 Comp300a: Introduction to Computer Vision L. QUAN.

22

A histogram is a graph that shows how the 256 possible levels of brightness are distributed in the image.

Image histograme:

Page 23: 1 Comp300a: Introduction to Computer Vision L. QUAN.

23

Occurrence(# of pixels)

Gray Level

H(k) = #pixels with gray-level k

Normalized histogram: Hnorm(k)=H(k)/N (N = # pixels in the image)

Histogram = The gray-level distribution:

Continuous probability density function: 1)( dxxp

k

norm kH 1)(

Page 24: 1 Comp300a: Introduction to Computer Vision L. QUAN.

24

PI(k)

k

PI(k)

k

1

1

0.5

PI(k)

k

0.1

Page 25: 1 Comp300a: Introduction to Computer Vision L. QUAN.

25

PI(k)

k0.5

0.1PI(k)

k

0.1

Histogram Stretching

Page 26: 1 Comp300a: Introduction to Computer Vision L. QUAN.

26

k k

)(khideal)(kh

Histogram Equalization

Page 27: 1 Comp300a: Introduction to Computer Vision L. QUAN.

27

0 50 100 150 200 2500

500

1000

1500

2000

2500

3000

3500

0 50 100 150 200 2500

500

1000

1500

2000

2500

3000

3500

Original Equalized

Page 28: 1 Comp300a: Introduction to Computer Vision L. QUAN.

28

Gamma correction:

Gamma correction controls the overall brightness of an image. Images which are not properly corrected can look either bleached out, or too dark. Trying to reproduce colors accurately also requires some knowledge of gamma. Varying the amount of gamma correction changes not only the brightness, but also the ratios of red to green to blue.

Page 29: 1 Comp300a: Introduction to Computer Vision L. QUAN.

29Correction L' = L ^ (1/2.5)

Graph of Output L = V ^ 2.5

Sample Input to Monitor

Graph of Input

Output from Monitor