computer vision 2 tavita su’a info410 & info350 s2 2015 information science visual computing

27
Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

Upload: marianna-jefferson

Post on 21-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

Computer Vision 2Tavita Su’a

INFO410 & INFO350 S2 2015INFO410 & INFO350 S2 2015

INFORMATIONSCIENCE

Visual Computing

Page 2: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 2INFORMATION SCIENCE

Analysing images and producing descriptions that can be used to interact with the environment (Horn, 1986).

Applications include face detection, automatic number plate recognition and facial recognition

Typical tasks include Feature: Detection (using edges, corners or blobs as

descriptors) e.g. FAST Description e.g. SIFT Matching e.g. Cross Correlation

Recap

Page 3: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 3INFORMATION SCIENCE

Overview Images

Binary Grayscale Color

Image Processing Potential Exam Questions References

Page 4: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 4INFORMATION SCIENCE

What is an (digital) image?

http://www.jvs.org.uk/wp-content/uploads/2015/07/flower-meadow-20392-20902-hd-wallpapers.jpg

Page 5: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 5INFORMATION SCIENCE

Images

http://www.quora.com/What-is-the-difference-between-a-binary-image-and-a-gray-scale-image

Binary

Grayscale

Color

http://images4.fanpop.com/image/photos/21800000/3-Penguins-kingjfan3-21879304-1024-768.jpg

Page 6: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 6INFORMATION SCIENCE

Binary

Page 7: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 7INFORMATION SCIENCE

Grayscale

=

255 255 255 255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255 255 255 255

255 255 255 20 0 255 255 255 255 255 255 255

255 255 255 75 75 75 255 255 255 255 255 255

255 255 75 95 95 75 255 255 255 255 255 255

255 255 96 127 145 175 255 255 255 255 255 255

255 255 127 145 175 175 175 255 255 255 255 255

255 255 127 145 200 200 175 175 95 255 255 255

255 255 127 145 200 200 175 175 95 47 255 255

255 255 127 145 145 175 127 127 95 47 255 255

255 255 74 127 127 127 95 95 95 47 255 255

255 255 255 74 74 74 74 74 74 255 255 255

255 255 255 255 255 255 255 255 255 255 255 255

255 255 255 255 255 255 255 255 255 255 255 255

1 channel, 0 = black, 255 = white

Page 8: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 8INFORMATION SCIENCE

Color3 Channels – Red, Green, Blue

https://en.wikipedia.org/wiki/Grayscale#/media/File:Beyoglu_4671_tricolor.png

Page 9: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 9INFORMATION SCIENCE

Grayscale vs Color

Page 10: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 10INFORMATION SCIENCE

Imaging Process

The scene is• projected on

a 2D plane • sampled on

a regular grid, and each sample is

• quantized (rounded to the nearest integer)

Page 11: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 11INFORMATION SCIENCE

Digital Image3 resolutions

• Spatial (no. of pixels)• Intensity (no. of grey levels)• Temporal (number of frames per second)

Computers have limited resolutions• Quantization is required due to the limited

Intensity resolution• Sampling is required due to limited spatial

and temporal resolution

Page 12: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 12INFORMATION SCIENCE

Digital Image

continuous color input

disc

rete

col

or o

utpu

t

continuous colors mapped to a finite, discrete set of

colors.

continuous colors mapped to a finite, discrete set of

colors.

SamplingQuantization

Page 13: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 13INFORMATION SCIENCE

Digital Image is…A 2D rectilinear array of

samples

sampledreal image quantized sampled & quantized

Page 14: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 14INFORMATION SCIENCE

Image Noise• Light Variations• Camera Electronics• Surface Reflectance• Lens

Given a camera and a still scene, how can you reduce noise?

Page 15: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 15INFORMATION SCIENCE

Image as a function• We can think of an image

as a function, f,• f: R2 R• f (x, y) gives the

intensity I, at position (x, y)

• 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 16: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 16INFORMATION SCIENCE

Image Processing

An image processing operation typically defines a new image g in terms of an existing image f

We can transform the domain or the range of f• Range transformation:

• Domain transformation:

Filtering also generates new images from an existing image

Page 17: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 17INFORMATION SCIENCE

Point Processing• Simplest kind of range transformation

• independent of position (x,y):• for each original image intensity value I, function t()

returns a transformed intensity value t(I)• Function t() is applied to every pixel, the spatial

information (x,y) is ignored

Page 18: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 18INFORMATION SCIENCE

Point Processing

Page 19: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 19INFORMATION SCIENCE

Gamma Correction• Monitors have a intensity

to voltage response curve which is roughly a 2.5 power function

• Send v -> actually display a pixel which has intensity equal to v 2.5

Page 20: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 20INFORMATION SCIENCE

Gamma Correction• This example shows

the original, unprocessed image and subsequent processed images with varying values of gamma applied.

Page 21: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 21INFORMATION SCIENCE

Image filtering

Modify the pixels in an image based on some function of a local neighborhood of each pixel

Common method used is linear filtering: • Convolution and Cross Correlation• Replace each pixel by a linear combination (a weighted

sum) of its neighbors• The prescription for the linear combination is called the

kernel (aka mask or filter)

0.5

0.5 00

10

0 00

kernel

8

Modified image dataLocal image data

6 14

1 81

5 310

Page 22: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 22INFORMATION SCIENCE

Why filter images?

• Smooth• Sharpen• Intensify• Enhance• Noise Reduction

Page 23: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 23INFORMATION SCIENCE

Cross-correlation Method

Denoted By:

• Filtering an image: replace each pixel with a linear combination of its neighbors

• The filter or kernel or mask H[u,v] is the prescription for the weights in the linear combination

Page 24: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 24INFORMATION SCIENCE

Convolution Method

Denoted By:

• Flip the filter in both dimensions (top to bottom, left to right)

• Then apply cross-correlation

Page 25: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 25INFORMATION SCIENCE

Convolution Method

Page 26: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 26INFORMATION SCIENCE

Sample Exam Questions

1. What is quantization and sampling?2. What is the difference between a range

transformation and a domain transformation?3. Given a camera and a still scene, how can you

reduce noise?4. List and explain two uses of image filtering. 5. Identify and explain two types of image resolutions. 6. Briefly describe how a kernel or mask can be used

to filter an image.

Page 27: Computer Vision 2 Tavita Su’a INFO410 & INFO350 S2 2015 INFORMATION SCIENCE Visual Computing

INFO410 S2 2015 COMPUTER VISION 2 (Tavita Su’a) SLIDE 27INFORMATION SCIENCE

http://orig03.deviantart.net/9c26/f/2010/171/0/0/biomech_eye_by_kirkh.jpg http://www.slideshare.net/tokakhaled5209/ch2-43129446 http://web.pdx.edu/~

jduh/courses/Archive/geog481w07/Students/Ludwig_ImageConvolution.pdf http://www.cs.cornell.edu/courses/cs4670/2013fa/lectures/lectures.html http://www.cs.cmu.edu/afs/cs/academic/class/15385-s06/lectures/ppts/ http://vision.princeton.edu/courses/COS429/2014fa/ http://www.cambridgeincolour.com/tutorials/gamma-correction.htm http://www.csd.uwo.ca/courses/CS4487a/Lectures/lec03_image_proc.pdf

References