So I have an image like this:
I want to get something like this (I haven\'t
Have you tried a simpler approach such as the Hough transform for finding lines? A function to perform this and example are included in OpenCV called cvHoughLines2.