Empty beer cans litter Panama City Beach, Florida. Michael Spooneybarger / Reuters

One strike against the human species is that we’ve filled the Earth’s oceans and beaches with garbage. A point in our favor, though: We’ve figured out how to use 3-D laser scanners to automatically measure and analyze that trash, which could help assess the problem and prioritize efforts to clean it up. We might even mount those laser scanners on robots.

The world needs a better method for tracking shoreline refuse, says the coastal researcher Zhijun Dai at East China Normal University in Shanghai. A beach littered with plastic bags and cigarette butts might ruin vacation Instagrams, but it’s even worse for a seabird, fish, or endangered turtle that eats garbage or gets tangled in it. Various countries and international groups have systems in place to monitor debris on their beaches. The National Oceanic and Atmospheric Administration (NOAA), for example, relies on volunteers to track trash on North American shores, especially along the Pacific coastline, by mapping out transects along beaches and tallying up any garbage they find that’s more than an inch across. OSPAR, a group of European countries that works together to protect the Atlantic, also has a long-standing protocol for monitoring beach litter. But this kind of manual counting is tedious—surveyors have to work one glass bottle, bendy straw, or Styrofoam wedge at a time—and subject to human error. In Japan, researchers are using webcams to look for plastic pieces on some beaches. But this method is limited by light and weather conditions, and gives only a two-dimensional view.

Dai and his colleagues decided to demonstrate that trash counting can be done by laser—specifically, by light detection and ranging (LIDAR). This method bounces laser pulses off objects and uses the echoes to map an environment. It’s often used to survey landforms, forests, or archaeological sites. The dense, three-dimensional rendering that results is called a “point cloud.”

The researchers wanted a system that could take a LIDAR image of a beach, then use that image to count and classify trash on its own—no tedious hand-counting required. First they had to train the computer algorithm that would do the classification. They carried a big heap of trash to a beach called Nanhui, which, thanks to wind patterns, was nice and clean until they got there. The collection of 87 items included plastic, metal, cloth, and paper. They scattered the trash around the beach and set up a laser scanner on a tripod 100 meters away, pointed at the garbage. 13 minutes later, the scanner had collected a cloud of about 96 million points.

As the researchers filtered, smoothed and otherwise processed that set of points, ghostly outlines solidified into 3-D representations of soda cans and cardboard boxes. Different materials reflect laser light in distinct ways, and the scientists used these signatures to teach their algorithm how to sort the litter into plastic, paper, cloth, and metal.

Then it was time for the test. The researchers brought their system to a beach called Beihai. The site is popular with tourists, and holds what the authors call a “vast amount of debris” either dropped by visitors or swept ashore by waves. They scanned the beach on three different days, letting the scanner collect points for about 20 minutes each time. To check how well the scanner and sorting algorithm performed, they also manually counted trash in the scan area. (Their findings included cans, plastic bags, Styrofoam takeout containers, and at least three shoes.)

The LIDAR scanning and sorting method was about 75 percent accurate, the researchers reported in Nature. It was totally unable to spot glass debris—maybe because glass and sand are so chemically similar, the scientists say. Plastic, though, is the biggest threat to ocean ecosystems, and the system found more plastic debris (as well as paper, cloth, metal, and plant material) than researchers did in their hand counts. Larger objects came out the most clearly in the 3-D modeling, and regular shapes (say, a cardboard box) looked more realistic than irregular ones like foam pieces or crumpled clothing.

3-D models of beach litter generated from LIDAR point clouds                                       Scientific Reports

The main advantage of LIDAR scanning was time. It took just 20 minutes to capture enough data to make a detailed 3-D model of the trash on a beach. But when the researchers scoured the same beach and counted the trash manually, it took between two and a half and three hours.

Because LIDAR is efficient and pretty accurate, the scientists say, it could improve on the manual methods that are usually used to track beach trash. And tracking trash is important, according to NOAA, because it lets researchers and governments understand the movement and impact of marine debris around the world. Counting all those bottle caps and lost shoes shows not just where the problems are, but how well attempted solutions are working. NOAA, for example, has volunteers combing litter from beaches and pulling abandoned crab traps from the ocean, and in 2014 put large booms across the Tijuana River to stop floating trash from reaching the sea. In a program called Fishing for Litter, OSPAR has given giant garbage bags to hundreds of fishing boats to collect any debris that comes up with their nets.

One day, a LIDAR scanner might even be mounted on some kind of robotic vehicle that could roam the beaches to survey them. “I once thought about this robot,” Dai says. “But the most difficult point is the calibration of the laser scanner.” If scientists could get it to work, a roving trash robot would have to be worth at least a few points for humans.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.