A car does not need to tell the difference between those things. It only needs to know something is on the road that should not be there. What that thing is, is irrelevant.
Do you think Google cars can differentiate between trees and police officers? Think again. You are over-complicating the vision problem.