cs 523 (cs 423/ee 533) computer vision lecture 1 introduction to computer vision

92
CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Upload: randolf-johns

Post on 20-Jan-2016

226 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

CS 523 (CS 423/EE 533)

Computer Vision

Lecture 1INTRODUCTION TO COMPUTER VISION

Page 2: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

About the Course

2

Page 3: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

http://vvgl.ozyegin.edu.tr

Objective

Introduction to the theory, tools, and algorithms of 3D computer vision

Instructor

Assist. Prof. M. Furkan Kıraç

E-mail: [email protected]

Room: 219

Hours

Wednesdays, 10:40-13:30, Room: 241

Grading

Projects: 6x10%

Final Exam: 40%

Syllabus

3

Page 4: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Short Projects:Late submissions are not accepted. Copying answers from others’ work is not permitted.

Final Exam:At least 3 of the 6 Short Projects must be turned in by the due date in order to qualify for the Final Exam. No make-up will be given for the Final Exam. Students can take the Bütünleme exam if they miss the Final Exam.

 

Grading

4

Page 5: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Computer Vision: Algorithms and Applications, Richard Szeliski, Springer, 2010.

Computer Vision: A Modern Approach, David A. Forsyth and Jean Ponce, Prentice-Hall, 2002.

  Introductory Techniques for 3D Computer

Vision, Emanuele Trucco and Alessandro Verri, Prentice-Hall 1998.

Recommended Books

5

Page 6: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Learning OpenCV, Gary Bradski and Adrian Kaehler, O'Reilly, 2008.

OpenCV 2 Computer Vision Application Programming Cookbook, Robert Laganiere, Packt Publishing, 2011.

Mastering OpenCV with Practical Computer Vision Projects, Daniel Lelis Baggio, et al., Packt Publishing, 2012.

 

OpenCV Resources

6

Page 7: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Week Lectures

24 September 2014 Lecture 1

1 October 2014 Lecture 2

8 October 2014 Lecture 3

15 October 2014 Lecture 4

22 October 2014 Lecture 5

29 October 2014 Lecture 6

5 November 2014 Lecture 7

12 November 2014 Lecture 8

19 November 2014 Lecture 9

26 November 2014 Lecture 10

3 December 2014 Lecture 11

10 December 2014 Lecture 12

17 December 2014 Lecture 13

24 December 2014 Lecture 14

31 December 2014 Lecture 15 ?

Page 8: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Applications of Computer Vision

8

Page 9: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Image Stitching

Page 10: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Image Matching

Page 11: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Object Recognition

Page 12: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

3D Reconstruction

Page 13: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Interior Modeling

13

Page 14: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

3D Augmented Reality

14

Page 15: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

3D Camera Tracking

15

Page 16: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

16

Stereo Conversion for 3DTV

Page 17: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Depth Estimation and View Interpolation for 3DTV

17

Page 18: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human Tracking

18

Page 19: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

License Plate Recognition

19

Page 20: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human Pose Estimation

20

Page 21: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Course Outline

21

Page 22: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

3D geometry fundamentals Transformations and projections Camera calibration Feature detection and matching Image stitching Single view geometry Two view geometry Multiple view geometry Stereo vision and depth estimation 3D structure from motion 3D camera tracking

Topics to be covered

22

Page 23: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Relation to Other Fields

23

Page 24: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Computer Vision

24

Figure from "Computer Vision: Algorithms and Applications,” Richard Szeliski, Springer, 2010.

Page 25: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Lights and materials Shading Texture mapping Environment effects Animation 3D scene modeling 3D character modeling (OpenGL)

Computer Graphics

25

Page 26: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Computer Graphics

26

Page 27: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Resampling Enhancement Noise filtering Restoration Reconstruction Segmentation Image compression (MATLAB and OpenCV)

Image Processing Topics

27

Page 28: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Image Processing

28

Page 29: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Spatio-temporal sampling Motion estimation Frame-rate conversion Multi-frame noise filtering Multi-frame restoration Super-resolution Video compression (MATLAB & OpenCV)

Video Processing Topics

29

Page 30: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Video acquisition-display chain

30

Capture Representation Coding

Transmission Decoding Rendering

Page 31: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human vs. Computer

31

Page 32: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Optical illusions

Page 33: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Actual vs. Perceived Intensity (Mach band effect)

33

Page 34: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Brightness Adaptation of the Eye

34

Page 35: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Optical illusions

Page 36: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION
Page 37: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Optical illusions

Page 38: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Why is Computer Vision Difficult?

Page 39: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human perception

Page 40: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human perception

Page 41: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human Visual System

41

Page 42: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human Eye

Page 43: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION
Page 44: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION
Page 45: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Photoreceptors: Rods & Cones

Page 46: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION
Page 47: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Rods vs. Cones

RodsPerceive brightness onlyNight vision

ConesPerceive colorDay visionRed, green, and blue cones

Page 48: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Cone Distribution

64%

32%

2%

Blue is less-focused

Page 49: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Visual Threshold drop during Dark Adaptation

Page 50: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Spatial Resolution of the Human Eye Photopic (bright-light) vision:

Approximately 7 million cones Concentrated around fovea

Scotopic (dim-light) vision Approximately 75-150 million rods Distributed over retina

(HDTV: 1920x1080 = 2 million pixels)

50

Page 51: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Frequency Responses of Cones

Same amount of energy produces different sensations of brightness at different wavelengths

Green wavelength contributes most to the perceived brightness.

51

Page 52: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Trichromatic Color Mixing

Any color can be obtained by mixing three primary colors Red, Green, Blue (RGB) with the right proportion

valuessTristimulu :,3,2,1

kk

kk TCTC

Page 53: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION
Page 54: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Image Formation

54

Page 55: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human Eye vs. Camera

Camera components Eye components

Lens Lens, cornea

Shutter Iris, pupil

Film Retina

Cable to transfer images Optic nerve to send the incident light information to the brain

Page 56: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human Vision

Page 57: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Image formation

Page 58: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Pin-Hole Camera Model

Page 59: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Point Spread Effect

Page 60: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Out-of-Focus Blur

Page 61: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Shrinking the Aperture

Page 62: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Converging Lens

Page 63: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Correction with a Converging Lens

Page 64: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION
Page 65: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Perfectly In-Focus for a Certain Distance Only

“circle of confusion”

Page 66: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Depth-of-Field

Page 67: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Depth-of-Field

Page 68: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

“Sharp Image” within Depth-of-Field due to Finite Sensor Size

NZFZ

Page 69: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Focal Length (F) and Depth (Z)

Z

YFy

F

y

Z

Y

Z

XFx

Page 70: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Aperture Size Affects Depth-Of-Field

f / 5.6

f / 32

Page 71: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Aperture

2dA

Page 72: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Camera f-number

d

Ff

2

f

FA

Page 73: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Exposure Time

Page 74: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Motion Blur Effect due to Finite Exposure Time

Page 75: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Decrease in aperture implies…

Increase in depth-of-field Decrease in motion blur Decrease in exposure

Page 76: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

2D Image Representation

76

Page 77: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

77

Image Capture

(Courtesy Gonzalez & Woods)

Page 78: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Digital Image Capture

Page 79: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Digital Image Capture

Light sensitive diodes convert photons to electrons

Page 80: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Color Image Capture: Single vs. Three CCD Arrays

RGB splitter(three separate imaging sensors, higher resolution)

Bayer filter(cheaper but introduces spatial resolution loss)

Page 81: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Digital Camera Issues

Noise caused by low light

Color color fringing (chromatic aberration) artifacts from Bayer patterns

Blooming charge overflowing into neighboring pixels

In-camera processing over-sharpening can produce halos

Compression creates blocking artefacts

Page 82: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Digitization: Sampling and Quantization

Page 83: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Over Sampling

Page 84: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Over Quantization

84

Page 85: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

85

Images as Matrices of Integers

126 127 126

125 126 127

123 126 125

128 127 124

123 120 144

121 128 155

126 123 127

120 122 124

119 121 123

122 142 162

130 157 161

145 162 164

158

163

160

164

166

165

m

n

(0,0)

0 ≤ s(m,n) ≤ 255 } quantization

0 ≤ m ≤ M-1

0 ≤ n ≤ N-1

MxN 8-bit gray-scale (intensity, luminance) image

sampling

0 → black, 255 → white

Page 86: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Images as Functions

We can think of an image as a function, f, from R2 to R: f( x, y ) gives the intensity at position ( x, y ) Realistically, we expect the image only to be defined

over a rectangle, with a finite range:• f: [a,b]x[c,d] [0,1]

A color image is just three functions pasted together. We can write this as a “vector-valued” function:

( , )

( , ) ( , )

( , )

r x y

f x y g x y

b x y

Page 87: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

RGB Color Bands (Channels)

Red

Green Blue

Page 88: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

YUV Bands

Also called Y Cb Cr Y : Luma

Cb : Chrominance_blueCr : Chrominance_red

Y

U (Cb)

V(Cr)

Color

Page 89: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

YUV-RGB Conversion

Page 90: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Summary

90

Page 91: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

Human visual system

Pin-hole camera model

Image representation

Summary

91

Page 92: CS 523 (CS 423/EE 533) Computer Vision Lecture 1 INTRODUCTION TO COMPUTER VISION

How to find camera parameters? Where is the camera, where is it directed at? What is the movement of the camera?

Where are the objects located in 3D? What are the dimensions of objects in 3D? What is the 3D structure of a scene?

How to process stereo video? How to detect and match image features? How to stitch images?

Problems to be Addressed

92