Closed zappybiby closed 6 years ago
Is this issue the main priority? We should also get footage to test with so that we do not have to constantly hop into the game to develop.
By implementing #3, we would have an array containing the average of the last x lines detected. We don't necessarily have to find the two lines simultaneously, as the lines are detected so fast that the average of them would provide us with two lines on each side of the lane. Then we could use the histogram method described in #4 to get the x-positions of the two lines in order to calculate the center of the lane.
I made a 30-second "stress test" video that goes through a variety of lighting situations. You can have opencv read from that video by using the following code in grab_window()
:
cap = cv2.VideoCapture('EuroStressTest.mp4')
while(cap.isOpened()):
ret, frame = cap.read()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
We are currently drawing one line at a time. We need to draw two lines simultaneously in order to calculate the center of the lane.