Apparatus and methods are described for use with an input angiogram image of a device inserted inside a portion of subjects body, the angiogram image being acquired in the presence of contrast agent. At least one processor (11) includes background-image-generation functionality (13) configured to generate a background image in which a relative value is assigned to a first pixel with respect to a second pixel, at least partially based upon relative values of surroundings of the first pixel and the surroundings of the second pixel in the input image. Cleaned-image-generation functionality (14) generates a cleaned image in which visibility of the radiopaque portions of the device is increased relative to the input image, by dividing the input image by the background image. Output-generation functionality (15) drives a display (16) to display an output based upon the cleaned image. Other applications are also described.