Docsity

Templates - Introduction to Computer Version - Lecture Sli, Lecture notes of Computer Science

Partial preview of the text

Download Templates - Introduction to Computer Version - Lecture Sli and more Lecture notes Computer Science in PDF only on Docsity!

Templates, Image Pyramids, and Filter Banks

Computer Vision Docsity.com

Review

1. Match the spatial domain image to the

Fourier magnitude image

(^1 )

A

(^23)

C

B

D

E

Slide: HoiemDocsity.com

Today’s class

  • Template matching
  • Image Pyramids
  • Filter banks and texture
  • Denoising, Compression

Docsity.com

Template matching

  • Goal: find in image
  • Main challenge: What is a good similarity or distance measure between two patches? - Correlation - Zero-mean correlation - Sum Square Difference - Normalized Cross Correlation

Slide: HoiemDocsity.com

Slide: Hoiem

Matching with filters

  • Goal: find in image
  • Method 1: filter the image with zero-mean eye

Input Filtered Image (scaled)^ Thresholded Image

[ , ] ( [ , ] )( [ , ])

,

h m n f k l f g m k n l k l

True detections

False detections

mean of f

Docsity.com

Slide: Hoiem

Matching with filters

  • Goal: find in image
  • Method 2: SSD

Input 1- sqrt(SSD)^ Thresholded Image

2 ,

h [ m , n ] ( g [ k , l ] f [ m k , n l ] ) k l

True detections

Docsity.com

Matching with filters

  • Goal: find in image
  • Method 3: Normalized cross-correlation
  1. 5

,

2 , ,

2

, ,

( [ , ] ) ( [ , ] )

( [ , ] )( [ , ] )

[ , ]

k l

mn k l

mn k l

g k l g f m k n l f

g k l g f m k n l f

h m n

Matlab: normxcorr2(template, im)

mean template mean image patch

Slide: HoiemDocsity.com

Slide: Hoiem

Matching with filters

  • Goal: find in image
  • Method 3: Normalized cross-correlation

Input (^) Normalized X-Correlation Thresholded Image

True detections

Docsity.com

Q: What is the best method to use?

A: Depends

  • SSD: faster, sensitive to overall intensity
  • Normalized cross-correlation: slower, invariant

to local average intensity and contrast

Docsity.com

Q: What if we want to find larger or smaller eyes?

A: Image Pyramid

Docsity.com

Gaussian pyramid

Source: ForsythDocsity.com

Template Matching with Image Pyramids

Input: Image, Template

  1. Match template at current scale
  2. Downsample image
  3. Repeat 1-2 until image is very small
  4. Take responses above some threshold, perhaps with non-maxima suppression

Slide: HoiemDocsity.com

Laplacian filter

unit impulse (^) Gaussian Laplacian of Gaussian

Source: LazebnikDocsity.com

2D edge detection filters

is the Laplacian operator:

Laplacian of Gaussian

Gaussian derivative of Gaussian

Docsity.com