Automatic Train Track Monitoring and Collision Avoidance System