csse463: image recognition day 25 today: introduction to object recognition: template matching...

8
CSSE463: Image Recognition CSSE463: Image Recognition Day Day 25 25 Today: introduction to object Today: introduction to object recognition: template matching recognition: template matching Template matching: a simple method Template matching: a simple method for object detection for object detection Questions? Questions?

Upload: lambert-daniel

Post on 18-Jan-2018

219 views

Category:

Documents


0 download

DESCRIPTION

Template matching (Sonka, 6.4) Algorithm: Algorithm: Evaluate a match criterion at every image location (and size, reflection, and rotation, if those variations are expected) Evaluate a match criterion at every image location (and size, reflection, and rotation, if those variations are expected) A “match” is a local maximum of the criterion above a threshold A “match” is a local maximum of the criterion above a threshold Q1

TRANSCRIPT

Page 1: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

CSSE463: Image Recognition CSSE463: Image Recognition Day 25Day 25 Today: introduction to object recognition: Today: introduction to object recognition:

template matchingtemplate matching

Template matching: a simple method for object Template matching: a simple method for object detectiondetection

Questions?Questions?

Page 2: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

Template matching (Sonka, 6.4)Template matching (Sonka, 6.4) Idea: you are looking for an exact match of Idea: you are looking for an exact match of

an object (described by a sub-image, a an object (described by a sub-image, a templatetemplate) in an image) in an image

Ideal world: it matches exactlyIdeal world: it matches exactly

Page 3: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

Template matching (Sonka, 6.4)Template matching (Sonka, 6.4) Algorithm:Algorithm:

Evaluate a match Evaluate a match criterion at every image criterion at every image location (and size, location (and size, reflection, and rotation, if reflection, and rotation, if those variations are those variations are expected)expected)

A “match” is a local A “match” is a local maximum of the criterion maximum of the criterion above a thresholdabove a threshold

Q1

Page 4: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

Template matching (Sonka, 6.4)Template matching (Sonka, 6.4)One match criterion:One match criterion:

Correlation between the template and the Correlation between the template and the image.image.

We are just using the template as a filter!We are just using the template as a filter!Simplistic implementationSimplistic implementationSmarter implementationSmarter implementation

Page 5: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

CorrelationCorrelation Just the dot product between Just the dot product between

the template and a the template and a neighborhood in the image. neighborhood in the image.

Idea: high correlation when Idea: high correlation when the template matches.the template matches.

Demo Demo

Page 6: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

CorrelationCorrelation Just the dot product between Just the dot product between

the template and a the template and a neighborhood in the image. neighborhood in the image.

Idea: high correlation when Idea: high correlation when the template matches. the template matches.

Problem: Problem: alwaysalways high high correlation when matching correlation when matching with a plain bright regionwith a plain bright region

Q2-3

Page 7: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

CorrelationCorrelation Just the dot product between Just the dot product between

the template and a the template and a neighborhood in the image. neighborhood in the image.

Idea: high correlation when Idea: high correlation when the template matches. the template matches.

Problem: Problem: alwaysalways high high correlation when matching correlation when matching with a plain bright regionwith a plain bright region

Solution: Normalize the Solution: Normalize the template and each region by template and each region by subtracting each’s mean from subtracting each’s mean from itself itself before before taking dot producttaking dot product

Q4-5

Page 8: CSSE463: Image Recognition Day 25 Today: introduction to object recognition: template matching Today: introduction to object recognition: template matching

Other matching algorithmsOther matching algorithmsChamfering (Hausdorff distance):Chamfering (Hausdorff distance):

http://www.cs.cornell.edu/~dph/hausdorff/hausdorff1.htmlhttp://www.cs.cornell.edu/~dph/hausdorff/hausdorff1.html

Springs and templates (Crandall and Springs and templates (Crandall and Huttenlocher)Huttenlocher) http://www.cs.cornell.edu/~dph/papers/cvpr07.pdfhttp://www.cs.cornell.edu/~dph/papers/cvpr07.pdf

Watershed segmentation (Sonka 6.3.4)Watershed segmentation (Sonka 6.3.4)