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 way than mine). Also, the results I'm getting are not as good as I expected because slight variations in the image require tweaking the parameters (and I need to operate on fixed parameters).
My approach so far:
Should I change the sequence of the filters?
P.S. I'm not too concerned about processing power; I'm running the HoughLinesP on the GPU B-)
Also, here is a sample image:
The results I'm getting: with canny WITHOUT canny (slightly tweaked parameters)
Any help or guidance would be appreciated! I just have no idea what to do to improve it!
UPDATE After using a really quick skeleton implementation (with TONS of blur) as per the chosen answer, I got this:
I would try to use a skeleton representation of the image. The problem with your canny, here, is that it basically results in two lines because of the width of the line.
Then I would apply the Hough transform on it.