An engineer demonstrates how lidar technology can be applied at the southwestern border in Del Rio, Texas.

DEL RIO, Tex. — In this tiny town at the edge of South Texas brush country, a black steel fence runs along the Mexican border. About 15 feet high and topped by small metal spires that bend toward Mexico, it stretches west from a Border Patrol checkpoint for about a mile and a half. Then it stops.

Where the fence ends, a creek snakes off the Rio Grande, up through a private ranch where cattle wander between the mesquite trees. There, beside the creek gully, a small black cylinder sits atop a metal pole, looming over the small trees. It is a lidar sensor, the same laser-based technology that gives sight to self-driving cars. From its perch, it captures a three-dimensional image of anyone who walks into the area.

The sensor belongs to a Silicon Valley start-up called Quanergy, one of a number of companies trying to land business along the Mexican border. While President Trump still vows to build a physical border wall, these companies hope to help build a "virtual wall" that some policymakers believe would be more effective than miles of concrete and metal. A virtual wall would not offer a physical deterrence, but some people believe it would be cheaper to build and maintain.

More from The New York Times:

Border patrol agent arrested in connection with murders of 4 women

Trump says hispanic-american border patrol agent 'speaks perfect english'

Trump has it backward: many migrants are victims of crime

"The only way to have operational control of the border is to look at all 2,000 miles of it at the same time," said Representative Will Hurd, a Republican who represents Val Verde County, west of San Antonio. "And the only way to do that is through technology."

Founded in 2012 and backed by more than $160 million in funding, Quanergy was one of the many lidar makers created amid a rush to develop driverless cars. Over the last year, that investment boom started to feel like a glut as autonomous vehicle technology improved more slowly than some had hoped. Border control is another potential market for lidar, which can spot objects and people in all sorts of conditions, day or night.

Working with the Val Verde County Sheriff's Office, Quanergy has spent the past year testing its lidar sensors on the ranch in Del Rio, angling for a contract with United States Customs and Border Protection.

A range of technologies being developed in Silicon Valley is well suited to border control. When combined with recent advances in artificial intelligence, digital cameras, lidar and other sensors can identify and track people and objects with considerable accuracy.

But many tech workers have made it clear in recent months that they don't want to work on military or government surveillance projects. In June, after more than 4,000 employees protested the project, Google withdrew from an effort to build artificial intelligence for the Defense Department. Border and immigration enforcement is even more controversial. Microsoft and Salesforce employees, for example, have protested the companies' contracts with Immigration and Customs Enforcement.

Still, where some see a moral quandary, others see a business opportunity. More than 20 companies have worked on the Pentagon project that Google pulled out of.

Another start-up, Anduril, is testing technology in the Rio Grande Valley that uses things like digital cameras and artificial intelligence to track people coming across the border. Its founders included Palmer Luckey, who built the virtual reality company Oculus and sold it to Facebook for $2 billion in 2014.

Mr. Luckey left Facebook two years later after it was revealed that he supported a political action group that spread anti-Hillary Clinton memes. Not long after, he started working on his new company. Trae Stephens, the investor who founded Anduril with Mr. Luckey, tried to distance the company from Mr. Luckey's history of political provocation when asked about it in an interview.

"It is a national security company," he said.

Quanergy's executives also hope to keep politics at arm's length. In a recent interview, Louay Eldada, a founder and the chief executive of Quanergy, said the company always planned to expand beyond driverless cars. Border control, he said, was an obvious candidate.

Cogniac, another Silicon Valley start-up that offers technology for identifying people and objects in camera images, is exploring similar work.

Customs and Border Protection already uses a wide variety of technology on the border, including video cameras, flying drones, aerostat blimps, infrared goggles and pressure sensors. But these technologies are deployed in a piecemeal way, and officials have yet to use artificial intelligence that can automatically analyze data captured by cameras and other sensors.

In many areas along the Texas border, there is no technology in place — not even fences. Border Patrol agents still use trucks to drag old tires up and down the border, smoothing the dirt on roads and paths so they can spot footprints later. They call it "sign cutting."

Mr. Hurd, the congressman, is advocating for a wider technological system. "The question is: How do you cut for sign in the digital age?" he said. "We should get to a point where we see absolutely everything coming across our border."

That could include the kinds of sensors tested by Quanergy in Del Rio, which can capture activity across 360 degrees and a distance of about 100 meters. Using this three-dimensional view of an area, software can automatically pinpoint people moving past and alert border agents.

If lined up in large numbers and paired with cameras that snap images when movement is detected, these sensors could provide a more detailed picture of border activity and help agents organize their activities.

But the devices are limited. If left unprotected, they are easily vandalized. And they require both electrical power and a network connection. Quanergy has tested its sensors with solar panels, which eliminate the need for power lines. Still, along most parts of the border, the authorities would have to install new fiber lines or cell towers.

Joe Martinez, Val Verde County's sheriff, has helped test the Quanergy sensors. He said he believed they could be a big help along some parts of the border. But if these sensors were used in the vast, rocky, undulating spaces in the western part of his county, he said, border and other law enforcement agents would have difficulty responding to alerts within any reasonable amount of time.

"The needs to the west are different," Mr. Martinez said. "And the needs to the south are different."

What's more, lidar sensors are expensive. Quanergy charges a few thousand dollars per unit. Old tires are considerably cheaper.

Such sensors, Mr. Martinez and others said, are best used in tandem with a wide variety of other methods under development. "This is about a layering of technologies," said David Aguilar, a former acting commissioner of Customs and Border Protection and a principal at Global Security and Innovative Strategies, a consulting firm in Washington. Current officials with the agency said it was testing many technologies with companies in Silicon Valley, with the goal of deploying new artificial intelligence techniques in the field.

Some question whether these technologies will eat away at the privacy of residents. Much of the land at the border is private.

Guadalupe Correa-Cabrera, a professor at the University of Texas Rio Grande Valley who specializes in border protection issues, said authorities should concentrate on border checkpoints, where a large portion of illegal crossings occur.

"None of these things make sense to me," said Ms. Correa-Cabrera, who is also a fellow at the Wilson Center, a think tank in Washington. "Why would we continue to spend on technology that is not solving the problem?"

But Mr. Aguilar said he believed that demands on the border for new sensors and new artificial intelligence would grow.

"We started talking about this many years ago," he said. "But the technology wasn't as mature as it is now."