Unlike most leopards, which are famously spotty, the Malay leopards are melanistic, which means they have an all-black coat.
As a result it has been extremely difficult for scientists to tell which individual is which.
That meant it was impossible to estimate how many there were in the wild in south-east Asia, which damaged research and conservation efforts.
Now scientists from James Cook University in Australia have discovered a new way of revealing the leopards' hidden spots.
They adapted the infrared flash of an automatic camera trap to go off even in bright daylight.
These cameras produced a series of photographs that clearly show the unique spots within each leopard's fur.
With the leopards' spots revealed, the researchers were able to accurately identify 94% of the animals in the photos.
They hope to use the technology to identify more animals in other parts of south-east Asia.
The results of the study are published in The Journal of Wildlife Management.