People communicate every day. Often there is a problem of misunderstanding that is closely connected to emotion recognition problem. The problem can be hard to solve for a human and is not easy to formulate. The solution of this problem may be applied in creating some useful programs from educational games to virtual psychologists and advertisement analyzers.
The idea of the present study is to create an emotion recognition algorithm using Intel RealSense technology. The algorithm can be used with other cameras, but Intel RealSense is used because it was originally made for recognition algorithms. Also it has a free software development kit [1].
The developed algorithm consists of six steps:
1. Getting image from the Intel RealSence camera.
2. Face detection.
3. Detection of 78 facial landmark points.
4. Counting key values using landmark points.
5. Analyzing key values.
6. Showing the result.
The picture is grabbed from the camera, then a face and facial landmark points are detected. As it is done the program counts the key values such as mouth and eyes being open in percents. Then the classification starts and the result is presented. Emotion classification for the algorithm was created using the Paul Ekman[2] studies and the mimic codes of emotional states. It was later improved according to the results of the algorithm testing.

The algorithm was tested in the groups of people of different age and gender. Average accuracy of the algorithm is about 86% when it recognizes seven emotions with video frame rate about 30 fps.