1. For use with a phase-type TOF system that emits modulated optical energy toward a target object, and detects with an array of pixels a portion of said modulated optical energy reflected by said target, and determines depth Z to said target object by combining pixel values to compare phase of emitted said modulated optical energy with phase of reflected said optical energy, a method of reducing at least one of depth error due to motion of said target object, depth error due to spatial edges of said target object, and depth error due to pixel offset, the method including the following steps: (a) determining how best to combine values from pixels in said sensor to yield accurate depth data; and (b) determining how best to compensate for individual pixel offsets to yield accurate depth data.