Surgery on someone’s gray matter is a delicate operation to say the least. Since there is little space between the skull and the brain, it’s tough for a surgeon to get in between to see what she’s doing. Thankfully, NASA is developing a microscopic camera that will allow surgeons to peek inside your head.

The camera — codenamed MARVEL, for Multi-Angle Rear-Viewing Endoscopic Tool — is being developed in NASA's Jet Propulsion Laboratory in Pasadena, Calif. The device was honored this week with the Outstanding Technology Development Award from the Federal Laboratory Consortium. MARVEL will be attached to an endoscope, a device that examines the interior of the body, in order to take 3D images from inside the brain. This will give surgeons a better view of the intricacies of the tissue they’re working, and hopefully lead to more effective, safer procedures.

"With one of the world's smallest 3D cameras, MARVEL is designed for minimally invasive brain surgery," said Harish Manohara, principal investigator of the project at JPL, in a press release. MARVEL’s camera measures in at 0.2 inches in diameter and about 0.6 inches long. It’s attached to a bendable neck that can move left or right, with the ability to bend in a 120-degree arc.

Using MARVEL would allow surgeons to bypass the traditional craniotomy — a procedure in which a surgeon removes a large part of the patient’s skull. Craniotomies are highly expensive and require a longer hospital stay than using an endoscope.

MARVEL is able to generate 3D images because of its two apertures, which each feature their own color filter. The filters transmit distinct wavelengths of red, green, and blue light, while blocking the bands to which the other filter is sensitive. The system also includes a light source that produces the six colors of light to which the filters are attuned. To create the 3D image, the pictures from both sets are merged.

Since this is just a laboratory prototype, its next step is to meet the requirements of the Food and Drug Administration, meaning it will be a while before you find the mini camera in your brain surgeon’s office. By that time, however, there may already be an updated version of the camera, as the researchers are already working on ways to make it better.

NASA is obviously known more for space exploration than exploring brains, so MARVEL would eventually find itself on robots, voyaging out to unknown territories. The usefulness of the 3D images it provides would be perfect for viewing geological places of interest.