Transportation Safety Improvements through Video Analysis: An Application of Obstacles Collision Detection Applied to Railways and Roads