The answer is : monocular depth
Monocular depth affect the perception that is held by an individual on<u> how far an object is located based on how big</u> 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.
I really agree with your statement