Measuring motion in medical imagery becomes more and more important, in particular for object tracking, image registration, and local displacement measurements. Often, the requirements on the measurement precision are high compared to the image quality. Especially in megavoltage X-ray images (portal images), which are used to check the position of patients in high precision radiotherapy, render low contrast, blur, and noise accurate measurements difficult. In this work we review the framework of a generic matching algorithm only based on the image signal and not on binary image features. Thus, the often unreliable step of feature extraction in such imagery is circumvented. Another major advantage is the possibility of self-diagnosis, which is used for restricting the transformation in motion measurements if the image quality is not sufficient. The matching leads to an estimate of parts of the rigid 3D motion of the patient during radiotherapy, based on the measurements in the projecte...