September 2015
I'm messing with scikit-image and trying to solve jigsaw puzzles.
The current pipeline (but see the code on github for a more up-to-date picture):
filters.sobelmorphology.watershedscipy.ndimage.binary_fill_holesmeasure.find_contours)
The matching sides of two puzzle pieces should have the same length along the path. Matching sides should also have low Hausdorff and Frechet scores. Color-matching and other more advanced techniques could be applied later for more filtering.. I'm learning a lot just getting the side lengths.
I tried various corner-detecting routines provided by skimage:
fast, foerstner, kitchen_rosenfeld, shi_tomasi and subpix,
but I found harris worked the best while generating the fewest false positives.
I later moved away from the harris technique since I already had the piece's outline as an ordered sequence.
I found "template matching" to be more robust --
my templates are two 90deg angles that are composed around a test segment.
I then determine the similarity between the segment and each angle.
In the example below, the segment (in red) is not very similar to either angle
and so it's Hausdorff score would be high:

I also found that the marching squares routine was significantly more robust when the sobel/watershed techniques were applied first to generate a segmented image. This region-based segmentation technique came from this skimage article
I've built a few small imaging rigs to take photographs with consistent lighting and camera positioning. I'm using a beaglebone black and an adafruit JPEG TTL camera with my own LED right ring. I need to try taking photos on pieces of paper that have sharper contrast with the pieces -- some of the white colors in the pieces get lost in the edge detection step.
I shelved this one -- it was super tough! I revisited it in 2024 after seeing a much more successful puzzle-solving robot: July 2024 notes.