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
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).