Like undiscovered groves of giant redwoods, centuries-old living corals remain unmapped and unmeasured. Scientists still know relatively little about the world’s biggest corals, where they are and how long they have lived.

The secret to unlocking these mysteries may lie with a shoebox-size flying robot.

The robot in question is a four-rotor remote-controlled drone developed by Stanford aeronautics graduate student Ved Chirayath. The drone is outfitted with cameras that can film coral reefs from up to 200 feet in the air. Chirayath teamed up with Stanford Woods Institute Senior Fellow Stephen Palumbi to pioneer the use of drone technology to precisely map, measure and study shallow-water reefs off Ofu Island in American Samoa.

“Until now the challenges have been too high for flying platforms like planes, balloons and kites,” Palumbi said. “Now send in the drones.”

Chirayath, who also works as a scientist at NASA’s Ames Research Center, analyzes the drone’s footage using software he designed. The software removes distortions caused by surface wave movements and enhances resolution. To link the drone aerial footage to close-up images of corals, Chirayath and his colleagues are photographing reefs from below the water using a 360-degree camera. The result is a centimeter-scale optical aerial map and stunning gigapixel panoramic photographs of coral heads that stitch together thousands of images into one.

Surveys and maps of rainforests have resulted in new understanding of the vital role these ecosystems play in sustaining the biosphere. Detailed coral maps could do the same, allowing scientists to conduct precise species population surveys over large areas and assess the impact of climate change.

The window of time to study these mysterious ecosystems, which provide sustenance and livelihoods to a billion people, may be closing. Pollution, destructive fishing practices and climate change impacts such as warmer, more acidic ocean water threaten corals and their role as habitat for about a quarter of all ocean species.

Scientists have long endeavored to make coral reef maps. However, standard underwater approaches such as hand-drawing maps, measuring out quadrants and taking photographs are hugely time-and-labor intensive, and often inaccurate. Satellite imagery through water tends to be distorted by wave movement. Radar can’t penetrate the water’s surface, and sonar doesn’t work well in the shallow water where most corals reside. That’s where drones and Chirayath’s software come in.

When Chirayath first developed his optical software, called Fluid Lensing, NASA hired the young engineer to develop a satellite concept that would image targets such as vegetation and ocean flows on Earth, as well as targets in space. Soon, Chirayath began to think about other applications for the software. After learning about widespread coral bleaching and a lack of accurate reef maps, he dreamed up a camera-equipped drone to do the job.

“I was inspired by the way the human eye works in conjunction with the brain to try to resolve an obscured image,” Chirayath said. He compared his drone-captured coral images to sketchbook pictures of a person behind a waterfall. The person’s face would be heavily distorted in a photograph, but a patient sketch artist could draw the face clearly over time. “It’s an ability to rapidly assimilate a vast amount of data and, in effect, see through strong optical distortions.”

Word of Chirayath’s Fluid Lensing experiments in water tanks at the Monterey Bay Aquarium spread quickly to Palumbi, a professor of marine sciences and director of Stanford’s nearby Hopkins Marine Station. Palumbi invited Chirayath to join him on a research trip to Ofu.

“The lensing takes a huge problem in looking through the surface of the water and turns it into an advantage,” Palumbi said. “It not only removes the ripples but uses their magnification to enhance the image.”

Some of Ofu’s corals, protected by the National Park Service, are 15-20 feet across and 300 years old or more. They live in what Palumbi calls the “Village of Elders,” an expanse of back-reef lagoon that seems to be a perfect incubator for long-lived corals. Palumbi initially plans to use drone-generated maps to measure the location and size – an age indicator – of corals in the Ofu reefs. Then, he will use the drone-captured images to model current flow and water exchange rates in Ofu’s lagoons to better understand climate change’s effects on coral. By overlaying a water temperature map on a census of the oldest corals, Palumbi hopes to gain insights into the conditions that sustain this kind of longevity.

“These corals are time machines that were living before European culture discovered the Samoan islands,” Palumbi said. “What do they have to tell us about that long-ago time? What do they tell us about the likely future?”

Beyond Palumbi’s research, the drone footage could have a second life as art. His project, Reactive Reefs, aims to be an artistically immersive science outreach exhibition that transports viewers beneath the ocean’s surface and conveys firsthand how the world’s coral reefs change as a result of both natural and human pressures. Chirayath dreams of someday using drone technology to precisely map entire oceans and maybe even planets.