A cow stands in the middle of a busy road as auto-rickshaws pass by in Bengaluru, India, June 2, 2015. REUTERS/Abhishek N. Chinnappa

The population of India is the second-largest for any country in the world, trailing only China. The country also has the world’s second-largest road network, following the United States. However, the combination of population and road network also leads to a number of traffic accidents in the South Asian country, with over 200,000 deaths caused as a result in 2013, according to estimates by the World Health Organization.

One of the factors that lead to road accidents in the country is collisions between vehicles and animals. And while most other animals are chased away from roads, cows — which are venerated by many Hindus, who form over 80 percent of India’s population of over 1.2 billion — are usually given a free rein to do as they will. While that leads to traffic jams on occasion, the threat of accident is never too far.

In a paper published Friday in the International Journal of Vehicle Autonomous Systems, two researchers from the west Indian state of Gujarat describe a system, inspired by self-driving technology, that can detect cows on the road and alert drivers to the presence of the often slow-moving animals.

A cow passes a computer supermarket in New Delhi, Sept. 19, 2008. REUTERS/Desmond Boylan

In the paper, titled “Real-time automatic obstacle detection and alert system for driver assistance on Indian roads,” Sachin Sharma and Dharmesh Shah from the Department of Electronics & Communication, Gujarat Technological University, said: “We designed a system based on histograms of oriented gradients and cascade classifiers for cow detection. The Indian cow has been the biggest obstacle compared to other animals on Indian roads. The distance between a cow and the vehicle is calculated prompting an alert signal to notify the driver for applying brakes. The method is implemented in OpenCV software and tested on various video clips. The proposed system has achieved an accuracy of 80 percent in terms of cow detection.”

According to a statement released by the journal’s publisher, Inderscience Publishers, the system designed by Sharma and Shah used a dashboard camera with an algorithm to decide if objects near the vehicle are cows, and if their movements could pose a risk to the vehicle. Even if the driver failed to see the animal, the system would trigger an audio or visual signal, prompting the driver to apply the brakes.

However, the algorithm for the system needs optimization, and there is no way to use it once it gets dark.