Interactive Art piece, using cv.jit.faces and cv.jit.track
I'm kind of new to Max. I am making a patcher for an interactive art piece. I want to use cv.jit.faces to detect 1 face. Then i would like to track where the face is in the matrix. Based on where the face is in the matrix, i would like to scale a number of effects. for instances when the face is in the center of the matrix the effect would be off. Then when the face moves left or right the effect would gradually increase. So, when the face is detected on the left or right edge of the matrix, the effect would be all the way on. But, i want the final output, to be a jit.qt.movie. so the effect that the face detection tracking controls is applied to the imported movie file.
Also i would like to randomize the imported movie file. I would like the imported movie file to change every time a face is detected. so, the final output will be black when 0 faces are detected. Then, when 1 face is detected it will read in a random video, from a selection of 5 videos.
does anyone know of, or have any kind of patcher similar to what i want to do for reference? Any help with this would be greatly appreciated.
I made this this morning's project, hope that's okay.
Let me know if you need anything else- always like collaborating!
: j
Thank you so much! this is awesome....now how do i randomize the video everytime a new face is detected? and, do the effects gradually increase as the face moves away from the center of the matrix horizontally?
Ok, never mind the random video files. i'm going to have one video file. But i want to be able to have a number of effects that have parameters set. but instead of turning them on and off. i want the face detections to scale in the effect when the face detection pixels move to the left, or right of the matrix. and i want them to fade out when the face detection pixels move from left, or right to center. this all being horizontal. what would that patcher look like?
Ok here is what i got. I have .track tracking my from face detection and affects my effects in the final output. All i want is a blur effect that scales in and out like the others. all i need face detection to only track one face. not sre if this is possible. maybe have it only track the first face detected in the matrix, and once that face goes away, the next face it detects is the one it uses.
I had the randomizing in there, but I suppose it's moot now. It will track a single face, whatever face is in front of the cam.
Right now, you're only using the x distance.
In terms of blurring, either you'll need to get into shaders to make it look nice or you could just use a jit.fastblur.
: j
really having fun with this patch. I was wondereing would it be possible to attach a movie to the position were the face is, so the movie goes along with the face? I was trieing to use the jit.cornerpin for it but no luck... any ideas?