Face recognition and pixelation

Samuele Miotto's icon

Hello,
I am working on a project where I need a face recognition and to put a pixelation effect on these faces from a live stream of an IP camera.
I managed to create the face recognition and the pixelation effect but I can't manage to blend the two together. I need it to recognize only one face at a time.
Also I don't understand how to have a different input than my webcam.
Sorry if these are dumb questions, I am a total noob and just getting started with Max.
If you can help me it would really mean a lot to me, thank you.
Bear in mind I don't know pretty much anything about this software so try to not take anything for granted because I probably don't know what you are talking about, sorry.
Have a nice day!

FACE REC 2.maxpat
Max Patch

Floating Point's icon

use jit.submatrix for isolating a portion of the image-- but not sure how to recombine:

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon

you should use opengl for the compositing, you can then make use of the edgeblend shader if you want to fade the edges. use a jit.gl.videoplane, and adjust the scaling and position based on the size of the face matrix (using scale objects where needed).

starter patch below:

Max Patch
Copy patch and select New From Clipboard in Max.