Ofxkinect distance detection within an area

Hello, I was wondering if it is possible to use the kinect to detect distance within a specific area. I know kinect.getDistanceAt() can be used for a specific point but I am looking to detect the distance of the nearest object within a specific area. Thank you

you can access the rawDepth pixels and then loop through these looking for the lowest value, which would be the closest one. for a specific area just dont scan through the whole pixels and only do through the ones you want.
hope this helps