A good approach for detecting lines in an image?

后端 未结 5 787
我在风中等你
我在风中等你 2021-01-30 10:59

I\'ve written some code that uses OpenCV libraries to detect white lines painted on grass. I need someone\'s opinion on the approach I used (as I\'m sure there\'s a much better

5条回答
  •  [愿得一人]
    2021-01-30 11:44

    RANSAC algorithm may be a good method. This method is similar to regression or interpolation approaches. You should extract points after using an edge detection(best method is canny for this goal as I think). Then you should find best line. For finding the line passing through several points there are different methods such as linear regression or RANSAC. You can find implementation and notes about RANSAC algorithm in this link.

    Note that RANSAC and another useful algorithms for this goal are already implemented in OpenCV (as I know in version 3.2) and in Accord NET (a free library for image processing).

提交回复
热议问题