OpenCV Identifying Lines and Curves

前端 未结 1 1668
感情败类
感情败类 2021-02-03 14:12

I\'m just starting to learn OpenCV programming. May I just ask about how can I identify lines and curves in OpenCV? My problem is that I have to identify if the image contains a

相关标签:
1条回答
  • 2021-02-03 15:08

    Hough transform http://en.wikipedia.org/wiki/Hough_transform, http://homepages.inf.ed.ac.uk/rbf/HIPR2/hough.htm is the standard way to do it. In its simple form (as implemented in OpenCV) it can detect lines of arbitray position and angle and line segments.

    Look here for an example http://opencv.itseez.com/modules/imgproc/doc/feature_detection.html?highlight=hough#houghlinesp

    For curves, the detection process is a bit more complicated, and you need the general Hough transform It is not yet available in OCV, but you can write it as an exercise or look for a good implementation. http://en.wikipedia.org/wiki/Generalised_Hough_transform describes it (in short)

    0 讨论(0)
提交回复
热议问题