Microsoft has been steadily expanding into the realm of hardware in recent years with the Surface, the Nokia handset deal and the Xbox One. Now, the tech giant is taking its first tentative steps into the world of lingerie.

The smart bra was revealed in a new paper (.PDF) from a team of five scientists at Microsoft Research, titled "Food and Mood: Just-in-Time Support for Emotional Eating." The idea is to measure your emotional state via sensors built into the bra, cross reference that with your feelings when overeating in the past, and send a warning to your smartphone if the system thinks you're likely to reach for the jar of cookies at any minute.

"This is the ﬁrst study, that we are aware of, that makes use of wearable, mobile sensors for detecting emotions," the team wrote. "The bra form-factor was ideal because it allowed us to collect EKG [activity] near the heart."

The women participating in the study had to remove and recharge their bras every three to four hours, in what the researchers described as a "very tedious process." The results, which were uploaded to Microsoft's Azure Cloud, naturally, were fairly impressive: The bra could predict their emerging emotional states with roughly 75% accuracy. (The women reported their moods every hour in smartphone diaries.)

One thing the researchers haven't tested yet is whether an alert informing you that you're in an overeating mood — which the paper describes as an "appropriately timed, personalized intervention" — will actually make much of a difference.

Microsoft is pressing ahead with the device anyway. The team's next challenge, according to their paper, is how to build a robust, real-world system that "stands up to everyday challenges with regards to battery life, comfortability and suitability for both men and women."

That's right: Microsoft doesn't want to leave men out of the equation. The team explored whether boxers or briefs might do the trick, but found male underwear to be too far away from the heart. Perhaps we will see the rise of the Microsoft smart bra for men on a diet.

Image: Microsoft