PALO ALTO — The city of Palo Alto will soon test a camera intrusion detection system along Caltrain tracks as a means of suicide prevention.

The city plans to test the system as a long-term solution for monitoring the rail corridor where there have been multiple teen suicides between 2009 and 2015.

Using such a camera system could eventually replace the need for Track Watch, a program in which the city stations contracted, private security guards at five crossings, according to a city staff report. Such services will cost the city $1.6 million next year.

Having guards watch the tracks has limitations: Guards can’t see very far down the tracks, especially at night, whereas the detection system includes night vision cameras.

The City Council voted on Monday, as part of its consent calendar, to buy a Suicide and Accident Intervention System through a contract with CSC Integrations not to exceed $207,025.

CSC’s experimental system uses automated algorithms to evaluate images and sensor data, and could potentially make the distinction between a human and other objects, according to a city staff report. Unsafe conditions on the tracks would trigger alarms.

Installation is nearly complete. The 60-day test period will cover an area of 1,000 feet in both north and south directions at the East Meadow crossing.

Community members and city officials have had growing concerns over the performance of private security guards after an NBC Bay Area investigation found that some guards were committing crimes, sleeping, masturbating or texting instead of working.

In response, the city asked that Cypress Security guards now carry cell phones with GPS monitoring capabilities so the city can conduct spot checks on their whereabouts.

The city also installed temporary toilet facilities at the crossings and added two supervisory positions to the contract whose purpose is to relieve the guards when they go on breaks.

Also on Monday, the council voted to continue a contract with Cypress through December in the amount of $884,552.

The guards monitor the tracks nearly 24 hours a day, when Caltrain is in operation.

The city expanded contracted services to the Alma Avenue area after Sarah Marie Longyear, a 19-year-old Gunn graduate, died by suicide in the area. Guards previously were posted at four crossings: Charleston Road, Meadow Drive, Churchill Avenue and the California Avenue train platform.

Email Jacqueline Lee at jlee1@bayareanewsgroup.com or call her at 650-391-1334; follow her at twitter.com/jleenews.