Closed zappybiby closed 1 year ago
Good works! This feature can improve driving at night. It will be perfect we can find better paramerers, but cv::threshold() and cv::adaptiveThreshold() can be changed by appropriate conditions. For example, at night without headlinghts, use adaptiveThreshold() and at others, use threshold().
I have found that using adaptiveThreshold works better for lane detection than the standard threshold being used here: https://github.com/bethesirius/ChosunTruck/blob/889644385ce57f971ec2921f006fbb0a167e6f1e/windows/src/main.cpp#L117
I used the following code to replace that line:
cv::adaptiveThreshold(sobel, contours, 255, ADAPTIVE_THRESH_GAUSSIAN_C, CV_THRESH_BINARY, 21, -3);
A comparison between my implementation of adaptivethreshold and the standard threshold can be viewed here: https://www.youtube.com/watch?v=GT3MJb495Ak&feature=youtu.be