Computer algorithms developed by engineering researchers at the University of Waterloo can accurately determine when drivers are texting or engaged in other distracting activities.

The system uses cameras and artificial intelligence (AI) to detect hand movements that deviate from normal driving behaviour and grades or classifies them in terms of possible safety threats.

Fakhri Karray, an electrical and computer engineering professor at Waterloo, said that information could be used to improve road safety by warning or alerting drivers when they are dangerously distracted. And as advanced self-driving features are increasingly added to conventional cars, he said, signs of serious driver distraction could be employed to trigger protective measures.

"The car could actually take over driving if there was imminent danger, even for a short while, in order to avoid crashes," said Karray, a University Research Chair and director of the Centre for Pattern Analysis and Machine Intelligence (CPAMI) at Waterloo.

Algorithms at the heart of the technology were trained using machine-learning techniques to recognize actions such as texting, talking on a cellphone or reaching into the backseat to retrieve something. The seriousness of the action is assessed based on duration and other factors.

That work builds on extensive previous research at CPAMI on the recognition of signs, including frequent blinking, that drivers are in danger of falling asleep at the wheel. Head and face positioning are also important cues of distraction. Ongoing research at the centre now seeks to combine the detection, processing and grading of several different kinds of driver distraction in a single system.

"It has a huge impact on society," said Karray, citing estimates that distracted drivers are to blame for up to 75 per cent of all traffic accidents worldwide.

Another research project at CPAMI is exploring the use of sensors to measure physiological signals such as eye-blinking rate, pupil size and heart-rate variability to help determine if a driver is paying adequate attention to the road.

Karray's research -- done in collaboration with PhD candidates Arief Koesdwiady and Chaojie Ou, and post-doctoral fellow Safaa Bedawi -- was recently presented at the 14th International Conference on Image Analysis and Recognition in Montreal.