Detecting Driver Cognition Alertness State From Visual Activities in Normal and Emergency Scenarios