thomasfermi / Algorithms-for-Automated-Driving

Each chapter of this (mini-)book guides you in programming one important software component for automated driving.
https://thomasfermi.github.io/Algorithms-for-Automated-Driving/Introduction/intro.html
Other
389 stars 84 forks source link

Improve camera_calibrator.py #14

Closed thomasfermi closed 3 years ago

thomasfermi commented 3 years ago

The CameraCalibrator shall get doc strings and #TODO comments to help the student with the implementation.

We should add functions

EDIT: Regarding the last point. Maybe giving K as an argument is not such a bad idea after all... Now that the CameraCalibrator is added I feel that the design of the relations between CameraGeometry, LaneDetector, and CameraCalibrator are not that nice. Maybe the LaneDetector should not have a reference to the CameraGeometry, but rather have it passed as a function argument when needed. I will think about this a bit....

thomasfermi commented 3 years ago

Ok, I though about this for a while an I came up with another design.

The CameraGeometryand LaneDetectorclasses from the previous exercises stay as they are. In this chapter we implement a class CalibratedLaneDetectorwhich inherits from LaneDetector. I will develop a suggestion for that. Then it can be discussed.

thomasfermi commented 3 years ago

I came up with this initial design: CalibratedLaneDetector

Maybe this can replace the CameraCalibrator. This is just the solution code and we would need to think about what will be implemented by the students.

There is also a minimal test notebook but here there is quite some work still needed. Probably the test notebook should loop over the images in a video and feed them to the CalibratedLaneDetector. This should then determine pitch and yaw and average them over time.

@MankaranSingh What do you think of this approach?

thomasfermi commented 3 years ago

Update:

MankaranSingh commented 3 years ago

the residual method looks good! we would need to add this method in hints section. currently, it only contains curvature based method. what do you think, should we remove the curvature method from chapter or add it's code also in the solution code ?

and also, for video reading why not use cv2.videoCapture ? it would save us from adding new dependency.

thomasfermi commented 3 years ago

Hi @MankaranSingh ,

what do you think, should we remove the curvature method from chapter or add it's code also in the solution code ?

I think I would remove it for now.

and also, for video reading why not use cv2.videoCapture ? it would save us from adding new dependency.

You are right, I was not using opencv because it was a bit cumbersome, but I finally got it running now. I changed the test notebook

thomasfermi commented 3 years ago

Remaining work to close the issue: