A method and system for performing motion compensation in a temporal
sequence of images include performing a conjugate gradient maximization
of a similarity measure between two images, based on the local
cross-correlation of corresponding regions to obtain a displacement field
for warping one of the images. The non-singularity of the deformation is
ensured by utilizing a composition of regularized gradients of the
similarity measure when building the solution.