1. An apparatus comprising: an endoluminal device adapted to be moved through a lumen of a subject's body; one or more extraluminal imaging devices configured to acquire extraluminal two-dimensional (2D) projection images of the lumen; a display; and at least one computer processor configured: to receive from the one or more extraluminal imaging devices: a first set of one or more extraluminal 2D projection images of the lumen, and a second set of extraluminal 2D projection images of the endoluminal device inside the lumen, the second set of extraluminal 2D projection images being acquired while the endoluminal device is being moved through the lumen, to designate at least one of the first set of one or more extraluminal 2D projection images as a roadmap image, for at least a portion of the images belonging to the second set of extraluminal 2D projection images, to identify within the image a plurality of features that are visible within the image, in response to the identified features in the images belonging to the second set of extraluminal 2D projection images, to determine a plurality of local calibration factors associated with respective portions of the roadmap image, each of the calibration factors indicating a relationship between a physical dimension of a respective portion of the lumen and a number of pixels in a portion of the roadmap image that corresponds to the physical dimension of the respective portion of the lumen, and based upon one or more of the determined local calibration factors, to generate an output on the display.