On a windy morning in California's Salinas Valley, a tractor pulled a wheeled, metal contraption over rows of budding iceberg lettuce plants. Engineers from Silicon Valley tinkered with the software on a laptop to ensure the machine was eliminating the right leafy buds.
The engineers were testing the Lettuce Bot, a machine that can "thin" a field of lettuce in the time it takes about 20 workers to do the job by hand.
The thinner is part of a new generation of machines that target the last frontier of agricultural mechanization - fruits and vegetables destined for the fresh market, not processing, which have thus far resisted mechanization because they're sensitive to bruising.
Researchers are now designing robots for these most delicate crops by integrating advanced sensors, powerful computing, electronics, computer vision, robotic hardware and algorithms, as well as networking and high precision GPS localization technologies. Most ag robots won't be commercially available for at least a few years.
In this region known as America's Salad Bowl, where for a century fruits and vegetables have been planted, thinned and harvested by an army of migrant workers, the machines could prove revolutionary.
Farmers say farm robots could provide relief from recent labor shortages, lessen the unknowns of immigration reform, even reduce costs, increase quality and yield a more consistent product.
"There aren't enough workers to take the available jobs, so the robots can come and alleviate some of that problem," said Ron Yokota, a farming operations manager at Tanimura & Antle, the Salinas-based fresh produce company that owns the field where the Lettuce Bot was being tested.
Many sectors in U.S. agriculture have relied on machines for decades and even the harvesting of fruits and vegetables meant for processing has slowly been mechanized. But nationwide, the vast majority of fresh-market fruit is still harvested by hand.
Research into fresh produce mechanization was dormant for years because of an over-abundance of workers and pressures from farmworker labor unions.
In recent years, as the labor supply has tightened and competition from abroad has increased, growers have sought out machines to reduce labor costs and supplement the nation's unstable agricultural workforce. The federal government, venture capital companies and commodity boards have stepped up with funding.
"We need to increase our efficiency, but nobody wants to work in the fields," said Stavros G. Vougioukas, professor of biological and agricultural engineering at the University of California, Davis.
But farmworker advocates say mechanization would lead to workers losing jobs, growers using more pesticides and the food supply becoming less safe.
"The fundamental question for consumers is who and, now, what do you want picking your food; a machine or a human, who with the proper training and support, can" ... take significant steps to ensure a safer, higher quality product, said Erik Nicholson, national vice president of the United Farm Workers of America.
On the Salinas Valley farm, entrepreneurs with Mountain View-based startup Blue River Technology are trying to show that the Lettuce Bot can not only replace two dozen workers, but also improve production.
"Using Lettuce Bot can produce more lettuce plants than doing it any other way," said Jorge Heraud, the company's co-founder and CEO.
After a lettuce field is planted, growers typically hire a crew of farmworkers who use hoes to remove excess plants to give space for others to grow into full lettuce heads. The Lettuce Bot uses video cameras and visual-recognition software to identify which lettuce plants to eliminate with a squirt of concentrated fertilizer that kills the unwanted buds while enriching the soil.
Blue River, which has raised more than $3 million in venture capital, also plans to develop machines to automate weeding - and eventually harvesting - using many of the same technologies.
Another company, San Diego-based Vision Robotics, is developing a similar lettuce thinner as well as a pruner for wine grapes. The pruner uses robotic arms and cameras to photograph and create a computerized model of the vines, figure out the canes' orientation and the location of buds - all to decide which canes to cut down.
Fresh fruit harvesting remains the biggest challenge.
Machines have proved not only clumsy, but inadequate in selecting ripe produce. In addition to blunders in deciphering color and feel, machines have a hard time distinguishing produce from leaves and branches. And most importantly, matching the dexterity and speed of farmworkers has proved elusive.
"The hand-eye coordination workers have is really amazing, and they can pick incredibly fast. To replicate that in a machine, at the speed humans do and in an economical manner, we're still pretty far away," said Daniel L. Schmoldt at the U.S. Agriculture Department's National Institute of Food and Agriculture.
In southern California, engineers with the Spanish company Agrobot are taking on the challenge by working with local growers to test a strawberry harvester.
The machine is equipped with 24 arms whose movement is directed through an optical sensor; it allows the robot to make a choice based on fruit color, quality and size. The berries are plucked and placed on a conveyor belt, where the fruit is packed by a worker.
Still, the harvester collects only strawberries that are hanging on the sides of the bed, hence California's strawberry fields would have to be reshaped to accommodate the machine, including farming in single rows, raising the beds and even growing varieties with fewer clusters.
Experts say it will take at least 10 years for harvesters to be available commercially for most fresh-market fruit - not a moment too soon for farmers worried about the availability of workers, said Lupe Sandoval, managing director of the California Farm Labor Contractor Association.
"If you can put a man on the moon," Sandoval said, "you can figure out how to pick fruit with a machine."