I would like to detect the amount of movement, i.e. the frame difference of a kinect user.
My goal is to use this information to generate visuals and sound so that I can combine the dynamics of the movement with the dynamics of the digitally generated content.
There are several ways you could approach this, I will outline two:
Use the skeleton information (Kinect CHOP) to analyse joint displacement over a time period, you could use the Slope CHOP and total magnitude (Math CHOP → Combine Channels → Length) to derive single ‘amount of motion’ measure.
Use the Player Index image of the Kinect TOP to isolate the players from the image, feed that into the opticalFlow component in the palette under Tools, feed that into a Math TOP with Combine Channels set to Length, then feed that into the Analyze TOP to get the global Average, then convert that into CHOP if that’s what you need. Downsample the Player Index texture before analyzing to save on resources. This technique is not exclusive to the Kinect, you can use a regular webcam or video file.