I need to make the radius of my blob bigger when a person is close to the kinect and I need to make the blob smaller when the person is farther away from the kinect. I know that I must look at the raw depth values that are smaller than the threshold to then average them out (first by doing a sum and a count, then divide the sum by the count to get the average) and then use the average depth to make a decision on the radius, same as the x,y values.
I have no idea where or how to write this code, please help.
Nodes are the blob
Here is the code.
// Daniel Shiffman
// Tracking the average location beyond a given depth threshold