1. A system for processing images captured by a moving rolling shutter camera, the system comprising: an interface configured to receive, from the rolling shutter camera, a plurality of images of an environment of the camera, captured while the camera is moving; a processor configured to: correct for a global ego-motion of the camera between a first image from the plurality of images and a second image from the plurality of images; correct the first image for a rolling shutter distortion, to give rise to a corrected first image; and match pixels' locations in the corrected first image with respective pixels' locations in at least the second image.