puzzle image processing sam bair (group leader) nick halliday nathan malkin joe wang

17
Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin

Upload: jefferson-crooker

Post on 15-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Puzzle Image Processing

Sam Bair(Group Leader)

Nick HallidayNathan Malkin

Joe Wang

Page 2: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Scramble Squares

The object of the puzzle is “to arrange the nine pieces into a square so that the graphics on the pieces' edges match perfectly to form a completed design in every direction”.

Scramble Squares® are made by b.dazzle, inc.®

Page 3: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Our Goal

Goal:

• Create program(s) that use 9 pre-scanned image files to produce a solution to the puzzle

• Use the solution to create a visualization of the work accomplished by the project

Page 4: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

ResourcesEngine

• MATLAB programming language The MathWorks is the creator of MATLAB and a sponsor of SI

Computers

• The program ran primarily on OSC’s Pentium 4 Cluster

– Four gigabytes of RAM

– Two 2.4 GHz Intel P4 Xeon processors

Page 5: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Structure of the Programs

Our group’s programs:

• Processed image files to determine unique objects

• Matched the images to find a solution to the puzzle

• Created a visualization displaying an animation of the algorithm and the results it produced

Page 6: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Integrating the Programs

ImageProcessing

Main Program

Matching Algorithm

Visualization

OutputTo User

Page 7: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Two Interfaces

Automatic:• Program detects

unique objects and categorizes them

Program allows for 2 ways of “input”

Images

Manual:• User categorizes

the edges

Solve the puzzleImage Processing

Page 8: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Two Interfaces (Contd.)Both input methods use a system of upper/lower

case letters assigned to each unique object

Page 9: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Image Processing• Purpose: to match two edges of two puzzle pieces• “Edge detection” used in comparison

– Black and white pixel matching

Page 10: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Image Processing (Contd.)

– Outputs a matching percentage – 100 is perfectly matching, 0 is no matching at all

• Difficulties: image quality interferes with recognition, preventing accurate results

Page 11: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Matching Algorithm

• 9x4 matrix holds letters assigned to unique objects

• Program checks 1269 combinations of sides and stores the information (matches/doesn’t match) in a 4-dimensional matrix

Page 12: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Matching Algorithm / Visualization

Algorithm:• Picks starting piece and side (e.g. 1,1)• Selects succession of pieces and checks appropriate matches on the go• The possible combinations are tried in turn• Some combinations are skipped as soon it is determined that they

cannot yield a solution

Page 13: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Visualization

• Takes solution file produced by the main program and loads images ..

• Simulates the algorithm used by the main program to show the steps it went through

• Images are moved into the position dictated by the simulation (see above)

• Movement is saved as many image files• All the image files are then combined into

a movie/animation created by a MATLAB program

Page 14: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

The Results

Our group solved the puzzle by combining the effort of humans and computers.

While the fully automated program was not completed, an understanding of the concepts its development required was reached.

More time spent on the project would have likely yielded more and better results.

Page 15: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

ConclusionCan you solve my puzzle?• Technical limitations prevented our programs

from producing final solutions

If we had more time, we would:• Optimize image processing code for speed and

efficiency• Develop a better image matching algorithm [as

explained in 5/6]• Improve interaction with user• Develop more complex visualizations• MAKE IT WORK!

Page 16: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang

Our group would like to thank everyone who helped us with our project, including:

• Sam Bair• b.dazzle, inc• The staff of OSC

– Alan Chalker

Page 17: Puzzle Image Processing Sam Bair (Group Leader) Nick Halliday Nathan Malkin Joe Wang