finished port of curve detection
hid debug output behind a DEBUG define
added capability to test with binarized image