I've been thinking of an algorithm for object recognition but it would relies heavily on straight non-noisy lines and as far as I know this is hard to obtain with edge detection algorithms. What's the best edge detection algorithm to obtain lines as straight as possible?
You're probably looking for the Hough transform or one of it's extensions.
The simplest version of this transform is linear and appropriate for detecting straight lines.
In the transformed space (Hough space), angles and distances are found as points where curves intersect.
Libraries for calculating the Hough transform exist in
- C++ - OpenCV (Has Python bindings)
- Matlab -
houghin the image processing toolbox
- Python - Scikits-image
Related Questions and Answers
See this previous answer for more help on understanding the Hough transform.
you can use LSD line detector http://www.ipol.im/pub/algo/gjmr_line_segment_detector/