sightmachine/SimpleCV — pull request #518 by jayrambhia (2013-05-08 16:31:20+00:00)
Title: Convexity Defects support added.

Issue #513
Resending for #514
Added support for far points too.

img = Image('lenna')
img = img.threshold(128)
blobs = img.findBlobs()
blob = blobs[-1]
lines, farpoints = blob.getConvexityDefects()
lines.draw()
farpoints.draw(color=Color.RED, width=-1)
img.show()

points = blob.getConvexityDefects(returnPoints=True)
startpoints = zip(*points)[0]
endpoints = zip(*points)[1]
farpoints = zip(*points)[2]

Results in top left part of the image

![defects_convexity1](https://f.cloud.github.com/assets/1256649/478508/a0b7bec8-b7fc-11e2-88d0-8ba0002f88e4.png)