A method, controller, and non-transitory medium for obtaining images of a moving subject. Estimating changes in position of the subject based on the images. Calculating a quality metric of the estimation of the change. Comparing the quality metric to a threshold. In a first case in which the quality metric is less than the threshold, adjusting position of the scanning area based on the estimated change in position. In a second case in which the quality metric is not less than the threshold, obtaining a new second image.