Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in calculation of the center offset #8

Open
Mojzaar opened this issue Nov 13, 2018 · 5 comments
Open

Error in calculation of the center offset #8

Mojzaar opened this issue Nov 13, 2018 · 5 comments

Comments

@Mojzaar
Copy link

Mojzaar commented Nov 13, 2018

I'm using your code for my camera's output in a simulator but I noticed that the calculated offset from the middle line is wrong. Have I messed something? I checked one of the camera's image and it seems that the algorithm does not recognize the lanes, correctly. In the picture, the car virtually is in the middle of the lanes and lane's distance is 3.3 meter and it is a straight road.
my
pic0

@JunshengFu
Copy link
Owner

Calibrate your camera. I use hard-coded values for my camera setup. And my transformation is not suitable for yours, see your bird-view as an example: if your camera is calibrated, you should see two parallel lanes.

@Mojzaar
Copy link
Author

Mojzaar commented Nov 13, 2018

Thanks for your prompt answer.

I saw that there is a camera_cal folder in your source code. I have to put the camera's outputs there and run the code. Will the transformation be updated automatically or I should change it inside the code?

Actually, I'm using the simulator's camera. Should I take image inside the simulator's environment or is there any other way to calibrate the camera?

@Mojzaar
Copy link
Author

Mojzaar commented Nov 14, 2018

I read the document and also I calibrated the camera with calibration.py. But the calculated offset is still wrong. Have I forgotten another thing?

Thanks for your guidance.

my

@JunshengFu
Copy link
Owner

https://github.com/JunshengFu/driving-lane-departure-warning#3-use-perspective-transform-to-see-the-image-in-bird-view
If you did above step right, you should already see the correct bird view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants