1. A system for measuring the position of a hand-held tool relative to a body in at least five degrees of freedom, the system comprising: (a) a rigid or semi-flexible tool having a distal end for insertion into the body, and a proximal portion for manual manipulation outside the body; (b) a camera for generating images; (c) a mechanical linkage attaching said camera to said tool such that: (i) said camera moves together with said proximal portion of said tool, and (ii) said camera is directed with a field of view including at least part of said tool; and (d) a processing system in data communication with said camera and configured to process images from said camera to determine a position of at least part of said tool.