Solving Jigsaw Puzzles - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Solving Jigsaw Puzzles

Description:

... Automatic Solution of Jigsaw Puzzles' by. David Goldberg ... Solutions for jigsaw puzzles by shape alone date back to 1964. Two main difficulties : ... – PowerPoint PPT presentation

Number of Views:514
Avg rating:3.0/5.0
Slides: 24
Provided by: cgmCsM
Category:

less

Transcript and Presenter's Notes

Title: Solving Jigsaw Puzzles


1
Solving Jigsaw Puzzles
  • Presentation by
  • Perouz Taslakian
  • McGill University
  • COMP644 Winter 2005

2
Presented Paper
  • A Global Approach to Automatic Solution of
    Jigsaw Puzzles
  • by
  • David Goldberg
  • Christopher Malon
  • Marshall Bern
  • Proc of the 18th Annual ACM Symposium on
    Computational
  • Geometry 2002 June 5-7 Barcelona Spain. NY
    ACM
  • 2002 82-87.

3
Introduction
  • Solutions for jigsaw puzzles by shape alone date
    back to 1964
  • Two main difficulties
  • Combinatorial Too many ways in which pieces can
    be assembled
  • Geometric difficult to detect if a pair of
    pieces really match.

4
Standard Rules
  • Rectangular outside border
  • Each interior piece has 4 primary neighbors
  • Pieces interlock by tabs (indent outdent)
  • Each piece has no neighbors except its primary
    neighbors

5
Standard Rules
  • The primary neighbors of piece P are the pieces
    A, B, C, D

6
Algorithm Overview
  • Find the ordering of the border pieces
  • Embed the border pieces in the plane
  • Find all the pockets
  • Fill in the pockets
  • Optimize
  • Repeat steps 3 5 until no more pieces are left

7
Data Acquisition
  • Use color copier to copy pieces and then scan the
    copies (at 300 dpi)
  • Extract pieces by computing the connected
    components of the complement of the background
  • Use morphological operations to smooth the pieces
  • Take every other pixel on the boundary and do
    Gaussian smoothing

8
Finding Tabs
  • Find indents
  • Mark the boundary near the indents
  • Find outdents along the unmarked parts of the
    boundary

9
Ordering the Border
  • s(A,B) how well the right side of A fits the
    left side of piece B
  • Use an asymmetric TSP heuristic to find an
    ordering of the border pieces

B
A
10
Computing s(A, B)
  • s(A, B)
  • Best case x1 x2 x5 ? s(A,B) 0

A
B
x1
x5
11
Embedding the Border in the Plane
  • For each piece A we know its right left
    neighbor
  • To align adjacent pieces, we define 1 fiducial
    point per tab (indents and outdents)
  • fiducial point the center of a fitted ellipse
    passing through the two inflection points

12
Embedding the Border in the Plane
  • Using the fiducial points, pick points along the
    ellipse which are equiangular w.r.t. its center
  • For two pieces A and B to fit, the corresponding
    tab points of each piece has to fit.

13
Embedding the Border in the Plane
  • To align A and B, use a least-squares fit to find
    the best rigid motion that minimizes the sum of
    the squared distances between corresponding points

B
A
a
a
c
c
b
b
14
Problem!
15
Global Relaxation
  • Distribute error equally among pieces
  • Pick k 30 pairs of corresponding points along
    each common border of two pieces, and minimize
    the sum of the squares of all intra-pair
    distances.
  • Min

16
Placing Interior Pieces
  • At each step we find all the eligible pockets

17
Placing Interior Pieces
  • For each eligible pocket P, and for every piece A
    we compute
  • The position of A if it really belongs to P
  • The score of A using this position

A
P
18
Placing Interior Pieces
  • The position of A is the one that minimizes the
    sum of squares of distances between corresponding
    fiducial points of A and P

Fiducial pt.
A
19
Placing Interior Pieces
  • The score of A is the average distance between a
    boundary vertex of A its closest pocket point
    in P

tangent pt.
A
20
Highest-Confidence Placement
  • For each pocket Pi
  • Ai 1st best fit (min score)
  • Bi 2nd best fit
  • Fill the Pi with the
  • Minimum ratio
  • Ai / Bi

21
Highest-Confidence Placement
  • For each pocket Pi
  • Ai 1st best fit (min score)
  • Bi 2nd best fit
  • Fill the Pi with the
  • Minimum ratio
  • Ai / Bi

P1
P4
P21
P22
P3
22
Experimental Results
  • Using a Sun Ultra-60 workstation, it took
  • 3 minutes to solve a 100-piece puzzle
  • 20 minutes to solve a 204-piece puzzle
  • Techniques applicable to other problems, for
    example shattered glass reconstruction.

23
Thank You
Write a Comment
User Comments (0)
About PowerShow.com