I have some sort of algorithm of lane detection that doesn’t utilize GPU and not based on neural networks. I am capturing the frame of the camera using cv function video capture.
The execution time of the algo is 130 ms and my camera is 30 fps so I am expecting i am dropping 5 frames because of the 130 ms delay however, that isn’t what happening. I am operating on 7-8 frames per second so its like the algorithm is processing on each frame of the camera continuously not the up-to date frame.
So i am trapped in a loop that has a delay, however, what I want to do is to process the algorithm each time on the last newest up-to date camera frame and neglect the previous frames that was in the delay period so i can process the algorithm faster.