A system for measuring the position of a hand-held tool relative to a body in five or six degrees of freedom, the system comprising: 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; a patch carrying a plurality of markers, the patch configured to be applied or attached to an external surface of the body, wherein said plurality of markers include a first set of markers including a first optically distinct marking and a second set of markers including a second optically distinct marking optically distinguishable from said first optically distinct marking, said first set of markers being closer to a point of penetration of the distal end of the tool into the body than said second set of markers; a camera for generating images; a mechanical linkage is configured to attach said camera to the proximal portion of said tool such that: said camera moves together with said proximal portion of said tool, and said camera is directed with a field of view toward at least part of said distal end of said tool, and wherein the field of view includes the markers when the patch is applied or attached to the external surface of the body and the distal end of the tool is inserted into the body; and a processing system in data communication with said camera and configured to obtain from the camera images of the external surface of the body including the plurality of said markers, and configured to process the images from said camera to determine a position of at least part of said tool relative to the markers. 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; a patch carrying a plurality of markers, the patch configured to be applied or attached to an external surface of the body, wherein said plurality of markers include a first set of markers including a first optically distinct marking and a second set of markers including a second optically distinct marking optically distinguishable from said first optically distinct marking, said first set of markers being closer to a point of penetration of the distal end of the tool into the body than said second set of markers; a camera for generating images; a mechanical linkage is configured to attach said camera to the proximal portion of said tool such that: said camera moves together with said proximal portion of said tool, and said camera is directed with a field of view toward at least part of said distal end of said tool, and wherein the field of view includes the markers when the patch is applied or attached to the external surface of the body and the distal end of the tool is inserted into the body; and said camera moves together with said proximal portion of said tool, and said camera is directed with a field of view toward at least part of said distal end of said tool, and wherein the field of view includes the markers when the patch is applied or attached to the external surface of the body and the distal end of the tool is inserted into the body; and a processing system in data communication with said camera and configured to obtain from the camera images of the external surface of the body including the plurality of said markers, and configured to process the images from said camera to determine a position of at least part of said tool relative to the markers.