I'm processing some images that my UGV (Unmanned Ground Vehicle) captures to make it move on a line.
I want to get the angle of that line based on the horizon. I'll try to explain with a few examples:
The image above would make my UGV to keep straight ahead, as the angle is about 90 degrees. But the following would make it turn left, as the angle compared to the horizon rounds about 120.
I could successfully transform those images into the image below using Otsu for thresholding:
And also used an edge detection algorithm to get this:
But I'm stuck right now trying to find an algorithm that detects those edges/lines and outputs - or helps me to output - the angle of such line...