Ruby Hough Hack

The hough transform[1] is an algorithm used to detect lines detect edges/objects in an image. I recently needed to use it to straighten an image so that I could process it. Here is the solution me and my brother hacked out today using Chunky PNG