Skip to content
EDU.XLSX

Emoji Detector

Using a regular webcam, it recognizes hand gestures and replies with the matching emoji.

Experiment, 2025

Excerpt of sensor.py choosing the gesture: finger on lips, peace, thumbs up, finger up or straight face. Excerpt of sensor.py comparing finger positions to recognise the peace sign. Excerpt of sensor.py that maps each gesture to the emoji shown on screen. The program’s status bar: “S: Corpo [ON] | R: Rosto [ON] | M: Maos [ON]” and “Q: Sair”. Excerpt of sensor.py with the distance thresholds and window size.

Images of real excerpts of the repository's code and files.

What it's for

An experiment to learn how a computer can “see” hands and faces with nothing but an ordinary webcam.

What I did

A program that tracks your hand and face in real time and recognizes four gestures: thumbs up, peace sign, finger up and finger on lips. When it sees none of them, it shows a straight face. Each detection layer can be switched on and off.

Details

Type
Experiment
Year
2025
Status
Open source · experiment
Made with
Python, OpenCV and MediaPipe (computer vision libraries).
Main language
Python

Code

In practice

        if finger_on_mouth:
            current_state = "FINGER_ON_MOUTH"
        elif is_peace:
            current_state = "PEACE_SIGN"
        elif is_thumbs_up:
            current_state = "THUMBS_UP"
        elif finger_up:
            current_state = "FINGER_UP"
        else:
            current_state = "STRAIGHT_FACE"
A real excerpt of the code. sensor.py