Neil:
Here's something to get you started. It's attached below the image as test.m. Of course it works just for this image and may not work for any possible image that you'll ever encounter. This is where you need to improve the algorithm and where all the time comes in. I just spent 5 minutes on this code but you could spend years on making it robust and general.



