Emotionally charged sounds, such as crying or laughter, also prompted similar responses, perhaps explaining why dogs are attuned to human emotions.
The work is published in the journal Current Biology.
Lead author Attila Andics, from the Hungarian Academy of Science's Eotvos Lorand University in Budapest, said: "We think dogs and humans have a very similar mechanism to process emotional information."
Eleven pet dogs took part in the study; training them took some time.
"We used positive reinforcement strategies - lots of praise," said Dr Andics.
"There were 12 sessions of preparatory training, then seven sessions in the scanner room, then these dogs were able to lie motionless for as long as eight minutes. Once they were trained, they were so happy, I wouldn't have believed it if I didn't see it."