Ask Your Question
0

Why angle of parallel lines is not same? opencv c++

asked 2017-11-28 07:13:58 -0600

I detected lane lines in opencv and calculated their angles (which are shown by read lines in the image), although they look almost the same angle, the angle calculated by the program shows quiet a difference with left line always greater than right.

I am using arctan(slope) to find angles.

Is is due to the fact that y-axis in MAT matrix is inverted?

I am trying to detect the difference in the lane line angles to detect turns and straight road. How can I do achieve my goal? which I can not right now because lines do not have same(but opposite) angle on the straight road.

Below is the image.

Image

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-11-28 07:34:04 -0600

VxW gravatar image

updated 2017-11-28 08:05:27 -0600

Hi,

if I draw the lines by hand I have an angle on the right: 28 and on the left -34, so similar to yours. I would say the difference is because of perspective distortions.

These links should help you:

https://chatbotslife.com/self-driving...

https://medium.com/@cacheop/advanced-...

https://github.com/JunshengFu/driving...

edit flag offensive delete link more

Comments

@VxW how do I eliminate perspective distortion?

sciphfyreon gravatar imagesciphfyreon ( 2017-11-28 07:46:05 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-11-28 07:13:58 -0600

Seen: 829 times

Last updated: Nov 28 '17