8
$\begingroup$

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?

$\endgroup$
10
$\begingroup$

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

Related Questions and Answers

See this previous answer for more help on understanding the Hough transform.

$\endgroup$
  • $\begingroup$ Just one addition concerning libs: latest version of OpenCV not just has C++ bindings, but uses C++ classes in its core. Also consider using [new OpenCV website](opencv.org) for references. $\endgroup$ – ffriend Aug 7 '12 at 11:14
  • $\begingroup$ @ffriend: Cheers, updated answer $\endgroup$ – jmetz Aug 8 '12 at 15:02
  • $\begingroup$ The scikit-image link is out of date. Here is the example I think you mean to reference: scikit-image.org/docs/dev/auto_examples/edges/… $\endgroup$ – lanery Feb 23 '18 at 11:26
1
$\begingroup$

you can use LSD line detector http://www.ipol.im/pub/algo/gjmr_line_segment_detector/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.