[Interactive II] Exercise 3 – Photobooth

About
A face-tracking photobooth which directs user to the center of the screen through its voice and then capture their image after staying in the zone for a few seconds.

How It Works

Step 1 : Open Camera
The first step is something that we had done for the first two exercises so far: to open the webcam camera. 

Step 2 : Track Face & Get Co-ordinates
Then, cv.jit.faces is used to to find a face within an image and at the same time, a bounding box is also created around the face. To find the central point of the face, co-ordinates x1 and x2 are added then divided by 2. Same for y1 and y2.
Step 3 : Play Voice Accordingly
Firstly, I need to determine the ‘safe zone’ of the bounding box which I set as follows :
#1 Move Left
If the bounding box of the face is out of the safe zone to the right (when X > 200, an audio will play to tell user to “Move to the Left”. Onebang is applied to disable the audio from being cut off while it is still playing (if a bang is triggered).

#2 Move Right
If the X co-ordinate of the face is too far on the left (when X is between 0 and 100), audio will play “Move to the Right”.

#3 Move Up
If the Y co-ordinate is too far down (when Y is more than 160), the audio will play “Move Up”.

#4 Move Down
If the Y co-ordinate is too far up (when Y is in between 0 and 100), the audio will play “Move Down”.

#5 No Face Detected
If there is no face detected on the screen, the audio will play “Please face the camera”.

Challenges
Initially, “Move Left” and “Move Right” were playing at the same time and after thinking through the logic, I realized there should be a ‘safe zone’ for the face to be in. Otherwise, the face will trigger audio no matter which position it stays at.

I also wanted to implement a counter system so when user stays within that safe zone for 3 seconds, the camera will capture the image and export as jpeg. However, I could not get that to work. The export function would keep popping up until my MAX froze.


The Interaction

 

 

Published by

Dina

Believes in creating works that someone can not only see or touch but be part of, to be within them.

Leave a Reply