Webcam Jigsaw Solver in 200 Lines of Python 199
leighklotz writes "Jeff Breidenbach and 200 lines of Python code have brought us the Glyphsaw Puzzle solver. Hold a puzzle piece up to a webcam, and the display sgiws exactly where in the puzzle the piece belongs. The solver uses the Python Imaging Library (PIL), Numerical Python, and the PARC DataGlyph Toolkit. By the way, you can make your own DataGlyphs."
its (Score:1, Insightful)
Wrong section? (Score:5, Insightful)
200 lines? (Score:5, Insightful)
External libraries (Score:3, Insightful)
200 lines of Python? At least this time they mentioned the additional external libraries, unlike with that "15-line" P2P program [slashdot.org] a while back...
like the tetris-playing bot (Score:5, Insightful)
Oh, and I also think it's pretty stupid to talk about how few lines it took to write the program when it's using a bunch of libraries. I could just write a one-liner that calls this program, by that rationale.
Here's the Artificial Intelligence Tetris [colinfahey.com] I was mentioning.
Puzzle (Score:5, Insightful)
NOW if they could do this with an off the Walmart shelf puzzle, THAT would be something.
It's not image recognition (Score:3, Insightful)
It reads digital information encoded into the image... it doesn't look at the actual image itself. It's still quite cool, but no good for what you are thinking.
I already explained more about this to a comment Here [slashdot.org]
This isn't as clever as you think (Score:5, Insightful)
It's a cheat (Score:0, Insightful)
The real challenge would to do this with a regular jigsaw puzzle, not a specially rigged one.
The computer vision technology necessary to do this exists today. It's just a matter of putting it together.
Lame! (Score:5, Insightful)
Essentially it is just a bunch of puzzle pieces with 2-D barcodes printed on them, and a computer+webcam+python used as a barcode reader.
(oh, and as a bonus, the 2-D barcodes are somewhat colored so that it looks like a picture from a distance.)
It is no more a "Jigsaw Puzzle Solver" than a locomotive's wheels are an autopilot decive. They each achieve the end goal only when the rails have been laid in advance.
-CV
Oh yeah, GlyphMarks (Score:4, Insightful)
This
You wanna repeat this experiment at home? Buy a small jigsaw puzzle. Solve it. Label each piece with it's (x,y) coordinate in the solved puzzle. For instance, top-left could be (1,1), the one to its immediate right could be (2,1), and so on.
Then take the puzzle apart and AMAZE your friends when you can deduce the position of each piece simply by HOLDING IT UP TO YOUR EYES!
This defeats the entire purpose of doing jigsaws. (Score:3, Insightful)
When the entire purpose of buying a puzzle is to make you do some mental work, then having that work done automatically is self-defeating.
Re:its (Score:3, Insightful)
at first glance I thought it was a program that could solve jigsaw puzzles by analyzing each piece, its shape, the image on it and figure out where it goes in realtime. that would be really interesting as it would probably have to employ some crazy neural net algo to avoid exponential time.
Dataglyphs (Score:1, Insightful)
Fairly neat.
Re:This defeats the entire purpose of doing jigsaw (Score:3, Insightful)
-psy
so what? (Score:2, Insightful)
Re:200 lines? (Score:4, Insightful)
> What is a reliable means of counting LOC then?
Count every line of code written specifically for this project. Publically availabe libraries don't count; internal libraries written by the author (for use in this project or generalized internal code from a previous project does. This accurately reflects the complexity of the app from the coder's perspective.