Smile Watcher


Making yourself smile can make you a happier person. There is also evidence that people who smile more are healthier and live longer.

And, according to Tony Robbins, there was a study done at UC Berkeley that showed that smiling for 20 minutes for 20 days could help clinically depressed people get off their meds and not be depressed.

So I created a tool to help me practice smiling while I work.

The tool uses your computer’s webcam and watches your face. It takes a picture every 3 seconds and checks if you are smiling or not. If you are smiling (80% happy or more), then the screen turns green. But if you stop smiling (less than 80% happy), then the screen will turn red. Any time the screen changes from red to green, or green to red, the computer will beep.

The tool has only been tested on the Google Chrome web browser, and may not work on other browsers. If your webcam doesn’t turn on when you click Start, then the tool won’t work on your browser.

How To Use The Tool

– In Chrome browser, go here:

– Click the “Start” button circled in red in the screen shot below

– It will ask for access to the camera on your computer.

– Grant access (assuming you don’t object…the pictures and video are not stored any where and no one except you will see them)

– Smile. : )

– Every 3 seconds it will take a snapshot and then tell you how happy it thinks you are (among other emotions it grades for). If you are 80%+ happy, the screen will show green and “beep”. If you become less than 80%+ happy it will turn red and “beep” again. It “beeps” any time there is a change in “80%+ happy”, either lower or higher.


For Technologists

This tool uses Microsoft’s Emotion API, which is part of their Cognitive Services APIs.

The APIs allow you to create services that rely on vision, speech, language, knowledge, and search.

The code for this smile watching tool is hosted by a service called JSFiddle. Programmers use this service to share examples of code with each other.

Feel free to play with the code and change it however you like. You won’t mess it up for anyone else. If you click “Update”, it will give you a new URL with your changes. If you save or bookmark that URL, you can come back to your changes later. And you can share your URL with your changes with other people if you want.

For example, maybe you find an 80% smile to be too much smiling and would prefer a 50% smile. Find the line that looks for 80% smiling and change it to 50%. (Hint: it’s going to have “> 80”, which you would change to “> 50”, and then click “Run”, and then click “Start”.)

Happy smiling!