Last active
August 28, 2020 00:48
-
-
Save mithi/86aacebe97224eae8d82075d64671e1e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curves = Curves(number_of_windows = 9, margin = 100, minimum_pixels = 50, | |
ym_per_pix = 30 / 720 , xm_per_pix = 3.7 / 700) | |
undistorted_image = birdsEye.undistort(image) | |
binary = laneFilter.apply(undistorted_image) | |
lane_pixels = np.logical_and(birdsEye.sky_view(binary), roi(binary)).astype(np.uint8) | |
result = curves.fit(lane_pixels) | |
print("[real world] left best-fit curve parameters:", result['real_left_best_fit_curve']) | |
print("[real world] right best-fit curve parameters:", result['real_right_best_fit_curve']) | |
print("[pixel] left best-fit curve parameters:", result['pixel_left_best_fit_curve']) | |
print("[pixel] right best-fit curve parameters:", result['pixel_right_best_fit_curve']) | |
print("[left] current radius of curvature:", result['left_radius'], "m") | |
print("[right] current radius of curvature:", result['right_radius'], "m") | |
print("vehicle position:", result['vehicle_position_words']) | |
plt.imshow(result['image']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment