The answer is : monocular depth
Monocular depth affect the perception that is held by an individual on how far an object is located based on how big the object look like in that individual's vision.
When the driver cross the railroad, the driver most likely thought that the train is still located far away form him/her because it looks small in the driver's perception. He misjudge it and caused the crash in the end.