Template Matching - Rigid Motion | CMSC 828, Study notes of Computer Science

Material Type: Notes; Professor: Jacobs; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-xb3
koofers-user-xb3 🇺🇸

5

(1)

10 documents

1 / 34

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Partial preview of the text

Download Template Matching - Rigid Motion | CMSC 828 and more Study notes Computer Science in PDF only on Docsity!

Problem Definition

-^

An Image is a set of 2D geometric features,along with positions.

-^

An Object is a set of 2D/3D geometricfeatures, along with positions.

-^

A pose positions the object relative to theimage.^ – 2D Translation; 2D translation + rotation; 2D

translation, rotation and scale; planar or 3D objectpositioned in 3D with perspective or scaled orth.

-^

The best pose places the object featuresnearest the image features

Two parts to the problem

-^

Definition of cost function.

-^

Search method for finding best pose. 1.^

Can phrase this as search among poses.

Or as search among correspondences

There are connections between two.

Cost Function

  • We look at this first, since it defines the

problem.

  • Again, no perfect measure;
    • Trade-offs between veracity of measure

and computational considerations.

  • One-to-one vs. many-to-one• Bounded error vs. metric

Example: Chamfer Matching

Many-to-one, distance

^ di

For every edge point inthe transformed object,compute the distance tothe nearest image edgepoint. Sum distances.

min(||

2

1

1

m i

i

n i

i^

q p q p q p

Variations

-^

Sum a different distance^ –

f(d) = d

2

  • or

Manhattan distance

.

-^

f(d) = 1

if^

d^ < threshold, 0 otherwise.

  • This is called

bounded error

.

-^

Use maximum distance instead of sum.^ – This is called:

directed Hausdorff distance

.

-^

Use other features^ –

Corners.– Lines. Then position and angles of lines must besimilar.

  • Model line may be subset of image line.

Other comparisons

  • Enforce each image feature can match

only one model feature.

  • Enforce continuity, ordering along

curves.

  • These are more complex to optimize.

Clever Idea 1: Chamfer Matching

with the Distance Transform

Example: Each pixel has (Manhattan)distance to nearest edge pixel.

D.T. Adds Efficiency

  • Compute once.• Fast algorithms to compute it.• Makes Chamfer Matching simple.

Computing Distance Transform

-^

It’s only done once, per problem, not onceper pose.

-^

Basically a shortest path problem.

-^

Simple solution passing through image oncefor each distance.^ – First pass mark edges 0.– Second, mark 1 anything next to 0, unless it’s

already marked. Etc….

-^

Actually, a more clever method requires 2passes.

Chamfer Matching Complexity •^

Brute force approach: for each pose,compare each model point to every imagepoint. O(

pnm). p =

number poses,

n

=

number of image points,

m =

number of

model points.

-^

With distance transform: compute D.T., thenfor every pose, sum value under each modeledge. O

(s + pm). s =

number of pixels,

which is about same as

p.

(Forsyth & Ponce)