diff --git a/README.md b/README.md index 13a730f979..2effd1fc72 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,36 @@ general process for this project is as follows: image, as well as a numerical estimate of the lane curvature and vehicle position. +Installing This Package +----------------------- + +You can install this package (and all its dependencies) with `pip`: + +```bash +pip install git+https://github.com/evenator/CarND-Advanced-Lane-Lines.git +``` + +Using This Package +------------------ + +First, you'll need to calibrate your camera to correct for lens distortion. Create a directory of +checkerboard images like the images in `examples/camera_cal_images/`. Then, use the +`calibrate_camera` script to generate calibration parameters, which will be saved as numpy files. +You can get help with `calibrate_camera --help` + +Next, you'll need to calibrate the perspective transform from your camera to the ground. For this, +you'll need to mount the camera in the vehicle and take an image of very large rectangle of known +size on the ground in front of the vehicle. Dashed lane markers on a straight road work well for +this. Run `calculate_perspective` and follow the directions to create a projector, which is saved +as a Python pickle file. `calculate_perspective` is interactive and should be relatively intuitive. + +Finally, you can use the camera calibration data and projector you created to process images and +video with `find_lanelines`. You can get help with `find_lanelines --help`. + +Of course, you can also use the classes and methods defined here in your own Python programs. The +modules in the `lanelines` package are all documented to make them as easy to use as possible. In +the future, I'll publish this documentation with Sphinx. + Camera Calibration and Distortion Correction -------------------------------------------- @@ -174,7 +204,7 @@ The other test images can be found in the `output_images` directory as well. Video Pipeline -------------- -The output of the video pipeline can be found [here](project_video_out.mp4). +The output of the video pipeline can be found [here](https://youtu.be/A8eEAL4L25s). The video pipeline has a few differences from the single-image pipeline. All of these differences are based on the concept of persisting the lane line estimate diff --git a/challenge_video.mp4 b/challenge_video.mp4 deleted file mode 100644 index 3d84bbdb53..0000000000 Binary files a/challenge_video.mp4 and /dev/null differ diff --git a/challenge_video_out.mp4 b/challenge_video_out.mp4 deleted file mode 100644 index 17e5e5fbd2..0000000000 Binary files a/challenge_video_out.mp4 and /dev/null differ diff --git a/camera_cal/calibration1.jpg b/examples/camera_cal_images/calibration1.jpg similarity index 100% rename from camera_cal/calibration1.jpg rename to examples/camera_cal_images/calibration1.jpg diff --git a/camera_cal/calibration10.jpg b/examples/camera_cal_images/calibration10.jpg similarity index 100% rename from camera_cal/calibration10.jpg rename to examples/camera_cal_images/calibration10.jpg diff --git a/camera_cal/calibration11.jpg b/examples/camera_cal_images/calibration11.jpg similarity index 100% rename from camera_cal/calibration11.jpg rename to examples/camera_cal_images/calibration11.jpg diff --git a/camera_cal/calibration12.jpg b/examples/camera_cal_images/calibration12.jpg similarity index 100% rename from camera_cal/calibration12.jpg rename to examples/camera_cal_images/calibration12.jpg diff --git a/camera_cal/calibration13.jpg b/examples/camera_cal_images/calibration13.jpg similarity index 100% rename from camera_cal/calibration13.jpg rename to examples/camera_cal_images/calibration13.jpg diff --git a/camera_cal/calibration14.jpg b/examples/camera_cal_images/calibration14.jpg similarity index 100% rename from camera_cal/calibration14.jpg rename to examples/camera_cal_images/calibration14.jpg diff --git a/camera_cal/calibration15.jpg b/examples/camera_cal_images/calibration15.jpg similarity index 100% rename from camera_cal/calibration15.jpg rename to examples/camera_cal_images/calibration15.jpg diff --git a/camera_cal/calibration16.jpg b/examples/camera_cal_images/calibration16.jpg similarity index 100% rename from camera_cal/calibration16.jpg rename to examples/camera_cal_images/calibration16.jpg diff --git a/camera_cal/calibration17.jpg b/examples/camera_cal_images/calibration17.jpg similarity index 100% rename from camera_cal/calibration17.jpg rename to examples/camera_cal_images/calibration17.jpg diff --git a/camera_cal/calibration18.jpg b/examples/camera_cal_images/calibration18.jpg similarity index 100% rename from camera_cal/calibration18.jpg rename to examples/camera_cal_images/calibration18.jpg diff --git a/camera_cal/calibration19.jpg b/examples/camera_cal_images/calibration19.jpg similarity index 100% rename from camera_cal/calibration19.jpg rename to examples/camera_cal_images/calibration19.jpg diff --git a/camera_cal/calibration2.jpg b/examples/camera_cal_images/calibration2.jpg similarity index 100% rename from camera_cal/calibration2.jpg rename to examples/camera_cal_images/calibration2.jpg diff --git a/camera_cal/calibration20.jpg b/examples/camera_cal_images/calibration20.jpg similarity index 100% rename from camera_cal/calibration20.jpg rename to examples/camera_cal_images/calibration20.jpg diff --git a/camera_cal/calibration3.jpg b/examples/camera_cal_images/calibration3.jpg similarity index 100% rename from camera_cal/calibration3.jpg rename to examples/camera_cal_images/calibration3.jpg diff --git a/camera_cal/calibration4.jpg b/examples/camera_cal_images/calibration4.jpg similarity index 100% rename from camera_cal/calibration4.jpg rename to examples/camera_cal_images/calibration4.jpg diff --git a/camera_cal/calibration5.jpg b/examples/camera_cal_images/calibration5.jpg similarity index 100% rename from camera_cal/calibration5.jpg rename to examples/camera_cal_images/calibration5.jpg diff --git a/camera_cal/calibration6.jpg b/examples/camera_cal_images/calibration6.jpg similarity index 100% rename from camera_cal/calibration6.jpg rename to examples/camera_cal_images/calibration6.jpg diff --git a/camera_cal/calibration7.jpg b/examples/camera_cal_images/calibration7.jpg similarity index 100% rename from camera_cal/calibration7.jpg rename to examples/camera_cal_images/calibration7.jpg diff --git a/camera_cal/calibration8.jpg b/examples/camera_cal_images/calibration8.jpg similarity index 100% rename from camera_cal/calibration8.jpg rename to examples/camera_cal_images/calibration8.jpg diff --git a/camera_cal/calibration9.jpg b/examples/camera_cal_images/calibration9.jpg similarity index 100% rename from camera_cal/calibration9.jpg rename to examples/camera_cal_images/calibration9.jpg diff --git a/examples/camera_matrix.npy b/examples/camera_matrix.npy new file mode 100644 index 0000000000..58893d8da4 Binary files /dev/null and b/examples/camera_matrix.npy differ diff --git a/examples/distortion_coefficients.npy b/examples/distortion_coefficients.npy new file mode 100644 index 0000000000..8d63d3e86f Binary files /dev/null and b/examples/distortion_coefficients.npy differ diff --git a/output_images/.DS_Store b/examples/output_images/.DS_Store similarity index 100% rename from output_images/.DS_Store rename to examples/output_images/.DS_Store diff --git a/output_images/binary_lane_extraction.png b/examples/output_images/binary_lane_extraction.png similarity index 100% rename from output_images/binary_lane_extraction.png rename to examples/output_images/binary_lane_extraction.png diff --git a/output_images/checkerboard.png b/examples/output_images/checkerboard.png similarity index 100% rename from output_images/checkerboard.png rename to examples/output_images/checkerboard.png diff --git a/output_images/fit.png b/examples/output_images/fit.png similarity index 100% rename from output_images/fit.png rename to examples/output_images/fit.png diff --git a/output_images/perspective.png b/examples/output_images/perspective.png similarity index 100% rename from output_images/perspective.png rename to examples/output_images/perspective.png diff --git a/output_images/save_output_here.txt b/examples/output_images/save_output_here.txt similarity index 100% rename from output_images/save_output_here.txt rename to examples/output_images/save_output_here.txt diff --git a/output_images/straight_lines1.jpg b/examples/output_images/straight_lines1.jpg similarity index 100% rename from output_images/straight_lines1.jpg rename to examples/output_images/straight_lines1.jpg diff --git a/output_images/straight_lines2.jpg b/examples/output_images/straight_lines2.jpg similarity index 100% rename from output_images/straight_lines2.jpg rename to examples/output_images/straight_lines2.jpg diff --git a/output_images/test1.jpg b/examples/output_images/test1.jpg similarity index 100% rename from output_images/test1.jpg rename to examples/output_images/test1.jpg diff --git a/output_images/test2.jpg b/examples/output_images/test2.jpg similarity index 100% rename from output_images/test2.jpg rename to examples/output_images/test2.jpg diff --git a/output_images/test3.jpg b/examples/output_images/test3.jpg similarity index 100% rename from output_images/test3.jpg rename to examples/output_images/test3.jpg diff --git a/output_images/test4.jpg b/examples/output_images/test4.jpg similarity index 100% rename from output_images/test4.jpg rename to examples/output_images/test4.jpg diff --git a/output_images/test5.jpg b/examples/output_images/test5.jpg similarity index 100% rename from output_images/test5.jpg rename to examples/output_images/test5.jpg diff --git a/output_images/test6.jpg b/examples/output_images/test6.jpg similarity index 100% rename from output_images/test6.jpg rename to examples/output_images/test6.jpg diff --git a/output_images/transformed_binary.png b/examples/output_images/transformed_binary.png similarity index 100% rename from output_images/transformed_binary.png rename to examples/output_images/transformed_binary.png diff --git a/output_images/undistorted.png b/examples/output_images/undistorted.png similarity index 100% rename from output_images/undistorted.png rename to examples/output_images/undistorted.png diff --git a/projector.p b/examples/projector.p similarity index 100% rename from projector.p rename to examples/projector.p diff --git a/test_images/straight_lines1.jpg b/examples/test_images/straight_lines1.jpg similarity index 100% rename from test_images/straight_lines1.jpg rename to examples/test_images/straight_lines1.jpg diff --git a/test_images/straight_lines2.jpg b/examples/test_images/straight_lines2.jpg similarity index 100% rename from test_images/straight_lines2.jpg rename to examples/test_images/straight_lines2.jpg diff --git a/test_images/test1.jpg b/examples/test_images/test1.jpg similarity index 100% rename from test_images/test1.jpg rename to examples/test_images/test1.jpg diff --git a/test_images/test2.jpg b/examples/test_images/test2.jpg similarity index 100% rename from test_images/test2.jpg rename to examples/test_images/test2.jpg diff --git a/test_images/test3.jpg b/examples/test_images/test3.jpg similarity index 100% rename from test_images/test3.jpg rename to examples/test_images/test3.jpg diff --git a/test_images/test4.jpg b/examples/test_images/test4.jpg similarity index 100% rename from test_images/test4.jpg rename to examples/test_images/test4.jpg diff --git a/test_images/test5.jpg b/examples/test_images/test5.jpg similarity index 100% rename from test_images/test5.jpg rename to examples/test_images/test5.jpg diff --git a/test_images/test6.jpg b/examples/test_images/test6.jpg similarity index 100% rename from test_images/test6.jpg rename to examples/test_images/test6.jpg diff --git a/harder_challenge_video.mp4 b/harder_challenge_video.mp4 deleted file mode 100644 index 543f275e9b..0000000000 Binary files a/harder_challenge_video.mp4 and /dev/null differ diff --git a/project_video.mp4 b/project_video.mp4 deleted file mode 100644 index 57c0a00db6..0000000000 Binary files a/project_video.mp4 and /dev/null differ diff --git a/project_video_out.mp4 b/project_video_out.mp4 deleted file mode 100644 index daf54bac7c..0000000000 Binary files a/project_video_out.mp4 and /dev/null differ