Some butterfly species can see UV light that humans cannot see.
This is vital for their survival and could also be useful in diagnosing cancer in humans.
Scientists have taken inspiration from the Papilio xuthus butterfly's visual system for new technology.
This could help distinguish between normal cells and cells that are cancerous.
Butterflies can see UV light that humans can't
It will be able to do this with 99 per cent accuracy.
This is through an imaging sensor created that can "see" into the UV spectrum where the human eye is not able to.
The research was led by University of Illinois Urbana-Champaign electrical and computer engineering professor Viktor Gruev and bioengineering professor Shuming Nie. It was published in the journal Science Advances.
Professor Gruev said: "We've taken inspiration from the visual system of butterflies, who are able to perceive multiple regions in the UV spectrum, and designed a camera that replicates that functionality.
"We did this by using novel perovskite nanocrystals, combined with silicon imaging technology, and this new camera technology can detect multiple UV regions."
Human eyes cannot see UV rays or tell the difference between different types of UV light.
Healthy cells and cancerous cells have different fluorescence on the UV spectrum.
"Imaging in the UV region has been limited and I would say that has been the biggest roadblock for making scientific progress," Professor Nie said.
"Now we have come up with this technology where we can image UV light with high sensitivity and can also distinguish small wavelength differences.