A good approach for detecting lines in an image?

后端 未结 5 788
我在风中等你
我在风中等你 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:56

    One possible solution is to take all the edge points that you obtain from the canny edge detection and fit a line using linear least sqaures (maybe iterative) on these points. This way you always get a single line that "best fits" the edge points. There is virtually no parametrisation involved with this method.

提交回复
热议问题