Though facial recognition technology has only been around for a few years it has made enormous strides in its ability to replicate our ability to detect faces... and now it would seem that the technology has advanced to the point where the system can detect actual moods.
This isn't as revolutionary as it may seem at first. Once you are able to detect a face it is not a significant leap into sorting those faces based on expression.
Into this field steps the Department of Homeland Security, which is currently working on the Future Attribute Screening Technology (FAST) program. The purpose of which is to be able to analyze peoples expressions in airports (as well as other public locations) to detect those who may be about to perform an act of terrorism... similar to a remote lie detector test.
This technology is not without its potential risks. Examining large crowds of people for those who are angry, nervous, or otherwise upset is likely to generate many false positives.
There certainly is an Orwellian feel to this technology... the ability of a government to analyze massive numbers of people, picking out not only their faces but their emotions as well.
The commercial applications, which are certainly not that far off, are also rather interesting... and disturbing at the same time. Giving public ads the ability to detect the mood of those viewing them, and then adjust the ad in an attempt to tailor the message to the individual viewing. It could also be used to monitor people in stores, both for security purposes (detecting shoplifters) and to test the effectiveness of product displays.