Quick mockup for measuring the speed of cars passing by with a Raspberry Pi and a camera. You can tune the setup with w, a, s, d keys and g, h, j, k, z, x keys. When you have found the suitable values you can set them in to the code for the next run. Press q to quit.
Select camera with cap = cv2.VideoCapture(1)
Run it with python3 main.py