Speed and red-light cameras are both built to catch drivers the moment they break the rules of the road.