The team demonstrated that a similar technique can be applied to sleeping participants while they are dreaming and, as a result, can help to decode their dreams.
Three volunteers slept in MRI machines for three-hour sessions over 10 days.
As it is difficult to maintain sleep lying in a noisy MRI machine, researchers did not study lengthy, rapid eye movement (REM) sleep dreams, but investigated hypnagogic (the period just before deep sleep) imagery.
These are short, dream-like hallucinations that we remember when drifting in and out of sleep, usually during light sleep, such as an afternoon nap on the couch.
The researchers woke subjects, asked them to report anything they had seen, then told them to go back to sleep.
After gathering about 200 of these verbal reports of hypnagogic imagery from each subject, individual visual components, such as "house" or "woman", were extracted and grouped into broader categories, such as "building" or "female".
When the participants were awake, the researchers then showed them photos corresponding to each category and recorded the relevant fMRI activity.
The computer algorithm soon learned the specific brain activity "signatures" with different image categories for each participant.
The researchers then applied the computer algorithm to the participant's fMRI scans just before a second round of dream-reporting.
They were able to predict the content of the three participants' hypnagogic imagery with 60 per cent accuracy.
This research provides incredible insight into a phenomenon that can be exceptionally vivid and lifelike while occurring, only to fade away into glimmers of vague impressions as we wake.
Until now, there has been scientific debate as to whether dreams occur during sleep at all, with some researchers suggesting that dreams were recollections from short awakenings or even confabulations (inaccurate recollections) on awakening.
Several theories try to explain why we dream, and those looking for insights into "dream symbolism" can yield tens of thousands of results with only a few keystrokes.
While dream symbolism has been considered important for centuries, and was popularised by Freud in the 1950s, research into dream contents took a back seat to the discovery of REM and non-REM sleep.
But a recent resurgence in dream interpretation has led to it being suggested as a clinical tool - for instance, as a way to treat depression.
Being able to accurately dictate the sensory and emotional contents of dreams using brain scans, rather than relying solely on a person's memory, will help this field flourish further.
The technique used in this study might reveal details about dreams that happened, but that we don't remember.
The authors suggest some fMRI patterns that corresponded with reported images, but also contained related but not reported items (such as a street with a car), "may indicate unreported but actual contents during sleep".
One current debate in the field is whether we dream all night long and just lack the ability to recall the content on awakening.
Such techniques applied to REM and non-REM sleep may shed light on these fundamental issues of dreaming and our understanding of consciousness.
With this amazing research and the announcement of the new US$100 million Brain initiative in the US, exciting possibilities lie ahead.
But rest assured: this is still quite far from putting our dreams up on a screen, so our nocturnal visions will remain private - for the time being anyway.
Russell Conduit is a lecturer in psychological sciences at Monash University in Melbourne.