Functionalities implemented with OpenCV.
The following steps are included in this simple demo:
- undistort the raw image data from camera
- transfer into grayscale image, and apply Canny filter on it
- apply color filter on it(cause the lane line is of yellow) in order to extract line
- combine both and binarize it
- get to the bird-eye view image with warping
- apply sliding window onto the bird-eye view and detect centers of lines in it
- interpolation inbetween those nodes with 2nd(3rd) order curves
- map it back to normal view and overlap it with original(undistorted image)
Following steps are envolved in calculation of optical flow:
-
Feature extraction: Harris corners & SIFT feature are covered by now.
SIFT provides a more rich feature detection and hopefully a better optical flow. -
Calculation of optical flow with:
points, status, error = cv2.calcOpticalFlowPyrLK(frame_1, frame_2, feature_points, (...next_points...), **lk_params)
see documentation of function at https://docs.opencv.org/2.4/modules/video/doc/motion_analysis_and_object_tracking.html this function is based on Lukas-Kanade method, which results as a sparse set(compared to Farneback method), and there are three assumptions:- constant intensity
- continuious/small motion
- spatial continuity
-
Visualization of features/traces with:
cv2.circle(Img, (point_x, point_y), radius, (color_b, color_g, color_r), width)
cv2.line(Img, (pa_x, pa_y), (pb_x, pb_y), (color_b, color_g, color_r), width)








