Statistics for Static and Dynamic Affordance Learning in Vision-based Direct Perception for Autonomous Driving