1. A method of determining a distance between a range imaging device and at least one moving object, the method comprising: modulating an image sensor according to a coded exposure; while modulating the image sensor, acquiring, at the image sensor, an image of at least a portion of a modulated illumination signal reflected from a scene containing at least one moving object; generating phase step range image data based on the image of the modulated illumination signal reflected from the scene, the phase step range image data comprising a first phase step image and at least a second phase step image; calculating an initial estimate of a distance between the image sensor and the at least one moving object, and an initial estimate of a brightness of the at least one moving object using a processor, wherein the estimates are based on the acquired phase step range image data; calculating an optical flow of the moving object based on: i) the initial estimate of the distance between the image sensor and the at least one moving object; ii) the initial estimate of the brightness of the at least one moving object; iii) the first phase step image; and iv) the second phase step image; generating motion corrected image data by applying an inverted coded exposure to the phase step range image data to correct for the calculated optical flow; and calculating a distance between the image sensor and the at least one moving object based on the corrected image data.