MAX Assignment 3: Photobooth

Task: Create a photobooth programme that directs the user to the centre of the screen, and takes a photo 3 seconds after he/she is in the right position.

  1. Detection of the face and drawing its perimeters (sensing)
  2. Different audio tracks triggered based on the position of the user (effecting):
    Right – play “move left!”
    Left – play “move right!”
    Up – play “go down!”
    Down – play “go up!”
  3. Take photo if no audio tracks are triggered for 3 seconds (effecting)

The first part is similar to the previous assignment: using jit.grab and cv.jit.faces to display and detect the human face. Draw out the perimeters of the face.

Using jit.iter, separate the four x and y values of the detected face. Depending on the dimensions and size of your camera window, determine the x and y values for the photobooth (a box area in the middle of the screen).

If the user’s position is out of bounds, the x value will be bigger than or smaller than the designated middle box, and the audio track will be triggered. If the value = 0 or within the perimeters of the box, nothing will happen.

If the user’s position remains within the middle box for more than 3 seconds, a screenshot will be taken and saved onto the desktop!

Video documentation



X – metro 1000 – print turnon
                                – delay 250 – print turnoff (turns on AND off)
clocker 100: something like a stopwatch/timer (do something after 5000)
X – clocker 1000 – (i) – >10000 – (i) [changes from 0 to 1 when number is >10000]
X – metro 10 – O
                          – speedlim 1000 – O (limits the speed to 1bang/sec)
X – sel 0 1 – print zero (can have a bigger range of nums, if 1 do this or if 2 do this)
                    – print one
key – branches out to four keys (e.g. arrow up down left right)
(i) – split 0 10 – (i)  [if number between 0 and 10, number appears here]
                            – (i)  [if number >10, number appears here]
onebang – doesnt bang repeatedly, only once when triggered
X – metro 1000 – counter 0 1 100 – (i) [counts from 1 to 100, +1/second]
O – uzi 100 – print [prints 100 bangs in one go]
whats the difference between pack i i i and pak i i i?
-> pack only triggers when the left input changes
-> pak triggers when any one of the inputs changes

Leave a Reply