A camera generates digital image signals representing an image of one or more natural or artificial fiducials on a patient positioned on treatment or diagnosis equipment. A processor applies multiple levels of filtering at multiple levels of resolution to repetitively determine successive fiducial positions. A warning signal is generated if movement exceeds certain limits but is still acceptable for treatment. Unacceptable displacement results in termination of the treatment beam. Tracking templates can be generated interactively from a display of the digital image signals or through automatic selection of an image having the median correlation to an initial template. A gating signal synchronized to patient breathing can be extracted from the digital image signals for controlling the radiation beam generator.