A fully automatic method for on-line electronic portal image analysis is pr
oposed. The method uses multiscale edge detection with wavelets for both th
e field outline and the anatomical structures. An algorithm to extract and
combine the information from different scales has been developed. The edges
from the portal image are aligned with the edges from the reference image
using chamfer matching. The reference is the first portal image of each tre
atment. The matching is applied first to the field and subsequently to the
anatomy. The setup deviations are quantified as the displacement of the ana
tomical structures relative to the radiation beam boundaries. The performan
ce of the algorithm was investigated for portal images with different contr
ast and noise level. The automatic analysis was used first to detect simula
ted displacements. Then the automatic procedure was tested on anterior-post
erior and lateral portal images of a pelvic phantom. In both sets of tests
the differences between the measured and the actual shifts were used to qua
ntify the performance. Finally we applied the automatic procedure to clinic
al images of pelvic and lung regions. The output of the procedure was compa
red with the results of a manual match performed by a trained operator. The
errors for the phantom tests were small: average standard deviation of 0.3
9 mm and 0.26 degrees and absolute mean error of 0.31 mm and 0.2 degrees we
re obtained. In the clinical cases average standard deviations of 1.32 mm a
nd 0.6 degrees were found. The average absolute mean errors were 1.09 mm an
d 0.39 degrees. Failures were registered in 2% of the phantom tests and in
3% of the clinical cases. The algorithm execution is approximately 5 s on a
168 MHz Sun Ultra 2 workstation. The automatic analysis tool is considered
to be a very useful tool for on-line setup corrections. (C) 2000 American
Association of Physicists in Medicine. [S0094-2405(00)00602-7].