Task: Create an eye or movement tracker that follows you as you move left and right
- Detection of your face, calculation of the x-coordinate of the midpoint (sensing)
- Uploading of eye movement clip, scale the frames of the video to the position of your detected face (effecting)
The first portion of this assignment involves detection of the face, inverting and extracting the coordinates using jit.iter, similar to the magic mirror.
New objects/messages used in this assignment: jit.movie @autostart 0, frame_true $1, bang, getframecount
(left) Calculation of the x-coordinate of the midpoint of the face detected: adding the top left and bottom right values then divide by 2.
(right) Uploading of video using read and jit.movie, play the video by a specific range of frames determined by the scale.
Problems encountered:
Jumping of the frame when no face is detected -> abrupt
Solution: if value <=0, then play frame (middle)
(To be updated!! Have yet to get this part^ to work)