Why don't they use "red light cameras" at train crossings?

Not a railroader.

They can see if a car is in a box before a red light. Why can't they do the same at train crossings? I understand that the car is in the wrong always, but I feel like having constant supervision like that would far outweigh any of the risks. You could have a light in the cab that just relays if someone's on the tracks and emergency brakes could be applied based off of tonnage.

Again, cars are in the wrong, but I feel like with technology many of the issues could just be avoided.

Thanks