I would like to ask for advice - what kind of algorithm should I use to auto-detect a line on the image?
Before: (from http://tinyurl.com/l6d5x9s)
I want to achieve this kind of result (from http://tinyurl.com/pnfaphv):
Thank you in advance for any help!