Smart-Sensing-Based Traffic Monitoring and Safety Risk Detection