(CNN) -- Imagine trying to take a photo of an orange that's on the moon with your smartphone. It seems impossible.
That's what it was like for scientists trying to capture an image of a black hole in space. Despite the tall order, an international team of more than 200 researchers unveiled the first-ever image of a black hole on Wednesday.
The effort wouldn't have been possible without Katie Bouman, who developed a crucial algorithm that helped devise imaging methods.
Three years ago, Bouman led the creation of an algorithm that eventually helped capture this first-of-its-kind image: a supermassive black hole and its shadow at the center of a galaxy known as M87. She was then a graduate student in computer science and artificial intelligence at the Massachusetts Institute of Technology.
Black holes are extremely far away and compact, so taking a photo of one is no easy task. In addition, black holes by definition are supposed to be invisible -- although they can give off a shadow when they interact with the material around them.
A global network of telescopes known as the Event Horizon Telescope project collected millions of gigabytes of data about M87 using a technique known as interferometry. However, there were still large gaps in the data that needed to be filled in.
That's where Bouman's algorithm -- along with several others -- came in. Using imaging algorithms like Bouman's, researchers created three scripted code pipelines to piece together the picture.
They took the "sparse and noisy data" that the telescopes spit out and tried to make an image. For the past few years, Bouman directed the verification of images and selection of imaging parameters.
"We developed ways to generate synthetic data and used different algorithms and tested blindly to see if we can recover an image," she told CNN.
"We didn't want to just develop one algorithm. We wanted to develop many different algorithms that all have different assumptions built into them. If all of them recover the same general structure, then that builds your confidence."
The result? A groundbreaking image of a lopsided, ring-like structure that Albert Einstein predicted more than a century ago in his theory of general relativity. In fact, the researchers had generated several photos and they all looked the same. The image of the black hole presented on Wednesday was not from any one method, but all the images from different algorithms that were blurred together.
"No matter what we did, you would have to bend over backwards crazy to get something that wasn't this ring," Bouman said.
"(Bouman) was a major part of one of the imaging subteams," said Vincent Fish, a research scientist at MIT's Haystack Observatory.
"One of the insights Katie brought to our imaging group is that there are natural images," Fish said. "Just think about the photos you take with your camera phone -- they have certain properties. ... If you know what one pixel is, you have a good guess as to what the pixel is next to it."
For example, there are areas that are smoother and areas that have sharp boundaries. Astronomical images share these properties, and you can mathematically encode these properties, Fish said.
Junior members like Bouman made significant contributions to the project, he added. Of course, senior scientists worked on the project, but the imaging portion was mostly led by junior researchers, such as graduate students and post docs.
"No one of us could've done it alone," Bouman said. "It came together because of lots of different people from many backgrounds."
Bouman starts teaching as an assistant professor at California Institute of Technology in the fall.