1. A method, performed by a computer processor, for controlling a robot in a presence of a moving object, comprising: capturing a plurality of frames from a three-dimensional camera system; analyzing a frame to identify a connected object comprising substantially proximate voxels; comparing a location of the connected object in the frame to a location of the connected object in a previous frame to determine motion vectors for the substantially proximate voxels; comparing the frame to the previous frame to identify a moving connected object (MCO) comprising the substantially proximate voxels, wherein the motion vectors for the substantially proximate voxels are consistent; determining if an unexpected MCO is in the frame; and, if so, instructing the robot to take an action.