1. A method for use with a tool that is inserted into a portion of a body of a subject that undergoes cyclic motion, the method comprising: acquiring a plurality of native images of the tool inside the portion of the body, at respective phases of the cyclic motion; stabilizing the native images with respect to a feature of the portion of the body; and in response to stabilizing the native images, generating an output that is indicative of an extent of movement of the tool with respect to the portion of the body.