I have images like these:




In these images, the red line is what I want to get from the image. The original images do not have such red lines, but only this green road.
I want to evaluate the curve from the image as the equation coefficients: A x ^ 2 + B x + C = 0. There may be noise in the images (black holes at the edges, as you see above).
I tried to solve this using the least squares (LSM) method, but there are two problems with this approach:
The method is too slow even on a PC, because the number of points is large.
The road is too wide in the following case:
The curve in the left image is correctly recognized, but wrong on the right side. The reason is that the road is too wide and too short, I suppose. 
As a solution for both cases, I want to make the road narrow. Ideally, this is the red line in the images above. Or I want to use LSM to determine the line (A x + B = 0) to optimize processing time.
I tried to blur the image - this is the wrong approach. The skeleton is also not the right solution.
Any ideas on how to achieve the desired result (make the road narrow)? Or any ideas for a different approach to this problem?
source share