scikit-image/scikit-image — pull request #672 by jni (2013-08-05 00:48:04+00:00)
Title: Convex hull fix

This works around a bug in the Qhull library (used by `scipy.spatial.Delaunay`, in turn used by `morphology.convex_hull_image`). See examples of the bug in the mailing list [here](https://groups.google.com/d/msg/scikit-image/bIRp3owh4DM/cMbc_zdWn-sJ) and [here](https://groups.google.com/d/msg/scikit-image/ag1qE6VsZo0/CdGqNQhc7PsJ).

Basically, it appears the bug is related to certain points repeating. Oddly, it doesn't appear when the image is padded with 0s (ie when the coordinates are identical but offset by 1 in x and y!). This may relate to how Qhull sorts points during processing. Either way, using a new `unique_rows` function before passing the points list to `Delaunay` fixes all known instances of the bug (the ones reported in the mailing list) and others I encountered when computing convex hulls in my images.