Apparatus and methods are described, including at least one tool configured to be placed inside a subjects mouth. A first optically-visible marker is coupled to the tool. A second optically-visible marker is coupled to a structure inside the subjects mouth. A plurality of optical cameras are coupled to the tool, and are placed inside the subjects mouth by the tool being placed inside the subjects mouth. The cameras acquire respective images of the inside of the subjects mouth, in which the second optically-visible marker is identifiable. A plurality of optical cameras that are disposed outside the subjects mouth acquire respective images of the tool, while the tool is inside the subjects mouth, in which images the first optically-visible marker is identifiable. Other embodiments are also described.