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: compute, for a first image and a second image from the plurality of images, a global ego-motion translation and a global ego-motion rotation of the camera between the first image and the second image; apply a rolling shutter distortion correction to the global ego-motion translation and to the global ego-motion rotation of the camera to give rise to a corrected global ego-motion translation and a corrected global ego-motion rotation of the camera; apply the corrected global ego-motion rotation and the corrected global ego-motion translation to the first image 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.