PUZZLE SOLVER
A project assignment in the course on Image Analysis. Given a picture of an unsolved jigzaw puzzle, do it. Implemented in MATLAB together with Andreas Agvard.
Document
Puzzle solver (in Swedish, pdf)
Image 1: Picture of an unsolved jigsaw puzzle. The pieces are laid on a rectangular paper to make the next step easier.
Image 2: We start by using the Canny edge detector to find edges. The result is then Radon transformed and then the inverse transform is applied to the four brightest pixels. The result is the four sharpest lines in the original image, which corresponds to the edges of the paper. Once again, the four brightest pixels are found, these are the corners of the paper which are used to rectify the image.
Image 3: The background is removed and the pieces are labeled.
Image 4: Every single piece is individually rectified.
Image 5: The knobs and holes that are found. The area, width and height/depth of these are compared to find matching pieces.
Image 6: The solved jigsaw puzzle.