Comparison between 2 images

Hi everyone ! I have few questions for you, but first, let me introduce myself.
I’m an art student on Reunion island (yeah, i’m French, so, sorry for the mistakes i’ll make) and i discover touchedesigner few days ago, during a workshop with a professor. He helped me for the basis, but i need more information and clues for my personal project.
Here’s the thing, i want to make an installation whith a camera, where the computer detect the presence of someone passing in front of the camera. If the person is long away from the camera, the image get pixelated, and if he comes closer, the definition increases.
How can i do this ?

I was thinking of comparing two images: the first one, with nobody on it (only the room where the installation will be), and the second one with the person. With some softwares like in the adobe suit, we are able to make the difference and to keep only the part which changed between two pictures (eye toy, on the beginning of the second playstation was able to do some stuff like that, too).
With this, i was thinking of, maybe, do some proportions (like the part which changed divide by the remaining (okay, maybe not this formula, divide by zero is out of my competence :stuck_out_tongue:)), and influe on the pixelated image filter on touchdesigner. Does he exist a plugin (i don’t know the name for touchdesigner, sorry) which can send me some values by comparing two pictures ?

I was also thinking of some softwares which were able to detect the movement on a picture, maybe i can use them ?
My professor told me the name of few hardwares things i could buy for doing this, but if i can avoid this and use some softwares instead, i’ll be thankfull ! (That’s why he sends me here :stuck_out_tongue:)

Thank you for reading me, and dsorry again for my english ! Bye :slight_smile:
(Oh god, it took me some time for writting this ! And the forum deleted it: i wasn’t connected :cry: I hope this time, it will works !)

There aren’t any plugins in TouchDesigner. If you hit Alt + L on the keyboard, you’ll see the palette which has some pre-built components you can use, and there are lots of community users who upload components, but no plugins in the way you’re used to loading plugins in After Effects.

The first thing you should do is take what you want to do and break it down into the smallest steps possible, otherwise you’ll always have a hard time working with TouchDesigner. Each Operator does a very specific thing, so if your instructions are complex, you won’t know what Operators to use.

You can do frame differences in TouchDesigner as well using either the Composite TOP and selecting Difference as the mode, or using a Difference TOP. You would use a Video In TOP to get image from your camera and a Blur would make your image pixelated.

There’s a component called Motion Sense inside of the Palette → Techniques, it has all the building blocks you’d need.

Get yourself a kinect. Use the kinect TOP to get the depth channel to convolve the color camera.

If you don’t have a kinect. Use a regular camera, point a light from the camera toward the subject against a black background. Process color image accordingly using the luminance as your measure of ‘depth’. You could look at the analyze TOP to gate the convolution in some way…

good luck.