zappybiby / EuroTruckAutopilot

Autonomous Driving for Euro Truck Simulator 2
MIT License
12 stars 2 forks source link

Find positions of lines #4

Closed zappybiby closed 6 years ago

zappybiby commented 6 years ago

Once https://github.com/zappybiby/EuroTruckAutopilot/issues/2 is resolved, we would need to find the positions of the lines detected in order to calculate the center of the lane.

One way to do that would be to create a histogram of the merged binary threshold we currently use to isolate the road lines.

Then we would determine the two highest peaks in that histogram to find the left (closest to 0) and right (closest to width) lines. Afterwards, we would calculate the midpoint of the two peaks to find the center of the lane.

Here is an example of how we can do this in Python.

zappybiby commented 6 years ago

Not necessary anymore.